API reference
Ask Zo
Send a message to your Zo and stream the response.
POST /zo/ask#
Send a message to your Zo and get a response. This is the same Zo you talk to in the app — your files, integrations, and tools are all available.
Request body#
inputstringrequiredYour message to Zo.
conversation_idstringContinue an existing conversation. Omit to start a new one.
model_namestringThe model to run this turn on (use GET /models/available to list options). Omit it to use your default model for a new conversation, or the model the conversation last ran on when you pass conversation_id.
persona_idstringOverride the active persona (use GET /personas/available to list options).
output_formatobjectJSON Schema for structured output. When set, output in the response is an
object matching the schema instead of a string.
streambooleandefault: falseEnable streaming mode. Returns Server-Sent Events (SSE) instead of JSON.
Response#
outputstring | objectZo's response. An object if output_format was specified.
conversation_idstringID to continue this conversation in subsequent requests.
Long turns and busy conversations#
A non-streaming request waits up to 30 minutes for Zo to finish. If the turn is still running then, the response is 202 with the same body: output holds the text so far, and Zo keeps working in that conversation. You can follow it in the conversation in your Zo.
A request into a conversation that already has a turn running returns 409, and the message isn't added. Sending it again doesn't start another turn while that one runs.
Streaming response#
When stream: true, the endpoint returns a Server-Sent Events stream with Content-Type: text/event-stream. Each event has the format:
Event types:
FrontendModelResponse— text chunk from the model (data.content)End— stream completed (includesdata.outputifoutput_formatwas specified)Error— error occurred (data.message)
The x-conversation-id response header contains the conversation ID for follow-up requests.
Continuing a conversation#
Use the returned conversation_id to continue the conversation: