Streaming responses from the Claude API
Streaming sends tokens as they are generated, which makes agents and chat UIs feel instant. apiToken.sale supports the standard Anthropic streaming format.
·
How to stream
Set "stream": true in your request (or use the SDK's streaming helper). The gateway returns standard Anthropic server-sent events.
curl https://api.apitoken.sale/v1/messages \
-H "x-api-key: sk-pool-•••" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-5",
"max_tokens": 1024,
"stream": true,
"messages": [{"role":"user","content":"Hello"}]
}'See also: Set up the Claude API in two minutes
Billing is identical
Streaming and non-streaming requests are billed the same way — by input and output tokens — so you lose nothing by streaming.
When streaming is worth it
- Chat and coding UIs where users watch the answer appear.
- Long generations, so you can render or act on partial output early.
- Agents that stop as soon as a tool call is emitted.
For short batch jobs, non-streaming is simpler; the cost is identical either way.
Frequently asked questions
Does apiToken.sale support streaming?
Yes — the standard Anthropic SSE streaming format works for coding agents, IDEs and production calls.
Does streaming cost more?
No. Streaming and non-streaming requests are billed identically by tokens.
Start with Google or GitHub and get $10 of Claude usage at official prices — no card required.