Stream a chat reply
POST /api/v1/ai/stream and read Server-Sent Events.
Updated 18 November 2026
Send agentId ("ask" for the Assistant or "coding" for growos Code, Pro and up), messages (1–80 { role, content }), and optionally modelPreference and conversationId. Each data: line is a JSON event: routed, token, usage, done or error.
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"}]}'
Step by step
- Send the request with
-N(no buffering). - Append each
tokenevent's text to your output. - Stop on
doneorerror.
Frequently asked questions
Which model is used?
Auto, unless you send modelPreference with a model id your plan includes.
Want more detail? Read the growos Docs page on this topic.
Was this article helpful?
Still need help? Ask growos with the button at the bottom right, or email support@growos.si.