Clatter LabsHelp Center

How does streaming work on the Model API?

ExplainerUpdated

With "stream": true, the reply arrives as server-sent events while it's being written, in the OpenAI chat.completion.chunk format. Each event is a data: line with JSON; the stream ends with data: [DONE].

  • Text is in choices[0].delta.content.
  • Max and Heavy stream their reasoning as delta.reasoning_content first.
  • Tool calls arrive as delta.tool_calls pieces you join together.
  • With stream_options: {"include_usage": true} a final chunk carries usage with empty choices.
  • If something fails partway: data: {"error": {...}} then data: [DONE].

Streaming doesn't change the price; you pay for the same tokens either way.

Good to know#

  • Every call shows in Console › Logs and Usage as Model API, with its price. See what you spent
  • Your key's account is responsible for your end users' text under the Abuse policy. What it means for apps
  • New accounts get $5 of free credit; top up from $1 to $800 per purchase in Console › Billing › Credits. Billing

Still need help?#

We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Related articles

Still need help?

Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyz
For deleting your whole account or the data of one service.