← Blog

Claude API Token Usage Billing Breakdown Explained

2026-11-16 · 5 min read · SubToAPI Team

If you've ever stared at an Anthropic invoice and wondered why two requests that felt similar cost wildly different amounts, the answer is almost always in how tokens are counted and priced. Claude API billing isn't a flat per-request fee — it's a sum of several token categories, each priced differently depending on the model and whether caching was involved.

This breakdown covers exactly what you're being charged for: input tokens, output tokens, cache read/write tokens, and how model choice multiplies all of it. By the end you'll be able to look at a usage object from an API response and know precisely what it cost.

The four token categories that drive your bill

Every Claude API call generates a usage object with at least these fields:

Tool use adds a wrinkle: tool definitions in your request count as input tokens, and the model's tool-call output counts as output tokens — including the JSON arguments it generates.

How pricing scales with model choice

Anthropic prices per million tokens, and the multiplier between the cheapest and most capable model is significant — often 10-20x between the smallest and largest Claude models. A rough mental model:

| Tier | Relative input cost | Relative output cost | Typical use | |---|---|---|---| | Smallest/fastest | 1x | 1x | classification, extraction, simple chat | | Mid-tier | ~4-6x | ~4-6x | general-purpose assistants | | Largest/most capable | ~12-15x | ~12-15x | complex reasoning, coding, agents |

This is why "token usage billing" questions often aren't really about tokens at all — they're about accidentally routing simple requests through an expensive model, or re-sending huge system prompts on every turn without caching.

Reading a real usage breakdown

A typical API response includes a usage block like this:

{
  "usage": {
    "input_tokens": 1240,
    "output_tokens": 310,
    "cache_creation_input_tokens": 0,
    "cache_read_input_tokens": 980
  }
}

To estimate cost manually: multiply each field by its per-million-token rate for the model you called, divide by 1,000,000, and sum. The cache_read_input_tokens field is the one most developers forget to check — if it's zero across all your requests, you're not benefiting from caching at all, even if you configured it.

If you're integrating Claude through SubToAPI, every /v1/messages response returns the same usage metadata, and your dashboard aggregates it per API key and per team seat, so you don't have to parse logs to see where spend is going. See /docs/messages for the exact response shape.

Where billing breakdowns go wrong

A few patterns consistently inflate bills beyond what teams expect:

  1. Full history on every turn. A 20-message conversation re-sends all 19 prior messages as input tokens on message 20. Summarizing or trimming history past a certain length cuts input costs substantially in long-running chats.
  2. Verbose system prompts without caching. A 2,000-token system prompt sent on every single request, uncached, is 2,000 billed input tokens every time — even when it never changes.
  3. Streaming doesn't change pricing, but perception does. Streaming responses are billed identically to non-streaming ones — you pay for the same output tokens either way. If you're evaluating streaming for cost reasons, it won't move the needle; it's a UX decision, not a billing one. More on that in /docs/streaming.
  4. Tool-heavy agents undercount output cost. Each tool call round-trip generates its own output tokens for the tool invocation, plus input tokens for the tool result fed back in. A five-step agent loop can rack up five separate input+output charges, not one. The tool schema itself (see /docs/tools) also counts as input tokens on every call that includes it.

Making billing predictable across a team

Token-level billing is granular by design, but that granularity becomes a liability when multiple developers or environments share one Anthropic account — nobody can tell whose feature is driving the spike. Splitting access by application and tracking usage per key solves this without changing how you call the API.

SubToAPI sits in front of your Claude access and issues separate sub_live_... keys per app, environment, or team member, with usage metadata and cost rollups visible per key in one dashboard. You keep the same request/response shape you'd use against Claude directly — see /docs/quickstart to get a key running in a few minutes — but billing visibility stops being a guessing game. Plans start at €9/month for solo use, with team seats at €19 and scale seats at €49; see /pricing for the full breakdown, or /signup to start a free trial.

curl https://api.subtoapi.app/v1/messages \
  -H "Authorization: Bearer $SUBTOAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4",
    "max_tokens": 512,
    "messages": [{"role": "user", "content": "Summarize this ticket."}]
  }'

The response includes the same usage object described above, scoped to the key that made the call, so you can attribute cost at the application level without building your own logging pipeline.

questions

Why did my output tokens cost more than my input tokens for the same request? Output tokens are priced higher per token than input tokens on every Claude model, usually 4-5x. A short prompt that generates a long response can cost more than a long prompt that generates a short one.

Does prompt caching actually reduce my bill, or just latency? Both. Cache reads are billed at a steep discount compared to standard input tokens — often around 90% cheaper — so caching a repeated system prompt or large static context lowers cost on every subsequent call, not just response time.

Can I see token usage broken down by API key or team member? Not through raw Anthropic billing exports, which are account-wide. Issuing separate keys per app or person — for example through SubToAPI's dashboard — gives you that breakdown without extra tooling.

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 →