Chat
Send Message
Send a user message and receive the agent’s reply, optionally as a streaming SSE response.
POST
Send message
Every endpoint on this page requires either a Clerk-issued JWT (
Authorization: Bearer <token>) or
an organization API key (x-api-key: pk_…). Anonymous calls return 401 Unauthorized. See
Authentication for the full setup.Streaming vs. non-streaming
By default ("stream": true), the agent’s reply is delivered as a Server-Sent Events stream. Set "stream": false to receive a single JSON response when you don’t need incremental rendering.
Code examples
SSE stream format
Whenstream: true, the response is Content-Type: text/event-stream. Each event:
data: [DONE] sentinel.
Non-streaming response
Authorizations
Path Parameters
Body
application/json
Response
Assistant reply (SSE stream when stream: true, JSON object when stream: false).
The response is of type string.
Send message