59API

← Voltar aos guias

Claude API Token Pricing: Cut Costs With Cache

Preços · EN · 2026-10-11

Claude API pricing starts with three token meters

Claude API cost is not a single per-request fee. Your bill is normally the sum of input tokens, output tokens, and, when prompt caching is enabled, cache writes and cache reads. Input tokens are everything you send: system instructions, conversation history, retrieved documents, tool schemas, and the newest user message. Output tokens are Claude’s generated answer, including code, reasoning returned by the model, and tool-call arguments. Since output tokens cost substantially more than input tokens, controlling response length is often the fastest saving.

For a practical planning baseline, commonly published rates for newer Claude tiers are roughly $5 per million input tokens and $25 per million output tokens for Opus, $3 and $15 for Sonnet, and $1 and $5 for Haiku. Always confirm the exact model version and live rate before deploying, because providers and model releases can change pricing. If a 59API account offers Fable, treat it as a separately priced option and check its dashboard rate rather than assuming it follows a Claude tier.

Calculate a request before optimizing it

Assume a Sonnet request sends 100,000 input tokens and produces 20,000 output tokens. The input portion costs 100,000 / 1,000,000 × $3 = $0.30. The output portion costs 20,000 / 1,000,000 × $15 = $0.30. Total cost: $0.60 per request. At 10,000 similar requests per month, that becomes approximately $6,000. This example shows why teams should measure both directions: an answer that is only 5,000 tokens longer adds about $0.075 per Sonnet request.

Use the same formula for every model: input tokens × input rate, plus output tokens × output rate, plus any cache charges. Track token counts by endpoint, customer, workflow, and model. A coding agent with a large repository context has a completely different cost profile from a short customer-support classifier, even when both use Sonnet.

How Claude prompt cache tokens change the math

Prompt caching lets you reuse a stable prefix such as a long system prompt, policy manual, product catalog, repository map, or tool definition set. A cache write stores that prefix; a cache read reuses it on later requests during the cache lifetime. For Sonnet-style planning, a short-lived cache write is commonly about 1.25× the normal input rate, while a cache read is about 0.1× the normal input rate. With a $3 per million input rate, that means approximately $3.75 per million cache-write tokens and $0.30 per million cache-read tokens.

Consider a 90,000-token reusable prompt prefix, 10,000 new input tokens, and a 20,000-token response. The first request costs about $0.3375 to write the cache, $0.03 for new input, and $0.30 for output: $0.6675 total. A later request that reads the same 90,000-token cache costs about $0.027 for the cache read, $0.03 for new input, and $0.30 for output: $0.357. Ten requests cost about $3.88 with caching versus $6.00 without it, a saving of roughly 35%.

Five concrete ways to lower Claude API spend

Use a low-cost relay without changing your workflow

59API is a practical option for teams that want pay-as-you-go access to native, official-quality Claude models and GPT models without model downgrades. Its API base URL is https://api.59api.com, and compatibility with Claude Code, Codex, and OpenAI SDK workflows can reduce migration work. Compare the live model prices in your account, route each workload to the lowest capable model, and use the available referral rebate where it fits your program. If you are testing token economics now, sign up for 59API and run a small measured benchmark before moving production traffic.

Preços · Docs

Pronto para começar?

Conecte Claude e GPT em minutos pelos menores preços, sem cortes. Cadastre-se e obtenha sua chave API.

Cadastro grátis