Streaming chat

POST /api/v1/ai/stream

Terminal
curl -N https://growos.si/api/v1/ai/stream \
  -H "Authorization: Bearer gos_your_key" \
  -H "Content-Type: application/json" \
  -d '{"agentId":"ask","messages":[{"role":"user","content":"Hello"}]}'

Body

Field Type
agentId "ask" | "coding" Assistant or growos Code (Pro+)
messages array { role, content }, 1–80 messages
modelPreference string Optional model id; default Auto
conversationId string Optional; continue a saved chat
effort "low" | "medium" | "high" Optional reasoning effort
fast boolean Optional; shorter, quicker answers
webSearch boolean Assistant: search the web, answer with sources
images, pdfs array Assistant: photos (up to 8) and PDFs (up to 2), base64
location { lat, lon, label? } Assistant: for "near me" places; never stored
mode "agent" | "plan" | "ask" | "debug" | "review" | "multitask" growos Code project chats: agent mode
editMode "ask" | "auto" growos Code: "auto" applies file edits as the agent works
retry, editFromMessageId Regenerate the last reply, or resend from an edited message

The response is text/event-stream; each data: line is a JSON event (routed, token, usage, done or error).

Events

Event When
routed First: the requestId and the model chosen
token Each piece of the reply — append it to your output
usage Tokens used
done The reply finished
error Something went wrong; the stream ends

Cancel a reply

Terminal
curl https://growos.si/api/v1/ai/cancel \
  -H "Authorization: Bearer gos_your_key" \
  -H "Content-Type: application/json" \
  -d '{"requestId":"<requestId from the routed event>"}'

Was this page helpful?

Last updated 28 November 2026Suggest an edit

Step-by-step guides are in the Help Center. Still stuck? Email support@growos.si.

Streaming chat · growos Docs