DEV Community

Owen
Owen

Posted on • Originally published at ofox.ai

Best LLM API Providers 2026: 4 Types and What Each Costs

Best LLM API Providers 2026: 4 Types and What Each Costs

TL;DR: There are four ways to buy LLM tokens in 2026 and they are not competing on the same axis. Native APIs sell the canonical price and day-zero features. Open-weight hosts sell cheap tokens, from $0.05/M on Together's gpt-oss-20B. Routers sell one key across many vendors, typically at list price with the cost moved into payment fees, 5.5% on card top-ups at OpenRouter. Cloud platforms sell procurement, and charge for it: partner-cloud regional endpoints run 10% over global, and Vertex's priority tier is 1.8x standard. The same Claude Opus 5 call costs $5/$25 per 1M tokens on three of the four. What actually differs is everything around the token.

TL;DR: Which Type Should You Buy From?

Your situation Buy from Why
You need a model the week it ships Native API Partner clouds and routers lag on new SKUs and on new features
Your bill is dominated by one open-weight model Open-weight host Serverless per-token, then dedicated GPUs once you saturate them
You call four vendors and want one invoice Router One key, one balance, one wire format if you want it
Finance already approved a cloud commitment Cloud platform The spend lands on an invoice that exists, which is often the whole argument
You need sub-second first tokens on a small model Open-weight host Groq publishes 560 tok/s on its llama-3.1-8b-instant and 1000 tok/s on its openai/gpt-oss-20b, at its own prices
You want a fallback route without a second contract Router Failover is the product, not a feature you build
Your data must stay in one legal region Cloud platform or native residency Both offer it, both charge about 10% for it
You are still deciding which model to use Router Swapping a model ID is cheaper than swapping an integration

Two ways to stop reading here. If you spend under about $200 a month on tokens, buy directly from whichever lab makes the model you like and revisit this when the number gets interesting; every optimization below is worth less than the afternoon you would spend on it. If you already run production traffic across more than two vendors, skip to the hidden-cost table, because that is where your money is actually going.

The Four Types, Side by Side

The useful distinction is not brand. It is who runs the GPUs, who sets the price, and who sends the invoice.

Native API Open-weight host Router / aggregator Cloud platform
Examples OpenAI, Anthropic, Google, DeepSeek Together, Fireworks, Groq OpenRouter, ofox Bedrock, Vertex AI, Microsoft Foundry
Runs the inference Yes Yes No Yes, or resells the lab
Model catalog One lab's models Open-weight only Many labs, 100+ IDs The cloud's partner list
Sets the price Yes, this is list Yes, competitively Copies list, mostly List plus platform surcharges
New model on day one Yes For open weights, yes Usually within days Often weeks
Auth Bearer token Bearer token Bearer token IAM roles, SigV4, service accounts
Billing Card or invoice, per lab Card, per host One prepaid balance Your existing cloud invoice
Failover across vendors You build it You build it Built in Within one cloud's catalog
Best at Newest features, highest ceilings Cost per token Breadth and switching cost Procurement and compliance

Everything below is that table at length, with the numbers I could verify.

Type 1: Native APIs

Buying from the lab that trained the model is the default, and for most teams it stays the right answer longer than the internet suggests.

You get three things nowhere else gives you reliably. New models on release day. Features that only exist first-party, like Anthropic's fast mode, which the pricing docs state is available on the Claude API only and not on partner-operated platforms. And the highest published rate-limit ceilings, since every other route is buying capacity from the same place you would be.

Here is what the three big labs actually charge, per 1M tokens, checked 2026-08-02.

Model Input Cached input Output
Claude Fable 5 $10 $1 $50
Claude Opus 5 $5 $0.50 $25
Claude Sonnet 5 $2 (through Aug 31, then $3) $0.20 $10 (then $15)
Claude Haiku 4.5 $1 $0.10 $5
gpt-5.6-sol $5 $0.50 $30
gpt-5.6-terra $2 $0.20 $12
gpt-5.6-luna $0.20 $0.02 $1.20
gpt-5.5 $5 $0.50 $30
Gemini 3.6 Flash $1.50 $0.15 $7.50
Gemini 3.5 Flash-Lite $0.30 $0.03 $2.50

Two caveats before you use those numbers. OpenAI publishes separate short-context and long-context columns, and the figures above are the short-context tier. Long context is not a uniform multiplier: gpt-5.6-luna goes from $0.20/$1.20 to $0.40/$1.80, so input doubles while output rises by half. The Gemini figures are Vertex's Global tier, and several models in that line price non-global endpoints 10% higher, Gemini 3.5 Flash at $1.65/$9.90 against $1.50/$9.00.

Two things in that table are worth more than the headline prices. Every one of these labs discounts batch work by 50% on both input and output, which is the single largest lever available if any part of your workload can wait. And cached input runs at a tenth of fresh input across all three, so an agent with a stable system prompt is paying a fraction of what the list price implies. We worked that math out in detail in Anthropic vs OpenAI prompt caching.

The cost of going native is administrative and it compounds quietly. Four labs means four keys, four dashboards, four billing relationships, and four different rate-limit rulebooks that share no vocabulary. We compared five of those rulebooks side by side in LLM API rate limits compared and they disagree on almost everything, including what a "request" is.

Go native if you are standardized on one lab, if you need release-day access, or if your volume is large enough that you want a direct commercial conversation with someone. It stops being comfortable at the point where you are still evaluating models, where you want somewhere to fail over to on the afternoon one lab has a bad day, or where you are holding four keys and a finance team has started asking about them.

Type 2: Open-Weight Inference Hosts

This category exists because some model weights are public, which means the price is set by GPU economics rather than by whoever owns the model. Competition here is real, and the prices show it.

Model Host Input /1M Output /1M
gpt-oss-20B Together $0.05 $0.20
gpt-oss-20B Groq (openai/gpt-oss-20b) $0.075 $0.30
LFM2.5-8B-A1B Together $0.03 $0.12
gpt-oss-120B Together $0.15 $0.60
gpt-oss-120B Groq (openai/gpt-oss-120b) $0.15 $0.60
Qwen3.5-397B-A17B Together $0.60 $3.60
Llama 3.3 70B Together $1.04 $1.04
Llama 3.3 70B Groq (llama-3.3-70b-versatile) $0.59 $0.79
DeepSeek V4 Flash DeepSeek (native) $0.14 $0.28

Prices as published on each vendor's pricing page, checked 2026-08-02.

Read that table by row pairs, because the duplicated model names are the point. Same published weights, and what you pay depends on whose cluster they run on. Together is cheaper on gpt-oss-20B, $0.05/$0.20 against $0.075/$0.30. Groq is cheaper on Llama 3.3 70B, $0.59/$0.79 against a flat $1.04/$1.04. They tie on gpt-oss-120B. Nobody wins the category, which is what you get in a market where the product is commoditized and the differentiation is scheduling. It also means throughput and price do not travel together: Groq's 1000 tok/s belongs to Groq's gpt-oss-20B at Groq's price, not to Together's cheaper listing of the same weights.

Two structural things separate this category from the rest.

The first is that you can graduate off per-token pricing. Together publishes dedicated H100 instances at $5.49/hour on demand and GPU clusters at $3.99 per GPU-hour, dropping to $3.19 with a reservation. Fireworks lists on-demand GPUs at $7.00/hour for an H100 or H200, $10.00 for a B200 and $12.00 for a B300. That gives you a break-even you can compute: a single H100 at $5.49/hour is about $4,000 a month, so once your serverless bill on a 20B-class model passes that and your traffic is steady rather than spiky, dedicated starts to win. Spiky traffic keeps you on serverless longer than the arithmetic suggests, because you pay for the idle hours too.

The second is a trap worth naming. Model availability on these hosts is not a promise. Groq's model docs split their catalog into production and preview, and the preview language is unusually direct: those models are "intended for evaluation purposes only and should not be used in production environments as they may be discontinued at short notice." At the 2026-08-02 check that list included qwen/qwen3.6-27b. If you pin a preview model ID in production you have accepted a dependency that the vendor has told you in writing not to accept.

This category earns its place on high volume against public weights, on latency-critical small-model work, and on anything you might eventually want to pull in-house and self-host with the same outputs. It is the wrong place to be if you need a frontier closed model, or if you need one specific model ID to still exist next quarter.

Type 3: Routers and Aggregators

A router does not run inference. It terminates your request, decides which upstream gets it, forwards it, and hands you back a normalized response. What you are buying is the absence of integration work: one key, one balance, one wire format, and a fallback path you did not have to build.

The pricing question people ask about this category is whether there is a markup, and the answer for the two biggest is more interesting than yes or no.

OpenRouter states plainly that it does not mark up inference: "We pass through the pricing of the underlying providers; there is no markup on inference pricing (however we do charge a fee when purchasing credits)." The revenue moves to the payment layer instead. Its FAQ puts the card fee at "a 5.5% ($0.80 minimum) fee when you purchase credits," crypto at 5%, and bring-your-own-key routing at "5% of what the same model and provider would normally cost on OpenRouter" once you pass the first 1M BYOK requests in a month. On a $600 monthly token spend the card fee is about $33. At $10,000 it is $550. We itemized every charge in OpenRouter pricing: the hidden 5.5% fee, and looked at production reliability separately in Is OpenRouter reliable?.

Since ofox is also in this category, the fair thing is to check our own price sheet the same way. Every model page I pulled on 2026-08-02, against the vendor's published list price:

Model ID ofox listed Vendor list Match
anthropic/claude-opus-5 $5 / $25 $5 / $25 Yes
anthropic/claude-sonnet-5 $2 / $10 $2 / $10 Yes
openai/gpt-5.5 $5 / $30 $5 / $30 Yes
google/gemini-3.6-flash $1.50 / $7.50 $1.50 / $7.50 Yes
deepseek/deepseek-v4-flash $0.14 / $0.28 $0.14 / $0.28 Yes
openai/gpt-5.6-luna $1 / $6 $0.20 / $1.20 No, 5x over

Five out of six at list, one materially over it. The Luna row is not a rounding error: OpenAI cut that model's list price by 80% on 2026-07-30 and the listing still showed the pre-cut tier three days later. The lesson applies to every router including this one. A gateway price sheet is a snapshot, and vendor list prices move without warning, so check the model page for the exact model ID on the day you plan to call it rather than extrapolating from anyone's reputation for being cheap. Same finding we hit in DeepSeek V4 Flash vs Gemini 3.6 Flash.

The other thing to check before picking a router is which wire formats it speaks, because your tooling does not get a vote. Claude Code wants the Anthropic Messages shape. Codex CLI wants OpenAI's. A router exposing only one of them puts a translation layer in your path. ofox documents three base URLs, one per protocol: https://api.ofox.ai/v1 for OpenAI Chat Completions, https://api.ofox.ai/anthropic for Messages, https://api.ofox.ai/gemini for Gemini. Its /v1/models returned 122 model IDs across 12 provider prefixes when I called it on 2026-08-02.

A router pays for itself while you are still choosing models, once you call more than two vendors, when you want failover you did not have to build, or when one prepaid balance is easier to defend than four card-on-file relationships. It is the wrong layer if you need a brand new SKU on day one, if you need a first-party-only feature, or if you have negotiated a volume discount directly with a lab. In that last case going through anyone else is strictly worse.

There are more than two products in this category. We ranked seven of them, with migration notes, in 7 best OpenRouter alternatives, and the general selection framework is in the LLM API gateway guide.

Type 4: Cloud Platforms

Amazon Bedrock, Google Vertex AI and Microsoft Foundry sell a different product from everyone above, and pretending otherwise is how teams end up disappointed by them. They sell procurement. The model is a line item on an invoice your company already pays, inside an account your security team already reviewed, billed against a commitment you may already have signed. For a large enough organization that is worth real money, and the token price is close to irrelevant.

The surcharges are real and they are documented.

Surcharge Where Amount
Regional or multi-region endpoint Bedrock, Google Cloud 10% over global endpoints. Anthropic's docs scope this to Claude Sonnet 4.5, Haiku 4.5, Opus 4.5 "and all future models", so Opus 5 and Sonnet 5 are included
Priority service tier Vertex AI 1.8x standard. Google does not print the multiplier, but every Gemini row divides out to it: 3.6 Flash goes from $1.50/$7.50 to $2.70/$13.50
US-only inference geography Claude API, Claude Platform on AWS, Foundry 1.1x on all token categories, Claude 4.6 and later
Provisioned throughput Bedrock Per model unit per hour, with no-commitment, 1-month and 6-month rates. In the Cohere section's Provisioned Throughput table, Cohere Command runs $49.50, $39.60 and $23.77 respectively
Batch / Flex tier Bedrock, Vertex AI Discount, not a surcharge: 50% off standard

Billing mechanics differ too, in ways that matter to whoever reconciles the invoice. Claude Platform on AWS and Claude in Microsoft Foundry both bill in Claude Consumption Units at a fixed $0.01 per CCU, metered hourly and invoiced monthly. Anthropic's docs describe that as "Arrears only (postpaid); no prepaid credits," and your cloud bill shows one CCU line item rather than a per-model breakdown. If your cost attribution depends on seeing which model spent what, that reconciliation happens in the vendor console, not in Cost Explorer.

Bedrock also prices per region, with separate tables for US East, Frankfurt, Sydney and others, and it splits inference into Standard, Flex, Priority and Reserved tiers. Provisioned throughput is quoted per model unit per hour rather than per token, and for Anthropic models the page does not publish a rate at all: it tells you to reach out to your account team, which is a fair summary of the whole category. Vertex charges cached input at 10% of standard, the same ratio as first-party.

Buy here when you have committed spend to burn down, when procurement treats a new vendor as a quarter-long project, or when compliance gets easier the moment traffic stays inside an account you already own. Buy elsewhere when you want the newest model, the lowest price, or an API key rather than an IAM role. Auth in this category is real work: SigV4 signing or service-account credentials instead of a bearer token, a day of engineering the first time and a little more every time a new service needs access.

Pricing Math: The Same Workload, Four Ways

List prices do not answer the question people are actually asking, which is what the invoice says. Three workloads I see repeatedly, at the rates verified above.

Workload A. Customer-facing assistant on a frontier model. 20M input and 5M output tokens per month on Claude Opus 5.

Route Math Monthly
Anthropic direct, global endpoint 20 × $5 + 5 × $25 $225
Router at list price Same rates $225
Partner cloud, regional endpoint $225 × 1.10 $247.50
Anthropic Batch API, if the work can wait 20 × $2.50 + 5 × $12.50 $112.50

The type you buy from moves this bill by 10%. Whether the work can be batched moves it by 50%. That ordering holds for most teams, which is why "which provider is cheapest" is the wrong first question.

Workload B. Agent backend at volume. 200M input and 50M output tokens per month, cheap tier.

Route Math Monthly
DeepSeek V4 Flash, native rates 200 × $0.14 + 50 × $0.28 $42
gpt-oss-120B on Together 200 × $0.15 + 50 × $0.60 $60
gpt-5.6-luna, OpenAI list 200 × $0.20 + 50 × $1.20 $100
gpt-5.6-luna, via a listing still on the pre-cut tier 200 × $1 + 50 × $6 $500
Gemini 3.6 Flash 200 × $1.50 + 50 × $7.50 $675

The spread inside one quality tier is 16x, and one row of it is nothing but a stale price sheet. This is where checking the specific model page pays for itself in an afternoon.

Workload C. Offline classification. 500M input and 20M output tokens per month on Claude Haiku 4.5.

Route Math Monthly
Claude Haiku 4.5, Batch API at 50% off 500 × $0.50 + 20 × $2.50 $300
Claude Haiku 4.5, standard rates 500 × $1 + 20 × $5 $600
Gemini 3.6 Flash on Vertex, standard tier 500 × $1.50 + 20 × $7.50 $900
Gemini 3.6 Flash on Vertex, priority tier 500 × $2.70 + 20 × $13.50 $1,620

The first two rows are the same request to the same model, a factor of two apart, separated only by whether you were willing to wait. Add the model and tier choice and the spread across one unremarkable workload runs from $300 to $1,620. Almost nobody who could be running workload C in batch mode actually is.

The Costs That Don't Show Up on the Price Page

Every category has one line item that is invisible until it arrives.

Type The invisible cost What it looks like
Native Integration multiplied by vendor count Four SDKs, four retry policies, four rate-limit rulebooks with no shared vocabulary
Native Tokenizer changes Anthropic's docs note Claude 4.7 and later use a tokenizer producing about 30% more tokens for the same text, so a same-price model upgrade can still raise your bill
Open-weight host Idle GPU hours Dedicated capacity bills the trough as well as the peak; spiky traffic burns the break-even
Open-weight host Catalog churn A preview model ID can be withdrawn at short notice, by the vendor's own warning
Router Payment fees 5.5% card top-up at OpenRouter, plus 5% for BYOK past 1M monthly requests
Router Price-sheet lag The Luna row above: 5x over list for three days after a vendor cut
Cloud Auth engineering IAM roles and request signing instead of a bearer token, once per service
Cloud Surcharge stacking Regional 1.10 × priority 1.8 compound before you notice
All four Not batching 50% left on the table on every workload that could have waited an hour

The tokenizer line is the one nobody plans for. A model upgrade at identical per-token pricing can still raise your invoice if the new tokenizer is denser, and no price-comparison table will show you that.

When You Need Two Types, and When One Is Enough

One type is enough when your traffic runs on one or two models, an hour of downtime is an annoyance rather than an incident, and your monthly spend is small enough that a 10% difference is not worth an integration. That describes most teams for longer than they expect.

You want a second type once one of three things is true. A model outage costs you more than the fallback would cost to build, in which case a router is the cheapest second route because failover is what it sells. Your finance process cannot absorb another vendor, in which case a cloud platform solves a problem no amount of price optimization will. Or your volume on one specific model is large enough that a dedicated deployment beats per-token pricing, which puts you on an open-weight host regardless of what else you run.

The pairing that shows up most often is a native key plus a router. The native key carries primary traffic and gets you release-day models and the highest rate-limit ceiling. The router is the escape hatch, already integrated, holding a small balance, one model-ID string away from taking over.

What you should not do is buy a second vendor of the same type and call it redundancy. Two routers pointed at the same upstream provider fail together.

Switching Types Without Rewriting Your Client

Type selection is reversible because three of the four categories speak the OpenAI Chat Completions shape. Native OpenAI, most open-weight hosts and most routers accept the same request body, so the base URL and the model string are the only things that change.

Python

import os
from openai import OpenAI

ROUTES = [
    ("https://api.openai.com/v1",  "gpt-5.6-luna"),
    ("https://api.ofox.ai/v1",     "deepseek/deepseek-v4-flash"),
    ("https://api.ofox.ai/v1",     "anthropic/claude-opus-5"),
]

for base_url, model in ROUTES:
    client = OpenAI(base_url=base_url, api_key=os.environ["API_KEY"])
    r = client.chat.completions.create(
        model=model,
        messages=[{"role": "user", "content": "Summarize this in one line."}],
    )
    print(model, r.usage.total_tokens, r.choices[0].message.content[:80])
Enter fullscreen mode Exit fullscreen mode

Node

import OpenAI from "openai";

const routes = [
  ["https://api.openai.com/v1", "gpt-5.6-luna"],
  ["https://api.ofox.ai/v1", "deepseek/deepseek-v4-flash"],
  ["https://api.ofox.ai/v1", "anthropic/claude-opus-5"],
];

for (const [baseURL, model] of routes) {
  const client = new OpenAI({ baseURL, apiKey: process.env.API_KEY });
  const r = await client.chat.completions.create({
    model,
    messages: [{ role: "user", content: "Summarize this in one line." }],
  });
  console.log(model, r.usage.total_tokens, r.choices[0].message.content.slice(0, 80));
}
Enter fullscreen mode Exit fullscreen mode

Run that loop against your own prompts before committing to a type. Token counts vary more between models than prices do, and a model 3x cheaper per token that spends 4x the output tokens is not cheaper. The ofox model catalog has current per-model rates if you want today's numbers rather than this article's.

Cloud platforms are the category that does not fit this pattern, which is the honest reason they are more work. Bedrock and Vertex want signed requests and platform SDKs, so moving onto or off them is a migration rather than two edited strings.

Sources Checked for This Refresh

  • Anthropic model pricing, batch, caching, partner-cloud and CCU billing: platform.claude.com/docs/en/about-claude/pricing (checked 2026-08-02)
  • OpenAI GPT-5.x list pricing and batch discount: developers.openai.com/api/docs/pricing (checked 2026-08-02)
  • Vertex AI Gemini pricing, standard and priority tier tables, global vs non-global rates, batch discount: cloud.google.com/vertex-ai/generative-ai/pricing, which now redirects to the Agent Platform pricing page (checked 2026-08-02)
  • Amazon Bedrock pricing tiers, batch discount, provisioned throughput commitments, per-region tables: aws.amazon.com/bedrock/pricing (checked 2026-08-02)
  • OpenRouter fee structure, all quotes: openrouter.ai/docs/faq (checked 2026-08-02)
  • Together serverless, dedicated and cluster pricing: together.ai/pricing (checked 2026-08-02)
  • Fireworks on-demand GPU pricing: fireworks.ai/pricing (checked 2026-08-02)
  • Groq production vs preview model policy, per-token prices and throughput figures: console.groq.com/docs/models (checked 2026-08-02)
  • ofox per-model pricing and catalog size: model pages under ofox.ai/models/, plus a live GET /v1/models call; protocol base URLs from ofox.ai/llms-full.txt (checked 2026-08-02)

Originally published on ofox.ai/blog.

Top comments (0)