See what your AI agent really costs

How Many Tokens Does $20, $50, or $100 of API Credit Buy?

Updated 2026-10-25. Checked against official provider docs and pricing pages on 2026-10-25.

The honest answer is "it depends on how much output you generate." Every API provider charges more for output tokens than for input tokens, often 4 to 5 times more. So the same $20 buys very different token counts depending on whether your app mostly reads (long prompts, short answers) or mostly writes.

Below are dollars-to-tokens figures for popular models at three labeled input:output ratios. All prices come from TokenTab's models.json, retrieved 2026-10-25.

The formula

For a workload with r input tokens for every 1 output token:

Tokens per dollar = 1,000,000 × (r + 1) ÷ (r × input price + output price)

Prices are per 1M tokens. Multiply by your credit amount to get total tokens (input plus output combined).

The three example ratios

These are illustrative assumptions, not measurements:

Agents often land at 10:1 or higher, because history and tool results are resent on every call. Check your own logs. Most provider dashboards break down input and output usage.

Reasoning models also spend credit on thinking tokens, which are billed as output; see are reasoning tokens billed as output tokens?

If you are weighing prepaid credit against a flat plan, try the subscription vs API calculator.

Total tokens per credit amount (input + output combined, in millions)

Model$ per 1M (in / out)$20 at 1:1 / 3:1 / 10:1$50 at 1:1 / 3:1 / 10:1$100 at 1:1 / 3:1 / 10:1
GPT-6 Astra10 / 500.67 / 1.0 / 1.471.67 / 2.5 / 3.673.33 / 5.0 / 7.33
Claude Opus 5.54 / 201.67 / 2.5 / 3.674.17 / 6.25 / 9.178.33 / 12.5 / 18.33
Claude Sonnet 5.52 / 103.33 / 5.0 / 7.338.33 / 12.5 / 18.3316.67 / 25.0 / 36.67
GPT-6.1 Sol2 / 103.33 / 5.0 / 7.338.33 / 12.5 / 18.3316.67 / 25.0 / 36.67
Gemini 4 Argon*2 / 103.33 / 5.0 / 7.338.33 / 12.5 / 18.3316.67 / 25.0 / 36.67
Grok 4.72 / 65.0 / 6.67 / 8.4612.5 / 16.67 / 21.1525.0 / 33.33 / 42.31
Gemini 3.8 Flash*0.75 / 3.758.89 / 13.33 / 19.5622.22 / 33.33 / 48.8944.44 / 66.67 / 97.78
DeepSeek Flash (peak rate)†0.30 / 1.2026.67 / 38.1 / 52.3866.67 / 95.24 / 130.95133.33 / 190.48 / 261.9
Mistral Small 40.15 / 0.6053.33 / 76.19 / 104.76133.33 / 190.48 / 261.9266.67 / 380.95 / 523.81
Claude Haiku 5.5 (≤100K prompt)0.10 / 0.5066.67 / 100 / 146.67166.67 / 250 / 366.67333.33 / 500 / 733.33
GPT-6 Luna0.10 / 0.5066.67 / 100 / 146.67166.67 / 250 / 366.67333.33 / 500 / 733.33

*Google promotional prices. Gemini 4 Argon goes to $4/$20 from Dec 1, 2026, which roughly halves its row. Gemini 3.8 Flash goes to $1.50/$7.50 from Jan 1, 2027, which does the same.

†DeepSeek Flash is shown at its peak rate. DeepSeek's off-peak rates are half (Flash: $0.15/$0.60); peak hours are 01:00–04:00 and 06:00–10:00 UTC, Monday to Friday.

Reading the table: $20 on Claude Sonnet 5.5 at a 3:1 mix buys about 5M total tokens: roughly 3.75M input and 1.25M output. The same $20 on GPT-6 Astra buys about 1M.

What changes these numbers

Reasoning tokens count as output. Reasoning ("thinking") models bill their hidden reasoning as output tokens. A short visible answer can carry thousands of reasoning tokens, which pushes your real ratio toward output and cuts the tokens your credit buys.

Prompt caching stretches input. Cached input is much cheaper. For example, Claude Sonnet 5.5 cached input is $0.10 per 1M vs $2 uncached, and GPT-6.1 Sol is also $0.10 vs $2. If an agent resends the same context, a high cache hit rate can stretch credit much further. Check each provider's cache-write rules: Anthropic, OpenAI (GPT-5.6 and later) and Kimi, for example, bill cache writes separately.

Long prompts can cost more per token. Some models charge a higher rate above a context threshold: GPT-6 models above 272K input tokens, Grok 4.7 above 200K, Claude Haiku 5.5 above 100K, and MiniMax M3 above 512K. Very long prompts buy fewer tokens per dollar.

Time of day (DeepSeek). DeepSeek's prices above are the peak rate. Off-peak prices are half (Flash: $0.15/$0.60), which doubles the tokens.

Batch. OpenAI, Anthropic and Google bill batch API requests at 50% of standard prices, which doubles the tokens for non-urgent jobs. See is the batch API worth it for AI agents?

How far does that go in practice?

Tokens are abstract, so convert them into tasks. Take a labeled example agent task of 8 model calls × (3,000 input + 400 output tokens), which is about 27,200 tokens per task at roughly a 7.5:1 ratio. Then:

To do this with your own token counts and see results for all 32 models at once, use the TokenTab AI agent cost calculator. Enter calls per task, tokens per call, and tasks per day to see per-task and monthly cost.

Quick tips to stretch API credit

  1. Measure your real ratio from usage logs before picking a model.
  2. Use a small model for routine steps and save frontier models for the hard ones.
  3. Cap output length and reasoning effort where quality allows.
  4. Turn on prompt caching for repeated system prompts and context.
  5. Set a spend limit so a looping agent can't drain your credit overnight (see how to stop an agent loop from running up a huge bill).

Sources

Retrieved 2026-10-25.

Get the TokenTab newsletter

Model price changes and agent cost tips, straight to your inbox. Unsubscribe anytime; we only use your email for this newsletter.