What is the best LLM API in 2026?

The right LLM API is the one whose bill, rate limits and data path you understand before you ship.

You're wiring a large language model into a SaaS feature, a support bot or an internal agent. Every provider bills by the token, a small chunk of a word, with one price per million tokens you send (input) and a higher one per million tokens the model writes back (output). The sticker prices look close. The real bills are not.

The short answer. Anthropic is our top pick for coding and agents: Sonnet 5.5 at $2 / $10, Haiku 5.5 at $0.10 / $0.50, and caching that doesn't eat into your input rate limit. OpenAI has the widest ladder, from $0.05 to $10 per million input tokens. Gemini is the only major API with a free tier on a current model. Mistral ships open-weight models at low prices. DeepSeek is the cheapest, and half price at night and on weekends (UTC). OpenRouter puts 600+ models behind one key.

What most "best LLM API" lists skip: spend caps and data terms. A new Anthropic account at the Start tier gets cut off at $500 a month. Gemini's free tier lets human reviewers read your prompts. DeepSeek stores data in China. We compared the six providers on those points as hard as on price.

Romain CochardCEO of Hack'celeration
Updated 20266providers ranked, prices from their official pages4other options covered, including Groq and Together AI$1.80a month for 10M input and 2M output tokens on Gemini 2.5 Flash-Lite

The ranking is editorial: a sponsored spot is always labeled on its card, and no affiliate link changes a score.

At a glance

The 6 LLM APIs side by side

This ranking is for developers, founders and product teams who call a model from code, from a few thousand to hundreds of millions of tokens a month. The starting price is each provider's cheapest current model, input then output, per million tokens. Flagship models cost 10 to 100 times more; each card lists them.

Best forWhat sets it apartFree planTeam sizeVisit
1AnthropicBest for coding and agentsCache reads at 1/20 of the price on Sonnet 5.5, outside input rate limits4.2/5$0.10 / $0.50 (Haiku 5.5)—Agents, coding tools, long documentsVisit →
2OpenAIWidest model rangeBatch and Flex at half price4.1/5$0.05 / $0.40 (gpt-5-nano)—Consumer apps, high volumeVisit →
3GeminiBest free tierFree tier on a current model4.0/5$0.10 / $0.40 (2.5 Flash-Lite)✓Prototypes, internal toolsVisit →
4Mistral AIBest open-weight optionSame model via API or self-hosted3.9/5$0.10 / $0.10 (Ministral 3 3B)✓Teams that may self-host laterVisit →
5DeepSeekCheapest per tokenOff-peak hours at half price3.8/5$0.15 / $0.60 (Flash, off-peak)—Bulk jobs on non-sensitive dataVisit →
6OpenRouterOne key, every model600+ models behind one API3.6/5Provider price + 5.5% on top-ups✓Model comparison and fallbackVisit →

USD per million tokens, input then output, from each provider's official pricing page in 2026. Mistral's free tier exists, but its limits only show inside the console.

Is your tool missing from this page? Email us: hello@hackceleration.com

How we scored

How we compared and scored

This page is for people who call a model from their own code: a developer adding an AI feature, a CTO picking a vendor, a founder automating support. It doesn't rank chat apps you use in a browser; for those, see our ranking of AI assistants for developers.

Price is 35% of the score. We read every price on the provider's own pricing page, then ran the same workload through each one: 10 million input tokens and 2 million output tokens a month, roughly a support bot answering a few thousand questions with your docs in context. We also logged cache pricing (input the provider has already seen, billed at a discount) and batch pricing (requests processed asynchronously), because those two levers move a bill more than the headline rate.

Data handling is 20%: where requests are processed, whether they train models, how long logs are kept, and whether zero data retention is on offer. Getting started is 15%: free tier, new-account rate limits and spend caps. Model range is 15%, and user feedback and support 15%, drawn from developer forums, complaints first.

  1. Price per million tokensInput, output, cache and batch rates, applied to 10M input and 2M output tokens a month.
    35%
  2. Data and privacyProcessing region, training on API data, log retention, zero data retention.
    20%
  3. Getting started and free tierFree tier, rate limits and monthly spend caps on a new account.
    15%
  4. Models and capabilitiesRange from small to frontier models, context window, open weights.
    15%
  5. User feedback and supportRecurring developer complaints, docs quality, support response.
    15%
6APIs ranked
4other options covered
2026pricing checked

No affiliate link changes a score or a rank.

For developers and product teams

LLM API prices drop every quarter. Get the changes before you overpay

One email when the ranking or prices change. Unsubscribe anytime.
1
Best for coding and agents

Anthropic

4.2/5

The Claude API is our first pick when the model has to plan, write code or chain tool calls. There are four tiers. Haiku 5.5 costs $0.10 per million input tokens and $0.50 per million output, as long as the prompt stays at 100K tokens or less; above that it jumps to $0.50 and $2.50. Sonnet 5.5, the workhorse, is $2 and $10. Opus 5.5 is $4 and $20, and Fable 5.1, the most capable, is $10 and $50.

Prompt caching is where Anthropic pulls ahead for agents. A cache read on Sonnet 5.5 costs $0.10 per million instead of $2. And for most Claude models, only uncached input tokens count toward your input-tokens-per-minute limit. At the Start tier that limit is 2,000,000 ITPM on Sonnet, Opus and Haiku, with 4,000 requests per minute. An agent that resends the same system prompt and files every turn gets cheaper and hits the ceiling later. Batch takes another 50% off.

On data: by default, Anthropic doesn't train on inputs or outputs from its commercial API. There's no EU region. If you need requests processed only in the US, US-only inference costs 1.1x the standard input and output price.

The catch is the monthly spend cap. Start tier stops at $500 a month, Build at $1,000, Scale at $200,000. Hit the cap and the API returns 429 errors until the first of the next month. Brand-new organizations can also start in an Evaluation tier, below standard limits. Fast mode on Opus 5.5 bills at twice the normal rate.

Hack: split usage into one workspace per project or customer, each with its own key and spend limit. Read our full Anthropic review for the rest.

Standout features
  • Sonnet 5.5 cache reads at $0.10 vs $2
  • 2M input tokens per minute at Start tier
  • No training on API data by default
+Pros
  • ✓Cached input doesn't count toward ITPM
  • ✓Batch at half price
  • ✓Four tiers from tiny to frontier
−Cons
  • ✗No EU processing region
  • ✗$500 monthly cap at Start tier
  • ✗Opus fast mode at 2x price
Verdict

The default choice for agents and coding products. If data must stay in the EU, look at Mistral or OpenAI's approved-account EU region instead.

See Claude API pricing →
2
Widest model range

OpenAI

4.1/5

OpenAI's price list has more rungs than anyone else's. At the bottom, gpt-5-nano is $0.05 input and $0.40 output per million tokens, and gpt-6-luna is $0.10 and $0.50. In the middle, gpt-6.1-terra runs $1 and $5, gpt-6.1-sol $2 and $10. At the top, gpt-6-astra is $10 and $50. Those rates apply to requests up to 272K input tokens.

Two modes cut the bill in half. Batch runs your requests asynchronously; Flex runs them when spare capacity is available. On gpt-6.1-sol, both bring the price to $1 input and $5 output. Going the other way, Fast mode (formerly Priority) doubles it, to $4 and $20. Cached input is cheap: $0.10 instead of $2 on gpt-6.1-sol.

On data: API traffic isn't used to train OpenAI models unless you opt in. Abuse-monitoring logs are kept for up to 30 days, and Zero Data Retention is available with approval. There's a European region (EEA plus Switzerland) at eu.api.openai.com, but only for accounts approved for those abuse-monitoring controls, under an amendment to your contract.

The catch: regional data-residency endpoints carry a 10% uplift on the newest models. And model names change several times a year, so pin the exact model version in your code. If you're weighing a move away, our page on switching from OpenAI covers the alternatives and the migration.

Hack: start classification, extraction and summarization jobs on gpt-6-luna. At $0.10 input it's 20 times cheaper than gpt-6.1-sol. Move up a tier only where your evals show the quality isn't there.

Standout features
  • gpt-5-nano at $0.05 per million input
  • Batch and Flex at half price
  • Zero Data Retention with approval
+Pros
  • ✓Five price points to match each task
  • ✓Cached input at 1/20 of the price on gpt-6.1-terra and gpt-6.1-sol
  • ✓No training on API data unless you opt in
−Cons
  • ✗10% uplift on regional endpoints
  • ✗EU region for approved accounts only
  • ✗Fast mode at 2x price
Verdict

The safest single-vendor bet, from email triage to long reasoning. For agents and code, Anthropic does better at a similar price.

See OpenAI API pricing →
3
Best free tier

Gemini

4.0/5

The Gemini API is the only big-name API with a free tier on a current model: Gemini 3.8 Flash works at no cost within free-tier limits. Paid prices start very low. Gemini 2.5 Flash-Lite is $0.10 input and $0.40 output per million tokens, 3.1 Flash-Lite $0.25 and $1.50, 3.5 Flash-Lite $0.30 and $2.50, and 3.8 Flash $0.75 and $3.75. Gemini 4 Argon, the most capable, is $2 and $10 for now, then $4 and $20 after the announced increase ($2 and $10 in batch), and isn't on the free tier.

Free comes with strings. On the free tier, Google uses your data to improve its products, and human reviewers may read, annotate and process your API input and output. Google's terms also say that if your app serves users in the EEA, the UK or Switzerland, you may use only paid services. Once you pay, your data is no longer used to improve the products.

Paid tiers unlock with history. Tier 1 needs a linked billing account and caps spend at $250. Tier 2 needs $100 already paid and 3 days, with a $2,000 cap. Tier 3 needs $1,000 and 30 days. Requests-per-day quotas reset at midnight Pacific time.

The catch: the lineup shifts under you. Gemini 2.5 Pro and 2.5 Flash are deprecated and will be routed to 3.8 Flash and 3.5 Flash-Lite at the end of 2026. Two prices also double: Gemini 4 Argon is set to go to $4 and $20 soon, and Gemini 3.8 Flash to $1.50 and $7.50 in early 2027. Your cost and output can change without a single code change. Our Gemini review covers the rest.

Hack: build and test on the free tier, then link billing before launch. You move to Tier 1 the same day, and your traffic drops out of product-improvement use.

Standout features
  • Gemini 3.8 Flash on the free tier
  • 2.5 Flash-Lite at $0.10 / $0.40
  • Gemini 4 Argon at $2 / $10 in batch after the announced increase
+Pros
  • ✓Only free tier on a current model
  • ✓Flash-Lite among the cheapest anywhere
  • ✓Daily quotas reset at midnight PT
−Cons
  • ✗Free tier: humans may read prompts
  • ✗Free tier off-limits for EEA, UK, Swiss users
  • ✗2.5 models rerouted at end of 2026
Verdict

The best place to prototype for free. For production with real users' data, switch on billing from day one.

See Gemini API pricing →
4
Best open-weight option

Mistral AI

3.9/5

Mistral AI, the French lab, is one of the providers here whose current models ship with open weights, alongside OpenAI's gpt-oss and DeepSeek's V4. Mistral Small 4 and the Ministral 3 family are Apache 2.0, and Mistral Large 4 is open-weight under Mistral's own license. Call them through the API now, self-host later, keep the same model.

Prices are low for a frontier-class lineup. Mistral Large 4 is $0.70 input and $2.10 output per million tokens; Small 4 is $0.15 and $0.60. The small Ministral 3 models charge the same for input and output: $0.10 for 3B, $0.15 for 8B, $0.20 for 14B. Codestral, the coding model, is $0.30 and $0.90. Mistral also hosts third-party models such as GLM 5.3 and DeepSeek V4.1 Flash, and its moderation model is free.

On data, get the processing region written into your contract. Read the data processing addendum closely: Mistral may train on customer data unless the customer has opted out. Flip that switch before you send anything real.

The catch: the free tier's limits aren't published anywhere, only in the console. And Mistral's marketing page still quotes an older Large price ($0.50 / $1.50) that contradicts the docs; budget from the docs.

Hack: for ticket tagging or field extraction, Ministral 3 8B at $0.15 per million for both input and output costs a quarter of Small 4's output price.

Standout features
  • Mistral Large 4 at $0.70 / $2.10
  • Small 4 and Ministral 3 under Apache 2.0
  • Provider based in France
+Pros
  • ✓Open weights you can self-host
  • ✓Low prices across the lineup
  • ✓European provider
−Cons
  • ✗Trains on your data unless you opt out
  • ✗Free-tier limits not published
  • ✗Narrower lineup than the US labs
Verdict

The pick if you want an exit to self-hosting or serve EU customers. For the hardest agent work, Anthropic stays ahead.

See Mistral AI pricing →
5
Cheapest per token

DeepSeek

3.8/5

DeepSeek is the cheapest capable API in this ranking. deepseek-flash (V4.1 Flash) costs $0.30 input and $1.20 output per million tokens at peak, and cached input drops to $0.006. deepseek-v4-pro, the stronger model, is $1.32 and $3.96. deepseek-flash and deepseek-v4-pro both take a 1M-token context and can write up to 384K tokens in one response.

The twist is off-peak pricing, at half the peak rate. Peak runs 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday; everything else, evenings and weekends included, is off-peak. deepseek-flash drops to $0.15 and $0.60 off-peak.

The catch is a hard one: DeepSeek's privacy policy says it collects, processes and stores personal data in the People's Republic of China. For customer data, that's a legal question before it's a technical one.

Hack: if you want DeepSeek's price without sending data to China, other hosts serve the same model. Mistral and Together AI list DeepSeek V4.1 Flash at $0.30 / $1.20.

Standout features
  • deepseek-flash at $0.15 / $0.60 off-peak
  • Cached input at $0.006
  • 1M-token context, 384K output (flash and v4-pro)
+Pros
  • ✓Lowest price at this quality
  • ✓Half price evenings and weekends UTC
  • ✓Huge output limit
−Cons
  • ✗Data stored in China
  • ✗A non-starter for regulated customer data
  • ✗Quality may vary through resellers
Verdict

Unbeatable for bulk work on public or scrubbed data. Once customer data is involved, run the same model on a host outside China.

See DeepSeek pricing →
6
One key, every model

OpenRouter

3.6/5

OpenRouter isn't a model, it's a router. One key and one API format put 600+ models behind a single endpoint, from Anthropic, OpenAI, Google, Mistral, DeepSeek and more. Switching models means changing one string.

You pay the provider's price plus a 5.5% platform fee (Standard plan) each time you buy credits. Bring your own provider keys (BYOK) and the first $25,000 of usage a month carries no fee, then 5%. Rate limits pass through from the provider. The free tier offers 25+ free models at 50 requests a day and 20 a minute, rising to 1,000 free requests a day once you've bought $10 in credits.

The catch is everything around the routing. OpenRouter reserves the right to expire unused credits a year after purchase, refunds unused credits only within 24 hours, and never refunds platform fees or crypto payments.

Hack: top up in small amounts. With credits that can expire after a year, paying the 5.5% more often beats parking a large balance. And for the one model you run in production every day, go direct.

Standout features
  • 600+ models behind one key
  • BYOK fee-free up to $25,000 a month
  • Free tier on 25+ models
+Pros
  • ✓Swap models without code changes
  • ✓Great for comparing before you commit
  • ✓Free tier to try
−Cons
  • ✗5.5% fee on every top-up
  • ✗Credits can expire after a year
  • ✗Poorly rated support
Verdict

The right tool to pick a model and keep an exit. Once you've chosen, going direct is cheaper and removes a middleman.

See OpenRouter pricing →
Real monthly cost

What an LLM API actually costs per month

Same workload for everyone: 10 million input tokens and 2 million output tokens a month, about what a support bot sends when it answers a few thousand tickets with your docs in context. Official list prices, USD, before tax.

On a small model

Gemini 2.5 Flash-Lite: $1.80. Claude Haiku 5.5: $2. gpt-6-luna: $2. Mistral Small 4: $2.70. deepseek-flash: $5.40 at peak, $2.70 off-peak. At this price point, answer quality on your task matters far more than the bill.

On a mid-tier model

Mistral Large 4: $11.20. Grok 4.3: $17.50. gpt-6.1-terra: $20. Gemini 3.8 Flash: $30 from early 2027 ($15 before). Claude Sonnet 5.5 and gpt-6.1-sol: $40 each, or $20 on Sonnet in batch. Gemini 4 Argon: $80 after the announced increase ($40 before). That's a spread of more than 7x between models teams actually ship.

What caching changes

Say 8 of those 10 million input tokens are the same system prompt and docs on every call. On Sonnet 5.5, those 8 million cost $0.80 as cache reads instead of $16. Input drops from $20 to $4.80, before cache-write costs. For an agent, that's usually the first saving to chase.

  • Does the price jump above a prompt size (100K, 200K, 272K tokens)?
  • Is there prompt caching, and what does a cache read cost?
  • Can part of your traffic go through batch at half price?
  • Where are requests processed, and is API data used for training?
  • What's the monthly spend cap on a new account?
  • Do prepaid credits expire?
Not ranked

Other options worth knowing

These names come up in every developer thread. They're not ranked because they target a narrower job, or overlap with a ranked provider. Here's when they earn a look.

01

Grok (xAI): cheap output tokens

Cheap output

grok-4.3 costs $1.25 input and $2.50 output per million tokens, with a 1M-token context. grok-4.7 is $2 and $6, but past 200K prompt tokens the whole request bills at $4 and $12. xAI offers a global endpoint and a US endpoint (us.api.x.ai), and says itself that a regional endpoint isn't a full data-residency guarantee. Zero data retention is available per team. More in our Grok review.

Price
grok-4.3: $1.25 / $2.50
Score
3.8/5 in our review
02

Groq: raw speed

Speed

Groq serves open models at very high speed. gpt-oss-20b outputs around 1,000 tokens per second for $0.075 input and $0.30 output per million; gpt-oss-120b does 500 tokens per second for $0.15 and $0.60. Llama models are sold through sales. A good fit for voice agents and UIs where every second shows.

Price
gpt-oss-120b: $0.15 / $0.60
Speed
Up to 1,000 tokens/s
03

Together AI: open models, no GPUs

Open models

Together AI runs the big open models serverless: Kimi K3 at $3 / $15, Qwen3.7-Max at $1.50 / $4.50, DeepSeek V4 Pro at $1.32 / $3.96, gpt-oss-120B at $0.15 / $0.60, and Llama 3 8B Lite at $0.14 for both input and output. A clean way to stay on open weights without renting a server.

Price
From $0.14 / $0.14
Best for
Open models, no infra
04

Hugging Face: the open-model catalog

Catalog

Hugging Face is the reference library for open models, and routes to several inference providers from one account. We didn't rank it because there's no single price list to compare. When you need a niche model (a rare language, a narrow domain), that's where you'll find it. See our Hugging Face review.

Score
4.3/5 in our review
Best for
Niche models
Pitfalls

What blows up an LLM API bill

These come straight from developer forums and pricing fine print. None of them shows on the first pricing table you look at.

01

Finding the spend cap on launch day

Getting started

An Anthropic org at the Start tier is cut off at $500 of spend a month. At the cap, the API returns 429 until the first of the next month. Gemini Tier 1 caps at $250. Ask for the next tier a week before launch, not the day your product goes dark.

Anthropic Start
$500 a month
Gemini Tier 1
$250
02

Crossing a context price threshold

Price

Several price lists change with prompt size. Haiku 5.5 input goes from $0.10 to $0.50 above 100K tokens. grok-4.7 doubles past 200K, for the entire request. OpenAI's listed rates hold up to 272K. A RAG pipeline (retrieving docs before answering) that stuffs too much context can cross the line silently.

Haiku 5.5
5x above 100K
grok-4.7
2x above 200K
03

Shipping Gemini's free tier to production

Privacy

On Gemini's free tier, human reviewers may read your prompts and responses, and Google uses them to improve its products. Users in the EEA, the UK or Switzerland may only be served on paid services. A free prototype that quietly becomes your production backend is outside the terms.

Rule
Paid only for EEA, UK, CH users
04

Letting a deprecated model pick for you

Maintenance

Gemini 2.5 Pro and 2.5 Flash get routed to 3.8 Flash and 3.5 Flash-Lite at the end of 2026. Your code doesn't change, but the model, its price and its behavior do. Pin model versions and keep a small eval set to rerun after each switch.

Affected
Gemini 2.5 Pro and 2.5 Flash
05

Prepaying too much at a router

Price

OpenRouter may expire unused credits a year after purchase and only refunds within 24 hours. The 5.5% platform fee is never refunded. Measure a month of real usage before you top up big.

Expiry
Possible after a year
Cost hacks

Spend less without losing quality

These settings come from the official price lists and from developers who pay their own invoices. They stack.

01

Batch everything that can wait

-50%

OpenAI, Anthropic and Google all price batch at half. Nightly reports, backfilling tags on old tickets, enriching a CRM: none of it needs a sub-second answer. On Sonnet 5.5, our sample workload drops from $40 to $20.

Saving
50%
02

Cache the prompt prefix that never changes

Up to -95%

Put the stable parts first: instructions, examples, reference docs. On Sonnet 5.5, cache reads cost $0.10 instead of $2 and don't count toward ITPM. On gpt-6.1-terra, cached input is $0.05 instead of $1.

Sonnet 5.5
$0.10 vs $2
03

Route each task to the right model

Architecture

A pattern keeps coming up among teams that stay on budget: reasoning on a strong model like Sonnet, extraction and classification on a cheap one, and a deterministic rules-based router in code rather than one more model call. Haiku 5.5 input is 20 times cheaper than Sonnet 5.5.

Gap
20x on input
04

Schedule bulk jobs off-peak

DeepSeek

DeepSeek charges half outside peak hours, which means all weekend in UTC. A job that starts Friday evening and finishes Sunday pays the off-peak rate throughout. Keep this for data with nothing personal in it.

Saving
50%
05

Price US-only inference before you need it

Compliance

If a customer contract requires US-only processing, Anthropic charges 1.1x the standard rate for it. OpenAI's data-residency endpoints add 10% on the newest models. Build that 10% into your quote before the security review, not after.

Uplift
+10%
Hack'celeration Lab

Wiring an LLM into n8n, Make or your own product? Get our next automation guides

No fluff. Unsubscribe anytime.
FAQ

Your questions about LLM APIs

  • What is the cheapest LLM API?

    Among the major providers, DeepSeek: deepseek-flash is $0.15 input and $0.60 output per million tokens off-peak. For a smaller model, OpenAI's gpt-5-nano starts at $0.05 input and Gemini 2.5 Flash-Lite at $0.10.

  • Is there a free LLM API?

    Yes. Gemini 3.8 Flash is free within free-tier limits, but human reviewers may read your data. OpenRouter gives 50 requests a day on 25+ free models. Mistral has a free tier too, with limits shown only in the console.

  • Which LLM API is best for coding?

    Anthropic. Sonnet 5.5 at $2 / $10 handles most coding work, and caching cuts the cost of resending a large codebase on every call. Codestral, Mistral's coding model, is a cheaper option at $0.30 / $0.90.

  • Do LLM APIs train on my data?

    Not by default at Anthropic, OpenAI, or Google on paid tiers. Gemini's free tier does use your data to improve products. Mistral may train on it unless you opt out, so check that setting before sending customer data.

  • Should I use OpenRouter or go direct?

    OpenRouter to compare and switch models, direct for production. The router adds 5.5% on every credit purchase, and credits can expire after a year.

  • How do I avoid 429 errors at launch?

    A 429 means a rate limit or a spend cap. At Anthropic, the monthly cap blocks you until the first of the next month, so ask for the next tier before launch. Use caching, which doesn't count toward input limits, and move bulk jobs to batch.

  • What does "per million tokens" mean?

    A token is a small chunk of a word, the unit a model reads and writes. Providers bill input (what you send) and output (what the model writes) separately, and output costs anywhere from the same as input to a little over eight times more, depending on the model. Sonnet 5.5, for instance, is $2 in and $10 out.

  • Is there a zero data retention option?

    Zero Data Retention exists at OpenAI with approval and at xAI per team. Anthropic doesn't train on API data by default and offers US-only processing at 1.1x. Ask each vendor for its contract terms before sending regulated data.

Before you sign

A new model ships every month. Get the updated ranking when it moves

One email per ranking change. Unsubscribe anytime.