Skip to main content
POST
/
chat
/
send-chat-message
Handle Send Chat Message
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": [
      "ingestion_api"
    ],
    "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>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Authorization header with Bearer token

Body

application/json
message
string
required
llm_override
LLMOverride · object
allowed_tool_ids
integer[] | null
forced_tool_id
integer | null
file_descriptors
FileDescriptor · object[]
internal_search_filters
BaseFilters · object
deep_research
boolean
default:false
origin
enum<string>
default:unset

Origin of a chat message for telemetry tracking.

Available options:
webapp,
chrome_extension,
api,
slackbot,
widget,
unknown,
unset
parent_message_id
integer | null
default:-1
chat_session_id
string<uuid> | null
chat_session_info
ChatSessionCreationRequest · object
stream
boolean
default:true
include_citations
boolean
default:true
additional_context
string | null

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