← Blog

Claude API Cost Per Token: Full Pricing Breakdown

2026-09-24 · 4 min read · SubToAPI Team

Claude API pricing is calculated per token, not per request, and the rate depends on which model you use and whether the tokens are input or output. Output tokens typically cost 4-5x more than input tokens, and the difference between Claude's model tiers (Haiku, Sonnet, Opus) can be a 10-20x price gap for the same workload. Understanding this breakdown matters because a chatbot that processes 1,000 requests a day can cost anywhere from a few dollars to several hundred dollars a month depending on model choice alone.

This article breaks down exactly how token-based pricing works, what counts as a token, and how to estimate your actual monthly spend before you build.

How Token-Based Pricing Works

Every request to the Claude API consumes tokens in two directions:

You're billed for both, and they're priced differently. As a rough rule across Anthropic's model lineup, output tokens cost roughly 5x more per token than input tokens. This is standard across most LLM providers and reflects the higher compute cost of generation versus reading context.

A token is roughly 4 characters of English text, or about 0.75 words. So a 1,000-word prompt is approximately 1,300 tokens. Code, non-English languages, and structured data (JSON, markdown tables) tend to tokenize less efficiently, often running 20-40% more tokens than equivalent plain English.

Current Model Pricing Tiers

Anthropic prices Claude models in three broad tiers, each with different input/output rates per million tokens:

Because Anthropic updates pricing and model versions periodically, always check the current rate card before committing to a budget. What matters for planning purposes is the ratio between tiers — Opus is typically 10-15x more expensive per token than Haiku for the same input, and Sonnet sits in between.

What Actually Drives Your Bill

Three factors determine your real-world cost, independent of the per-token rate:

1. Context length. If you're sending the full conversation history on every turn (which is how the API works by default — it's stateless), your input token count grows with every message. A 20-turn conversation can cost far more in input tokens than a single-turn request, even though the model itself hasn't changed.

2. System prompts and tool definitions. Every tool schema you define counts as input tokens on every single request, even if the model never calls that tool. A large tool set (10+ functions with detailed descriptions) can add hundreds or thousands of tokens per call before the user's actual message is even processed.

3. Output length. Verbose responses cost more than concise ones. If you're not constraining output length, models can generate longer completions than necessary, which compounds quickly at scale since output tokens are the most expensive line item.

Prompt Caching Changes the Math

For repeated requests that share a large, static prefix — a long system prompt, a reference document, a set of few-shot examples — prompt caching can cut costs substantially. Cached input tokens are billed at a fraction of the standard input rate on cache hits, though there's a small premium on the initial cache write.

This matters most for:

If your input tokens dominate your cost (common in document-heavy use cases), caching is usually the single highest-leverage optimization available before you touch model selection.

Estimating Your Monthly Cost

A practical way to estimate spend:

monthly_cost = (requests_per_day * 30) *
  ((avg_input_tokens * input_rate) + (avg_output_tokens * output_rate))

Run a handful of real requests through your actual prompts, log the token counts from the API response's usage field, and plug in real averages rather than guesses. Token counts vary more than people expect once system prompts, tool schemas, and conversation history are factored in.

curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-4-5",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Summarize this document."}]
  }'

The response includes a usage object with input_tokens and output_tokens — that's your ground truth for cost modeling, not estimates.

Where SubToAPI Fits

If you're already paying for Claude access and want to turn it into an application-facing API without managing separate Anthropic billing, SubToAPI sits on top of your existing access. You get application API keys (sub_live_...), streaming, tool use, and usage metadata in one dashboard — so you can see per-key token usage alongside the rest of your stack. Plans start at Solo €9, with Team (€19/seat) and Scale (€49/seat) tiers for teams that need shared keys and seat management. Check /pricing for the full breakdown, or start with the /docs/quickstart to see how requests and usage metadata look in practice.

Questions

Does Claude charge for tokens in the system prompt? Yes. System prompts, tool definitions, and conversation history all count as input tokens on every request and are billed at the input rate, even though they're not visible "user" text.

Is output really more expensive than input? Yes, output tokens are typically priced around 5x higher than input tokens across Claude's model tiers, since generation is more compute-intensive than processing context.

How much does prompt caching actually save? Cached input tokens are billed at a significant discount versus standard input rate on cache hits, which matters most for applications repeatedly sending large static context like long system prompts or reference documents.

Turn your Claude access into an HTTPS API

SubToAPI gives you application API keys, streaming, tool use and usage insights on top of your existing Claude access — set up in minutes.

Start free  Read the quickstart →