devtools.codes

Working out Claude API cost per 1,000 requests

Your tool input is processed locally in your browser and is not intentionally uploaded to our servers. Advertising and analytics providers may still process normal page, device, cookie and network information.

Per-request pricing is the figure most teams actually need, because it is the one that multiplies. Getting it right means separating input from output, since providers price them differently and output is typically several times more expensive per token.

Start with a representative request rather than an average you have guessed. Take a real prompt, including the system message and any tool definitions, and count it. Then take a real response. The ratio matters more than either number: a workload with a long prompt and a short answer behaves very differently from one with a short prompt and a verbose structured response.

Multiply by a thousand and you have a figure you can reason about. The most common mistake at this point is forgetting that retries, failed validations and multi-turn conversations all consume tokens. A pipeline that validates structured output and retries once on failure does not cost what a single call costs — it costs somewhere between one and two calls, weighted by your failure rate.

List pricing is a baseline, not a forecast. Prompt caching, batch processing, free tiers and negotiated agreements can reduce the bill. Long-context pricing, regional uplifts, tool use, media, retries and taxes can increase it. Some of those factors are absent from a simple price table, so record what your estimate includes and compare it with the provider dashboard once the workload is running.

Finally, check the date on whatever prices you are using. Provider pricing changes without much notice, and a spreadsheet built six months ago may be quietly wrong. The provider pricing page is always the authority.

More on working out Claude API cost per 1,000 requests

Why is output so much more expensive than input?

Generating tokens requires a forward pass per token, whereas input is processed in parallel during a single prefill step. Providers price that difference through, so output commonly costs several times more per million tokens. The practical consequence is that a verbose response format can dominate a bill even when the prompt is long.

Should I use per-request or per-month figures for budgeting?

Work out the per-request cost first, because it is the figure that multiplies and the one you can check against a real call. Convert to monthly only at the end, using a volume assumption you have written down. Doing it the other way round hides which variable is actually driving the number.

Does prompt caching change the per-request cost?

It can change it substantially where a long, stable prefix is reused across calls, since cached input is billed at a reduced rate while cache writes usually carry a premium. The saving depends entirely on your hit rate, so treat an uncached list-price estimate as the ceiling and measure the real figure once traffic is running.

The tool behind this, and related guides