Skip to main content
POST
Send a message and receive an AI-powered response. Supports multi-turn conversations by passing a chat_id from a previous response.

Headers

string
required
Bearer token with your Deeptrace API key. Format: Bearer <your_api_key>.

Query Parameters

boolean
default:"false"
Enable Server-Sent Events streaming.

Body

object[]
required
Array of message objects (minimum 1).
string
ID of an existing chat to continue a conversation.
string
default:"claude-opus-4-6"
Model to use for the response.
string
Custom system prompt override.

Returns

Returns the chat ID and the assistant’s response along with usage information.
string
required
UUID of the chat. Use this to continue the conversation or retrieve the chat later.
string
required
The assistant’s response text.
object
required
Token usage and cost information for the request.

Continuing a Conversation

Pass the chat_id from a previous response to continue the conversation:

Streaming

Add ?stream=true to receive Server-Sent Events:
Stream event types: