---
title: Streaming with the Claude API
description: "How to stream Claude responses on apiToken.sale for responsive coding agents and UIs. Same Anthropic SSE format, billed the same as non-streaming."
url: https://apitoken.sale/docs/learn/claude-api-streaming
language: en
---

# 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"}]
  }'
```

## 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.

---
Get a key: https://apitoken.sale/register
More guides: https://apitoken.sale/docs/learn
