POST
/
api
/
chat
/
send-message
Send a Chat Message
curl --request POST \
  --url https://stg-azure.hymalaia.net/api/chat/send-message \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "alternate_assistant_id": 0,
  "chat_session_id": "<string>",
  "parent_message_id": "<string>",
  "message": "<string>",
  "prompt_id": 0,
  "regenerate": false,
  "retrieval_options": {
    "run_search": "auto",
    "real_time": true,
    "filters": {
      "source_type": "<string>",
      "document_set": "<string>",
      "time_cutoff": "<string>",
      "tags": [
        "<string>"
      ]
    }
  },
  "llm_override": {
    "model_provider": "<string>",
    "model_version": "<string>"
  },
  "use_agentic_search": false
}'
{
  "message": "<string>",
  "session_id": "<string>"
}
Send a Chat Message Endpoint for sending a message in a chat session

Authorizations

Authorization

  • Type: Bearer Token
  • Description: Authentication header of the form Bearer <token>

Request Body

Parameters

Required

  • chat_session_id (string): Unique identifier for the chat session
  • message (string): The text message to send

Optional

  • alternate_assistant_id (integer, default: 0): ID of the alternate assistant to use
  • parent_message_id (string): ID of the parent message for context
  • prompt_id (integer, default: 0): Identifier for the prompt
  • retrieval_options (object): Advanced search options
  • llm_override (object): Override LLM settings
  • use_agentic_search (boolean, default: false): Enable agentic search

Example Request

import requests

payload = {
    "alternate_assistant_id": 0,
    "chat_session_id": "054ee9cd-3cdd-4d95-86b3-21447b40db6e",
    "message": "Hello, how are you?",
    "prompt_id": 0,
    "retrieval_options": {
        "run_search": "auto",
        "real_time": True,
        "filters": {
            "source_type": None,
            "document_set": None,
            "time_cutoff": None,
            "tags": []
        }
    },
    "llm_override": {
        "model_provider": "gpt",
        "model_version": "gpt-4o"
    },
    "use_agentic_search": False,
    "parent_message_id": None,
    "file_descriptors": [],
    "search_doc_ids": None,
    "prompt_override": None
}

response = requests.post(
    f"https://{url_base}/api/chat/send-message",
    headers={
        "Authorization": f"Bearer {HYMALAIA_API_TOKEN}",
        "Content-Type": "application/json"
    },
    json=payload
)

print(response.json())

Key Parameters

  • chat_session_id: Unique conversation identifier
  • message: Text to send
  • retrieval_options: Advanced search configuration
  • llm_override: Specify language model
  • parent_message_id: Context for conversation thread
  • file_descriptors: Optional file attachments
Replace placeholders:
  • {{url_base}} with your Hymalaia API base URL
  • ${HYMALAIA_API_TOKEN} with your actual API token

Responses

200 OK

  • `

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Chat message details

The body is of type object.

Response

200
application/json

Successful chat message response

The response is of type object.