curl --request POST \
--url https://cloud.onyx.app/api/chat/send-chat-message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>",
"llm_override": {
"model_provider": "<string>",
"model_version": "<string>",
"temperature": 123
},
"allowed_tool_ids": [
123
],
"forced_tool_id": 123,
"file_descriptors": [],
"internal_search_filters": {
"source_type": [],
"document_set": [
"<string>"
],
"time_cutoff": "2023-11-07T05:31:56Z",
"tags": [
{
"tag_key": "<string>",
"tag_value": "<string>"
}
]
},
"deep_research": false,
"origin": "unset",
"parent_message_id": -1,
"chat_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chat_session_info": {
"persona_id": 0,
"description": "<string>",
"project_id": 123
},
"stream": true,
"include_citations": true,
"additional_context": "<string>"
}
'{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Handle Send Chat Message
This endpoint is used to send a new chat message.
Args: chat_message_req (SendMessageRequest): Details about the new chat message.
- When stream=True (default): Returns StreamingResponse with SSE
- When stream=False: Returns ChatFullResponse with complete data request (Request): The current HTTP request context. user (User | None): The current user, obtained via dependency injection. _ (None): Rate limit check is run if user/group/global rate limits are enabled.
Returns: StreamingResponse | ChatFullResponse: Either streams or returns complete response.
curl --request POST \
--url https://cloud.onyx.app/api/chat/send-chat-message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>",
"llm_override": {
"model_provider": "<string>",
"model_version": "<string>",
"temperature": 123
},
"allowed_tool_ids": [
123
],
"forced_tool_id": 123,
"file_descriptors": [],
"internal_search_filters": {
"source_type": [],
"document_set": [
"<string>"
],
"time_cutoff": "2023-11-07T05:31:56Z",
"tags": [
{
"tag_key": "<string>",
"tag_value": "<string>"
}
]
},
"deep_research": false,
"origin": "unset",
"parent_message_id": -1,
"chat_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chat_session_info": {
"persona_id": 0,
"description": "<string>",
"project_id": 123
},
"stream": true,
"include_citations": true,
"additional_context": "<string>"
}
'{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Documentation Index
Fetch the complete documentation index at: https://docs.onyx.app/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Authorization header with Bearer token
Body
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Origin of a chat message for telemetry tracking.
webapp, chrome_extension, api, slackbot, widget, unknown, unset Show child attributes
Show child attributes
A string of extra context injected into the LLM call for this request. The context is passed to the model but is not stored in the database and will not appear in the chat history. Use this to supply ephemeral, request-scoped information (e.g. the user's current page URL, session metadata, or any runtime context) without polluting the persistent conversation history. Pass null or omit the field to use no additional context.
Response
Successful Response
Was this page helpful?