Skip to content

Chat Completions API

The POST /chat endpoint is the primary gateway to trigger agent runs and stream results in real time.

Endpoint

POST /platform/v1/chat

Request Body Schema

{
"message": "Research the latest pricing changes by competitor Acme and draft a 1-page memo.",
"stream": true,
"agent_id": "optional-custom-agent-id",
"conversation_id": "optional-uuid-to-continue-thread",
"context": {
"target_domain": "acme.com"
}
}
Parameter Type Required Description
message string Yes The user instruction or natural language prompt.
stream boolean No Defaults to true. When true, streams SSE events.
agent_id string No Target specific native or custom agent. Defaults to Super Agent.
conversation_id string No Thread identifier to maintain multi-turn context.
context object No Key-value pairs injected directly into agent context.

cURL Example

Terminal window
curl -N -X POST https://api.zonrad.com/platform/v1/chat \
-H "Authorization: Bearer zon_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{
"message": "Summarize today'''s AI news in 3 bullet points.",
"stream": true
}'