Claude API pricing explained, with a worked example
The Claude API charges by tokens: the cost of a call = input tokens × input price + output tokens × output price, with prices quoted in USD per 1M tokens. This article shows how to estimate a cost and what changes the actual charge.
Where to find the prices
Input and output prices for each model are on model pricing; by family on Claude model APIs. All prices are in USD per 1M tokens.
A worked example
Say a model costs $3 per 1M input tokens and $15 per 1M output tokens (for illustration only; use the price table for real numbers), and a call sends 2,000 input tokens and gets 500 output tokens:
Input: 2,000 ÷ 1,000,000 × $3 = $0.006
Output: 500 ÷ 1,000,000 × $15 = $0.0075
Total: $0.0135
1,000 such calls come to about $13.50. Output usually costs several times as much as input, so keeping answers short and setting max_tokens often saves more than trimming the input.
What changes the actual charge
- Longer context means more input. Multi-turn chats and coding tools resend history and file contents, so input tokens grow as a session goes on.
- Cache reads and writes. With prompt caching, cache writes and cache reads are charged as their own items, listed separately in the console usage records.
- Model choice. Haiku, Sonnet and Opus prices differ a lot for the same task; see which to use.
How to see what you spent
The “Wallet” page in the console shows today’s and this month’s spend and a bill for every call; “Details” lists the tokens and cost of input, output and cache items. The usage records are authoritative.
Is there a monthly fee?
No. 6090ti charges per call; no calls, no charge. When the balance runs out, requests return an insufficient-balance error until you top up.