Guides
July 8, 2026
By Andrew Day

LLM Model Pricing in July 2026: Every Major API and Open Model

A research-grounded July 2026 map of LLM pricing: OpenAI, Anthropic, Google, xAI, Amazon, and Mistral APIs, the leading open-weight models, and what open-model hosts (Together AI, Groq, Fireworks, Hugging Face, DeepInfra, and more) actually charge per token.

Share this post

Send it to someone managing cloud or AI spend.

LinkedInX

Use this when you want one current, apples-to-apples view of what large language models cost in July 2026 — across the closed-API frontier, the open-weight models that now match it, and the hosting providers (Together AI, Groq, Fireworks, Hugging Face, and others) that serve those open models.

The fast answer: in July 2026 the LLM market has three price tiers that matter. Closed frontier APIs (GPT-5.5, Claude Opus 4.8, Gemini 3.1 Pro) run roughly $2–$5 per 1M input and $9–$30 per 1M output. Open-weight models (DeepSeek V4, Llama 4, Qwen 3.6, GLM-5, GPT-OSS) hosted on specialist providers are 5–50x cheaper per token — often $0.05–$0.60 per 1M. And the same open model costs different amounts depending on which host serves it, because Together AI, Groq, Fireworks, DeepInfra, and Hugging Face each price their own hardware and margin. "Cheapest" depends on your workload shape and which host you route to, not on a single rate card.

Pricing pages have never been harder to compare. Closed vendors quote per-token rates by model family. Open-model hosts quote per-token rates that differ for the same weights. Aggregators add a credit fee. Cloud marketplaces bury it in a region matrix. This guide puts all three worlds in one place, in the same units, for July 2026.

If you want to compare what these choices mean after deployment — the actual bill, not the rate card — see AI cost monitoring. For a closed-API-only deep dive, the companion AI API pricing guide has the full closed-vendor breakdown.

Quick answer

For a July 2026 snapshot:

  • Closed frontier APIs are the premium tier: GPT-5.5 and Claude Opus 4.8 sit at $5 input / $25–$30 output per 1M tokens. You pay for managed reliability, tooling, and the top of the reasoning frontier.
  • Open-weight models have stopped being the budget alternative and become a default. DeepSeek V4, Llama 4, Qwen 3.6, GLM-5, and OpenAI's GPT-OSS family match closed models on many workloads at a fraction of the price.
  • Open-model hosting is a market of its own. The same GPT-OSS-120B model is ~$0.15/$0.60 on Groq, ~$0.039/$0.19 on DeepInfra, and ~$0.35/$0.75 on Cerebras — because you are buying each provider's hardware, throughput, and margin, not just the weights.
  • The trap is that "cheap" is fragile. A model switch, a prompt-length change, or a routing tweak can erase the savings overnight. Track spend by workload, not by the rate card. See LLM cost monitoring.

How to read LLM pricing in 2026

Almost all text LLMs are still priced per million tokens, split into input (the prompt you send) and output (the response generated). A token is roughly 0.75 English words, so ~1,300 tokens per 1,000 words. Three rules carry most of the cost math:

  1. Output is priced higher than input — usually 3–6x. Output-heavy workloads (long generations, agents) are dominated by the output rate; retrieval-heavy RAG is dominated by the input rate.
  2. Context size can change the rate, not just the volume. Several 1M-context models (Claude, Gemini) move to higher long-context pricing above 200K input tokens. See long-context pricing above 200K tokens.
  3. Caching and batch are real discounts. Cached input and Batch APIs commonly cut 50% each and can stack. On some hosts (Groq, Fireworks) a cached + batched call runs at ~25% of the on-demand rate.

The formula that turns any rate card into a monthly estimate:

Monthly cost = ((input_tokens/1,000,000 × input_rate)
             +  (output_tokens/1,000,000 × output_rate))
             ×  requests_per_month

Closed frontier APIs (July 2026)

These are the managed, proprietary-weight APIs. Rates below are the current list prices for this July 2026 snapshot.

Provider Model Input ($/1M) Output ($/1M) Notes
OpenAIGPT-5.5$5.00$30.00Current GA flagship; cached input $0.50; 1M context
OpenAIGPT-5.5 Pro$30.00$180.00Highest-effort reasoning tier
OpenAIGPT-5 Mini$0.25$2.00Cached input $0.025; low-cost tier
AnthropicClaude Opus 4.8$5.00$25.00Current premium tier; up to 1M context (tiered)
AnthropicClaude Sonnet 4.6$3.00$15.00Daily-driver default; long-context premium above 200K
AnthropicClaude Haiku 4.5$1.00$5.00Fast, lower-cost tier
GoogleGemini 3.1 Pro$2.00$12.00Higher rates above 200K input
GoogleGemini 3.5 Flash$1.50$9.00Cached input $0.15; GA; up to 1M context
GoogleGemini 2.5 Flash Lite$0.10$0.40Cheapest Gemini text tier
xAIGrok 4.3$1.25$2.50Cached input $0.20; 1M context; tool calls billed separately
xAIGrok 4.1-fast$0.20$0.50Cheap fast tier
MistralMistral Large 3*~$2.00~$6.00Dynamic pricing page; also available open-weight (Apache 2.0)
MistralMistral Small 4*~$0.15~$0.60Low-cost tier; confirm SKU at checkout
AmazonNova (Bedrock)varies by tiervaries by tierMicro/Lite/Pro/Premier; region + service tier (Standard/Priority/Flex) change price

Mistral rates are market-quoted ranges; validate the exact SKU and deployment path at checkout.

How to think about the closed tier: at the flagship level, OpenAI and Anthropic have converged — GPT-5.5 and Claude Opus 4.8 share the $5 input rate and differ mainly on output ($30 vs $25). The real spread is at the low end (Gemini 2.5 Flash Lite, GPT-5 Mini, Grok 4.1-fast) and in the batch/cache discounts. For the head-to-head, see OpenAI vs Anthropic pricing. Bedrock and Vertex are governance choices as much as price choices — Bedrock vs Vertex AI pricing covers what teams actually pay.

Open-weight models (July 2026)

In 2026 open-weight models stopped being the budget option and became the default for high-volume work. These are openly downloadable weights (licenses vary — open-weight is not always OSI open-source), served either self-hosted or through the hosting providers in the next section. Representative served-API rates:

Model Family / license Input ($/1M) Output ($/1M) Notes
DeepSeek V4 ProDeepSeek / MIT~$1.74~$3.481.6T total / 49B active MoE; 1M context; cache-hit input materially lower
DeepSeek V4 FlashDeepSeek / MIT~$0.14~$0.28284B total / 13B active; reset the cost floor for frontier-ish quality
GLM-5Zhipu / open-weight~$1.05~$3.50Leads open-weight intelligence indexes; strong long-horizon coding
Qwen 3.6Alibaba / Apache-2.0 variants~$0.09–$0.50~$0.10–$3.00Compact MoE; strong tool-calling + vision; wide host spread
Llama 4 ScoutMeta / community license~$0.11~$0.34Managed-endpoint economics; broadly hosted
GPT-OSS 120BOpenAI / open-weight~$0.04–$0.35~$0.19–$0.75Rate depends heavily on host (see below)
GPT-OSS 20BOpenAI / open-weight~$0.075~$0.30Very low unit cost tier
Kimi K2.6Moonshot / open-weight~$0.75~$3.50Coding-focused; K2.7 Code variant cuts thinking tokens ~30%
MiniMax M3MiniMax / open-weightlow-costlow-costCheap 1M-token context + native multimodality
Mistral Small 4Mistral / Apache-2.0~$0.15~$0.60Same weights as the API tier; self-hostable

The headline is unit economics: an open-weight model like DeepSeek V4 Flash or GPT-OSS-120B can be 10–50x cheaper per token than a closed flagship, and several now clear the quality bar for classification, extraction, summarization, and bulk coding. The trade-off moves from "quality vs price" to "who operates it, and at what reliability." See Closed vs open AI models in 2026 for the portfolio framing.

Open-model hosting providers (July 2026)

This is the part most pricing guides skip. The same open weights cost different amounts depending on who serves them — because you are renting that provider's hardware, throughput, and margin. Below is what the leading hosts charge and how their pricing models differ.

Host Pricing model Example rate (open model) Best for
Together AI Flat per-token, no cached-input discount; also GPU rental + fine-tuning Llama 3.3 70B ~$0.88/1M; DeepSeek V4 Pro ~$2.10/$4.40; catalog $0.05–$9/1M Broadest open catalog + fine-tuning (LoRA ~$8–12 per 1M training tokens)
Groq Per-token on custom LPU hardware; batch and caching each −50% (stackable to ~25%) GPT-OSS-120B $0.15/$0.60 (cached in $0.075); Llama 3.1 8B from $0.05; Qwen3-32B $0.29/$0.59 Latency-critical + high-throughput at aggressive token economics
Fireworks AI Serverless per-token with Fast/Priority tiers; batch −50%, cached input −50% ~$0.20/1M (8B class) to ~$0.90/1M (70B class); blended median ~$0.84/1M Production serving with tuning + speed tiers; now also on Azure AI Foundry
DeepInfra Owns its inference stack; per-token price is the price (no aggregator margin) GPT-OSS-120B $0.039/$0.19; DeepSeek V4 Flash $0.10/$0.20; Llama 3.1 8B $0.02/$0.05 Cheapest direct per-token for many specific open models
Hugging Face Inference Providers routing at pass-through provider rates (no HF markup); PRO $9/mo bundles credits. Inference Endpoints bill hourly GPU/CPU Routed = underlying provider rate; Endpoints from ~$0.033/hr CPU, GPU tiers upward One key across many hosts + open catalog; dedicated endpoints when you need them
OpenRouter Aggregator; no markup on inference, ~5.5% fee on credit purchase; routes across hosts Underlying host rate + credit fee; auto-routes to cheapest/available provider One API across many hosts + failover, without committing to one backend
Cerebras Per-token on wafer-scale hardware; very high throughput GPT-OSS-120B ~$0.35/$0.75; ~$0.50–$1.50/1M depending on model; ~3,000 tok/s Fastest single-stream generation for interactive/agentic latency
SambaNova Per-token on RDU hardware; persistent free tier + starter credits Competitive per-token on Llama 3.x (incl. 405B) and Qwen tiers Fast inference with a genuine free tier for evaluation
Baseten Per-token serverless + dedicated deployments ~$0.50/1M on popular open models; dedicated GPU pricing for reserved capacity Teams wanting managed dedicated deployments with autoscaling
Replicate Compute-time billing (per-second GPU) rather than pure per-token Priced by GPU-seconds of the run; now part of Cloudflare Custom/GPU-heavy models and image/video where per-token doesn't fit

The one number that matters most: the price of the same model varies wildly by host. GPT-OSS-120B is ~$0.039/$0.19 on DeepInfra, ~$0.15/$0.60 on Groq, and ~$0.35/$0.75 on Cerebras. That is not a quality difference in the weights — it is a difference in hardware, speed, and margin. The cheapest per-token host is not automatically the best value: Groq and Cerebras charge more but deliver dramatically higher throughput, which can lower total cost for latency-bound or agentic workloads that would otherwise stall.

How to choose a hosting provider

  • Optimizing pure per-token cost at scale? DeepInfra (owns its stack, no aggregator margin) and Together AI (broad catalog) are the usual starting points.
  • Latency- or throughput-bound (chat, agents, tool loops)? Groq and Cerebras win on speed, which often beats a lower per-token rate on total cost.
  • Want one API across many hosts with failover? OpenRouter (aggregator) or Hugging Face Inference Providers (pass-through routing) — you trade a small fee for portability.
  • Need fine-tuning or dedicated capacity? Together AI (LoRA fine-tuning), Fireworks (tuning + speed tiers), or Baseten (dedicated deployments).
  • GPU-heavy or non-text models? Replicate's compute-time model fits better than per-token.
  • Enterprise governance already on a hyperscaler? Route open models through Bedrock or Vertex Model Garden — see Hugging Face vs direct provider APIs.

What this costs in practice

A worked example — a content-moderation classifier: 400-token input, 50-token output, 2M requests/month.

Model / host Input ($/1M) Output ($/1M) Monthly cost
Claude Haiku 4.5 (Anthropic API)$1.00$5.00(0.4×$1.00 + 0.05×$5.00) × 2,000 = $1,300
GPT-5 Mini (OpenAI API)$0.25$2.00(0.4×$0.25 + 0.05×$2.00) × 2,000 = $400
GPT-OSS-120B on Groq$0.15$0.60(0.4×$0.15 + 0.05×$0.60) × 2,000 = $180
GPT-OSS-120B on DeepInfra$0.039$0.19(0.4×$0.039 + 0.05×$0.19) × 2,000 = $50

Same task, ~26x spread — driven first by open vs closed, then by which host serves the open model. This is exactly why the rate card is a starting point, not an answer: the only number that matters is what the workload actually bills once it is live.

The pricing traps to watch

  • Output-length blindness. Output is 3–6x input. A verbose system prompt or an agent that "thinks out loud" quietly multiplies the output bill.
  • Long-context cliffs. Claude and Gemini move to higher rates above 200K input tokens. RAG pipelines that grow their retrieved context drift over the cliff without anyone changing a model.
  • Same-model host drift. Routing a model through a different host (or letting an aggregator re-route) can change your effective rate 3–10x with no code change.
  • Idle GPU on dedicated endpoints. Hugging Face Endpoints, Baseten dedicated, and self-hosting bill for capacity, not tokens — an always-on GPU costs the same at 5% utilization as at 95%.
  • Tool-call and feature surcharges. xAI bills web/X/code tool calls separately; several hosts price vision and audio differently from text.

Every one of these is invisible on a pricing page and obvious on the invoice. That gap is the whole reason to monitor spend by workload rather than trust the rate card.

FAQ

What is the cheapest way to run an LLM in July 2026?

For most high-volume text workloads, an open-weight model (GPT-OSS, Llama 4, DeepSeek V4 Flash, Qwen 3.6) on a direct-stack host like DeepInfra or Together AI is the cheapest per token — often $0.04–$0.20 per 1M input. The cheapest closed option is a low tier like Gemini 2.5 Flash Lite ($0.10/$0.40) or GPT-5 Mini ($0.25/$2.00). "Cheapest overall" and "cheapest for your workload" are different questions — see cheapest AI API for chat, RAG, and coding.

Why does the same open model cost different amounts on different hosts?

Because you are paying for the provider's hardware, throughput, and margin — not the weights, which are free to download. In July 2026, GPT-OSS-120B is roughly $0.039/$0.19 on DeepInfra, $0.15/$0.60 on Groq, and $0.35/$0.75 on Cerebras. The pricier hosts typically deliver far higher tokens-per-second, which can reduce total cost on latency-bound or agentic workloads even at a higher per-token rate.

Are open models actually cheaper than closed APIs once you include infrastructure?

On hosted open-model providers (Together AI, Groq, Fireworks, DeepInfra, Hugging Face), yes — you pay per token with no infrastructure to run, and the rates are 5–50x below closed flagships. If you self-host, you must add GPU, autoscaling, observability, and on-call costs, which only pay off at steady high volume. Most teams start managed and self-host later.

What do the open-model hosting providers charge?

Roughly, per 1M tokens on popular open models in July 2026: DeepInfra is the cheapest direct (e.g. GPT-OSS-120B $0.039/$0.19); Groq runs $0.05–$0.60 with batch/cache discounts; Fireworks spans ~$0.20 (8B) to ~$0.90 (70B); Together AI's catalog spans $0.05–$9; Cerebras is ~$0.50–$1.50 with the highest throughput. Hugging Face routes at pass-through provider rates (no markup), and OpenRouter aggregates hosts with ~5.5% credit fee and no inference markup.

How do I compare LLM providers on price fairly?

Put every option in the same units ($/1M input and $/1M output), estimate your average input and output tokens per request, multiply by monthly volume, and apply any batch/cache discount you can actually use. Then validate against real spend — list prices ignore retries, tool calls, long-context cliffs, and idle capacity. StackSpend does this continuously across providers: AI cost monitoring.

Track LLM spend across every provider

The hard part of LLM pricing in 2026 isn't any single rate card — it's that a modern stack spans a closed API, one or two open-model hosts, and sometimes an aggregator on top, each invoicing separately in different units on different cycles. The combined picture doesn't exist unless you build it.

Connect your providers to StackSpend for one view of total LLM spend, model-level breakdown, daily anomaly detection, and pace-to-forecast alerts — so a model switch or a runaway agent is caught the day it moves, not on the invoice. Start with LLM cost monitoring or provider setup guides for OpenAI, Anthropic, and Hugging Face.

Related reading

References

Share this post

Send it to someone managing cloud or AI spend.

LinkedInX

Know where your cloud and AI spend stands — every day.

Connect providers in minutes. Get 90 days of visibility and start receiving daily cost updates before the invoice lands.

14-day free trial. No credit card required. Plans from $29/month.
LLM Model Pricing (July 2026) — StackSpend Blog