Skip to main content
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

When stream: true, the response is Content-Type: text/event-stream. Each event:
The stream ends with the literal data: [DONE] sentinel.

Non-streaming response

Authorizations

x-api-key
string
header
required

Organization API key. Obtain from the dashboard. Format: pk_live_…

Path Parameters

sessionId
string
required

Body

application/json
content
string
required

The user's message.

Example:

"What is my current subscription plan?"

stream
boolean
default:true

Stream the response over SSE. Set false for a single JSON response.

Response

Assistant reply (SSE stream when stream: true, JSON object when stream: false).

The response is of type string.