
Claude API Stream Idle Timeout: Causes and How to Fix It
A Claude API stream idle timeout means a streaming request went idle past a client or proxy limit and returned a partial response. Here is how to fix it.
Category
Developer guides to the Claude API — pricing, tokens, streaming, tool use, structured output, rate limits, and the error handling that keeps a pipeline honest.
This category is for people building on the Claude API, and it's written by people who do: our own client code calls the API daily, so the guidance on requests, tokens, streaming, retries, and cost comes from running real workloads rather than paraphrasing the reference. Where a parameter has changed or a pattern has quietly been deprecated, that's exactly the kind of thing we try to flag before it costs you a debugging session.
Start with getting-started and pricing to size a project, then dig into the mechanics — tool use, structured output, batching, caching, and the specific error codes you'll meet in production. The through-line is practical: enough working detail to ship, plus the honest limits and gotchas that the happy-path docs tend to skip.


A Claude API stream idle timeout means a streaming request went idle past a client or proxy limit and returned a partial response. Here is how to fix it.

Claude API pricing per million tokens: Opus 5, Sonnet 5 and Haiku 4.5 rates, batch's 50% cut, prompt caching, and worked cost examples.

Claude API error 500 from api.anthropic.com: what api_error and 529 mean, exponential backoff with jitter, retry caps and request_id logging.

Learn how to use Claude API: get an API key from the Anthropic Console, understand the Messages API, and make your first request in curl or Python.

Claude prompt caching stores a stable prompt prefix so cached reads bill at ~10% of input price — how cache_control works, the TTLs, and the gotchas.

Claude tool use (function calling) lets Claude call tools you define via a JSON schema. The tool_use and tool_result loop, a worked example, and the MCP tie-in.