waynetools

Guides · LLM & Structured Output

LLM API Pricing Comparison (July 2026)

Every major model's API price in one table — GPT-5.6 Sol / Terra / Luna, Claude Fable 5, Opus 4.8, Sonnet 5, Haiku 4.5, and Gemini 3.5 / 3.1 / 3 — plus what three real production workloads actually cost per month at these rates.

Prices verified 2026-07-11 Refreshed monthly USD per 1M tokens
Direct answer

As of July 2026, GPT-4.1 nano is the cheapest mainstream LLM API ($0.10/1M input · $0.40/1M output). Among current-generation models, Gemini 3 Flash ($0.50 / $3.00) leads on price, Claude Sonnet 5 ($2 / $10) leads mid-tier value, and Claude Fable 5 ($10 / $50) is the premium frontier tier.

§1 · The full price table

List prices in USD per 1 million tokens, verified against the official OpenAI, Anthropic and Google pricing pages on 2026-07-11. "Blended 3:1" shows the effective per-1M rate for a typical workload with 3 input tokens per output token — a more honest single number for comparing models than input price alone.

ModelInput $/1MOutput $/1MBlended 3:1Tier
GPT-4.1 nano$0.10$0.40$0.18budget
Gemini 3 Flash$0.50$3.00$1.13budget
Claude Haiku 4.5$1.00$5.00$2.00budget+
GPT-5.6 Luna$1.00$6.00$2.25budget+
Gemini 3.5 Flash$1.50$9.00$3.38mid
Claude Sonnet 5$2.00$10.00$4.00mid
Gemini 3.1 Pro$2.00$12.00$4.50mid
GPT-5.6 Terra$2.50$15.00$5.63mid
Claude Opus 4.8$5.00$25.00$10.00frontier
GPT-5.6 Sol$5.00$30.00$11.25frontier
Claude Fable 5$10.00$50.00$20.00frontier+

Blended 3:1 = (3 × input + 1 × output) ÷ 4. List prices only — batch APIs and prompt caching lower real spend (see §4). Tiers are price bands, not quality rankings.

Want these numbers for your prompt? Paste it and compare all eleven models side by side.

Open token cost calculator →

§2 · What real workloads cost per month

Per-token prices are abstract; invoices are not. Three common production shapes, computed exactly from the table above.

Workload A — Support chatbot · 100k calls/mo · 800 in / 250 out per call

Monthly volume: 80M input + 25M output tokens.

ModelMonthly cost
GPT-4.1 nano$18
Gemini 3 Flash$115
Claude Haiku 4.5$205
GPT-5.6 Luna$230
Claude Sonnet 5$410
Gemini 3.1 Pro$460
GPT-5.6 Terra$575
Claude Opus 4.8$1,025
Claude Fable 5$2,050

Workload B — RAG answerer · 10k calls/day · 6,000 in / 400 out

Monthly volume (30 days): 1,800M input + 120M output tokens. Input-heavy: the input rate dominates everything.

ModelMonthly cost
GPT-4.1 nano$228
Gemini 3 Flash$1,260
Claude Haiku 4.5$2,400
GPT-5.6 Luna$2,520
Gemini 3.5 Flash$3,780
Claude Sonnet 5$4,800

Workload C — Extraction pipeline · 1M docs/mo · 2,000 in / 150 out

Monthly volume: 2,000M input + 150M output tokens — the classic "structure everything" batch job.

ModelMonthly cost
GPT-4.1 nano$260
Gemini 3 Flash$1,450
Claude Haiku 4.5$2,750

Extraction at this volume is exactly where structured outputs pay off: shorter, schema-constrained answers cut the expensive output side. See the JSON Schema builder and structured output validator.

§3 · How to read this table (three rules)

§4 · Below list price: caching, batching, routing

Every number above is list price. Three standard discounts change real invoices:

Exact discount rates change more often than base prices, so we keep them qualitative here — check your provider's pricing page the week you ship, and plug the current numbers into the calculator (every price field is editable).

§5 · FAQ

What is the cheapest LLM API right now (July 2026)?

GPT-4.1 nano at $0.10/1M input and $0.40/1M output. It is a previous-generation small model, so quality-sensitive tasks usually step up to Gemini 3 Flash ($0.50/$3.00), Claude Haiku 4.5 or GPT-5.6 Luna ($1.00 input) — still an order of magnitude below frontier pricing.

Why do output tokens cost more than input tokens?

Generation happens one token at a time and monopolizes accelerator time; input processing parallelizes. Providers price accordingly — 4–6× everywhere in the July 2026 table. Practical consequence: response-length discipline (max-token caps, structured outputs, terse formats) beats prompt-trimming for savings.

Which model should I pick for RAG?

For input-heavy RAG, input price dominates: GPT-4.1 nano and Gemini 3 Flash are the volume picks, Haiku 4.5 the accuracy step-up. Reserve mid/frontier models for the final answer-synthesis call, not for every retrieval pass.

How current are these prices, and how often do they change?

Verified 2026-07-11 against the official OpenAI, Anthropic and Google pricing pages; this page is refreshed monthly (the badge at the top shows the verification date). Providers typically reprice at model launches — several times a year — so confirm before committing to volume contracts.

§6 · Related tools