LLM API pricing comparison (July 2026)

Current per-token prices for Anthropic and OpenAI models, side by side, with the discount structures (caching, batch) that actually determine what you pay. Every number below comes from the provider's own pricing page, checked July 2026.

LLM API cost comparison: per-token prices, side by side

All prices are USD per million tokens. "Cached input" is what you pay for prompt tokens served from the provider's cache.

Model Input Cached input Output
Anthropic (Claude)
Claude Fable 5$10.00~$1.00 *$50.00
Claude Opus 4.8 / 4.7 / 4.6 / 4.5$5.00~$0.50 *$25.00
Claude Opus 4.1 (legacy)$15.00~$1.50 *$75.00
Claude Sonnet 5$3.00 †~$0.30 *$15.00 †
Claude Sonnet 4.6$3.00~$0.30 *$15.00
Claude Haiku 4.5$1.00~$0.10 *$5.00
OpenAI (GPT)
GPT-5.6 Sol$5.00$0.50$30.00
GPT-5.6 Terra$2.50$0.25$15.00
GPT-5.6 Luna$1.00$0.10$6.00
GPT-5.5$5.00$0.50$30.00
GPT-5.5 Pro$30.00Not offered$180.00
GPT-5.4$2.50$0.25$15.00
GPT-5.4 mini$0.75$0.075$4.50
GPT-5.4 nano$0.20$0.02$1.25
GPT-5.3 Codex$1.75$0.175$14.00

* Anthropic bills cache reads at roughly 0.1x the input price; the values shown are that multiple applied to the input rate. Anthropic cache writes also carry a premium (1.25x input for the 5-minute TTL, 2x for 1-hour), which OpenAI's caching does not have an equivalent of on its pricing pages.
† Sonnet 5 has introductory pricing of $2.00 input / $10.00 output through August 31, 2026.
Sources, checked July 2026: Anthropic pricing and OpenAI pricing. Prices change; confirm on the provider page before budgeting.

The same conversation on each model

Per-token rates only matter multiplied by your traffic. Here is one realistic 20-turn support conversation (about 192,000 cumulative input tokens, 13,000 output tokens) priced on each model, no caching.

Model Cost per conversation Per 1,000 conversations
Claude Fable 5$2.57$2,570
GPT-5.6 Sol$1.35$1,350
Claude Opus 4.8$1.29$1,290
Claude Sonnet 5$0.77$770
GPT-5.6 Terra$0.68$680
GPT-5.4$0.68$680
GPT-5.6 Luna$0.27$270
Claude Haiku 4.5$0.26$260
GPT-5.4 mini$0.20$200
GPT-5.4 nano$0.05$50

Assumptions: 800-token system prompt, 250-token user messages, 650-token replies, full history re-sent every turn, standard (non-intro, non-batch) rates. The Claude pricing page walks through the turn-by-turn derivation.

How the pricing structures differ

The headline rates are close; the discount mechanics are where the providers diverge.

Per-token basics. Both providers bill input (what you send) and output (what the model generates) separately, per token. Output carries a large multiple: exactly 5x input across the current Claude lineup, and roughly 6x input on most current GPT models (8x on GPT-5.3 Codex). Both APIs are stateless, so a multi-turn conversation re-sends its whole history each call and pays input rates on all of it, which is why input usually dominates conversational bills despite the cheaper rate.

Caching discounts. Both providers discount repeated prompt prefixes to about 0.1x the input price, but the mechanics differ:

  • Anthropic caching is explicit. You place cache_control breakpoints, and you pay a write premium: 1.25x input for a 5-minute TTL or 2x for 1-hour. Reads then cost ~0.1x. The write premium means caching can lose money on traffic that does not re-read the prefix within the TTL.
  • OpenAI publishes a flat "cached input" rate per model (0.1x input on the current lineup, except GPT-5.5 Pro, which offers no cached discount). Its pricing pages list no separate write charge.

In both cases the discount depends on an exact repeated prefix, and the conversation history keeps growing either way; caching lowers the rate on old tokens, it does not remove them.

Batch discounts. OpenAI documents batch processing at roughly half the standard rates (for example, GPT-5.6 Sol batch input at $2.50 versus $5.00 standard). Anthropic also offers batch processing; we have not verified its current discount here, so check the Anthropic pricing page. Batch is the cheapest way to run anything that can tolerate delayed, asynchronous responses.

Promotional pricing. Watch for time-boxed rates: Claude Sonnet 5 is $2.00 / $10.00 through August 31, 2026, then $3.00 / $15.00. Budget on the standard rate.

Cutting the bill

Whichever provider you pick, the same three levers apply, in this order.

1. Use the provider's caching. It is built in, and on stable-prefix workloads (agent loops, big frozen system prompts, linear conversations with steady traffic) it cuts input costs by up to ~90% on the cached portion. Know the fine print: exact prefix matching, and on Anthropic a write premium that needs at least one cache hit (5-minute TTL) or two (1-hour) to break even.

2. Use a smaller model where quality allows. The conversation table above spans $0.05 to $2.57 for identical traffic. Model choice is the biggest single lever on this page. Benchmark the cheap models on your real traffic before assuming you need the flagship.

3. Compress the conversation history. This is what PromptCrunch does, so weigh this part accordingly.

Where history compression fits, honestly

PromptCrunch is a proxy that shrinks old conversation history before forwarding to Anthropic or OpenAI. On long prose conversations (support, tutoring, coaching, companion chat) past roughly 20 turns, our own benchmarks show 60-75% fewer input tokens. Recent turns, code, and tool output pass through verbatim.

The caveats: coding-agent traffic saves almost nothing (0-7% measured), and requests that already use prompt caching pass through untouched, so we add nothing on top of a well-cached workload. If caching already covers you, you do not need us.

If your workload is long prose conversations, run your own numbers in the savings estimator, or read compression vs caching first.

Prices checked July 2026; always confirm on the provider's official pricing page: Anthropic · OpenAI.
Deeper dives: Claude API pricing · OpenAI API pricing.