Skip to main content
/chat/send-message and /chat/send-message-simple-api have been removed. Use this API instead.
Use the /chat/send-chat-message API to send a message to Onyx. It is the same API that the Onyx web app uses to send and receive messages. You can receive a streaming response or one complete response.
Authenticate with an API key or a Personal Access Token. A limited-access token needs the Chat — Write scope. See Authentication.

Request Parameters

Response Format

Streaming Response

Onyx returns different packet types in the streaming response, depending on what the Agent does. Each packet is one JSON object with a type field. See our streaming_models.py on GitHub for the complete list of packet types and their corresponding fields.

Non-streaming Response

Sample Request

Other ways to integrate

  • To get ranked documents without an answer, use the Search API.
  • To let an external LLM client such as Claude Code or Codex search Onyx, connect it to the Onyx MCP server.
  • To call your organization’s models through Onyx from your own application, use the LLM Gateway.

Next Steps

Guide: Search with the API

Get ranked documents back instead of an answer

Guide: Use the Ingestion API

Use the lightweight ingestion API to index documents

Guide: Create a Connector

Learn how to create and configure Connectors programmatically

Onyx MCP server

Search Onyx from MCP clients