v52

OpenAPI 3.1.0raw.githubusercontent.com2026-07-311,1941,9384.1 MB
Assistants

Assistant Chat (BETA)

This endpoint allows a client to send a chat message to a specific AI Assistant. The assistant processes the message and returns a relevant reply based on the current conversation context. Refer to the Conversation API to create a conversation, filter existing conversations, fetch messages for a conversation, and manually add messages to a conversation.

post/ai/assistants/{assistant_id}/chat

Path parameters

assistant_idstring required

Unique identifier of the assistant.

Request body

contentstring required

The message content sent by the client to the assistant

conversation_idstring required

A unique identifier for the conversation thread, used to maintain context

namestring

The optional display name of the user sending the message

streamboolean

When true, the response is streamed as Server-Sent Events (text/event-stream): delta events carry content fragments as they are generated, a final done event carries the full content plus whatsapp_template, and a terminal error event reports failures that happen after streaming started. When false (default), the response is a single JSON object.

Example request

{
  "content": "Tell me a joke about cats",
  "conversation_id": "42b20469-1215-4a9a-8964-c36f66b406f4",
  "name": "Charlie"
}

Response

Successful Response

contentstring required

The assistant's generated response based on the input message and context.

Example response

{
  "content": "Why did the cat sit on the computer? Because it wanted to keep an eye on the mouse!"
}