Skip to main content

Can I stream a chat model's reply through the Run API?

Yes: add ?stream=true to the /sync Run URL to get server-sent events as the model writes, or follow the task over the WebSocket.

Yes. Add ?stream=true to the model's /sync Run URL, such as https://api.wiro.ai/v1/Run/claude/fable-5/sync?stream=true, or send Accept: text/event-stream to the /sync URL. You get server-sent events: start, task_output while the model writes, and done with the finished task, plus keep-alive comments. You can also read task_output events over the WebSocket.

  • Replace, don't append: each task_output carries the whole reply so far in segments.

  • Success is still pexit "0" in the done event's tasklist[0]. If the connection drops or you get a timeout event, the task keeps running, so check it with Task/Detail instead of running it again.

  • finishreason: length means the reply hit its token limit, content_filter means the provider filtered it, and tool_calls means the model is waiting for your tool's result.

  • Reasoning models stream their thinking too. See how to get only the answer.

The LLM Gateway's stream currently arrives only after the model finishes. Details: synchronous runs and LLM streaming.

Did this answer your question?