development
Best LLM APIs
The best LLM APIs compared in depth — the Anthropic, OpenAI and Google first-party APIs, the enterprise gateways (AWS Bedrock, Microsoft Foundry, Google Vertex AI) and unified layers like OpenRouter, Together, Fireworks, Cerebras and Groq, with per-token pricing, context windows, data-retention terms and picks for every builder.
Quick answer: The best LLM API for most teams is the Anthropic API, because it serves Claude Opus 5.5 ($4/$20 per million tokens), which launched in September with the highest score the independent Artificial Analysis Intelligence Index had measured (58), and holds 40% of enterprise LLM API spend in Menlo Ventures’ survey, ahead of OpenAI on 27% and Google on 21%. For the broadest ecosystem and the cheapest frontier-tier model, the OpenAI API, because GPT-6.1 Sol scored 52 on the same index at its September launch, at $2/$10. For a free tier, the Google Gemini API, because every Gemini Flash model, including Gemini 3.8 Flash, can be called without payment. For every model through one key, OpenRouter, because it adds no per-token markup. For the fastest open-model inference, Cerebras, because Artificial Analysis measures it at 1,719 output tokens per second on gpt-oss-120B. For governed enterprise deployments, the gateway on the cloud you already run: AWS Bedrock, Microsoft Foundry or Google Vertex AI.
The current state of LLM APIs
The LLM API market has split into three distinct layers, and choosing well means choosing the layer before you choose the vendor.
The first-party provider APIs — OpenAI, Anthropic, Google, xAI, DeepSeek and Mistral — give you the newest models first, the deepest feature set, and the lowest latency to that vendor’s own weights. The enterprise gateways — AWS Bedrock, Microsoft Foundry and Google Vertex AI — put many vendors’ models behind one governed surface with your cloud’s identity, logging and data-residency controls. The aggregators and inference specialists — OpenRouter, Together AI, Fireworks AI, Cerebras and Groq — either unify every provider behind a single endpoint or serve open-weight models faster and cheaper than the labs do themselves.
Four shifts define the current moment. First, the capability gap narrowed: independent platform comparisons now put the difference between leading models at roughly 5–15%, so compliance, pricing and integration drive more real-world impact than raw model choice (EPC Group). Second, the price floor collapsed: OpenAI’s GPT-6 Luna and Anthropic’s Claude Haiku 5.5 both list at $0.10/$0.50 per million tokens, and the open-weight DeepSeek V4.1-Flash at $0.15/$0.60 off-peak, against $20 to $50 per million output tokens for the flagships. Third, cost-control features became standard: prompt caching (roughly a 10x discount on repeated context) and Batch APIs (50% off asynchronous work) are now available across the major first-party platforms. Fourth, the OpenAI-compatible endpoint became the lingua franca: Groq, Together, Fireworks, OpenRouter, xAI and DeepSeek all accept the OpenAI SDK with a changed base URL, so switching providers is increasingly a configuration change, not a rewrite.
One availability caveat sits above all of this: not every high-scoring model is on general release. Anthropic’s Claude Mythos 5.1 is limited to vetted organisations. For everyday API work, Claude Opus 5.5 is generally available, and it launched with the highest Intelligence Index score Artificial Analysis had measured.
The three types of LLM API
Match the layer to the job before comparing vendors within it.
| Type | What it is | Examples | Best when |
|---|---|---|---|
| First-party provider API | Direct access to one lab’s own models | OpenAI, Anthropic, Google Gemini, xAI, DeepSeek, Mistral | You want the newest models first, the full feature set and the lowest latency |
| Enterprise cloud gateway | Many vendors’ models behind one governed cloud surface | AWS Bedrock, Microsoft Foundry, Google Vertex AI | You need in-region data, IAM/audit governance and one procurement path |
| Aggregator / unified API | One endpoint that routes to many providers | OpenRouter, Together AI, Fireworks AI | You want multi-model flexibility, failover and no per-vendor contracts |
| Fast-inference specialist | Optimised serving of (mostly open) models | Cerebras, Groq, Together, Fireworks | Latency and tokens-per-second are the priority |
Most production systems use more than one layer: a first-party API for the flagship model, a cheap open-weight endpoint for high-volume routine calls, and a gateway for governed or region-locked workloads.
Top LLM APIs ranked
Ranked by overall suitability for a team starting a new build today, weighting model access, developer experience, price, reliability and lock-in. The flagship price is the headline per-million-token input/output rate for that platform’s strongest generally-available model, drawn from our model pages.
| Rank | API | Type | Flagship model | Price (in/out per MTok) | Best for |
|---|---|---|---|---|---|
| 1 | Anthropic API | First-party | Claude Opus 5.5 | $4 / $20 | Top model quality and agentic reliability |
| 2 | OpenAI API | First-party | GPT-6 Astra | $10 / $50 | Broadest ecosystem; GPT-6.1 Sol at $2 / $10 |
| 3 | Google Gemini API | First-party | Gemini 3.8 Flash | $0.75 / $3.75 (to 31 Dec 2026) | Best free tier |
| 4 | OpenRouter | Aggregator | Hundreds of models | Passthrough + 5.5% credit fee | Multi-model access through one key |
| 5 | AWS Bedrock | Cloud gateway | Claude, GPT, Nova, Llama, Mistral | Near-direct passthrough | Governed enterprise on AWS |
| 6 | Google Vertex AI | Cloud gateway | Gemini 3.8 Flash + Model Garden | Near-direct passthrough | Governed enterprise on GCP |
| 7 | Microsoft Foundry | Cloud gateway | GPT-6 Astra + catalogue | Near-direct passthrough | Governed enterprise on Microsoft |
| 8 | Together AI | Aggregator / inference | Open-weight catalogue | Per-model, open-weight rates | Open-model hosting and fine-tuning |
| 9 | Fireworks AI | Inference specialist | Open-weight catalogue | Per-model, open-weight rates | Fast open-model production |
| 10 | Cerebras | Inference specialist | gpt-oss-120B | Per-model, open-weight rates | Fastest measured output speed |
| 11 | Groq | Inference specialist | Open-weight catalogue | Per-model, open-weight rates | Low latency across a wider open-model list |
Also worth knowing: the xAI API serves Grok 4.7 at $2/$6, the DeepSeek API serves DeepSeek V4.1-Flash at $0.15/$0.60 off-peak, and Mistral’s La Plateforme is the European first-party option with EU data residency, with Mistral Large 4 at $0.70/$2.10 and its weights open to self-host.
The best LLM APIs compared
We’ve ordered these by suitability for a new build, not by company size. Every price is the list per-million-token rate for the platform’s strongest generally available model.
1. Anthropic API — best model quality
Type: First-party Flagship: Claude Opus 5.5 ($4/$20 per million tokens, 1M-token context) Also serves: Claude Sonnet 5.5 ($2/$10; 56 on the Artificial Analysis Intelligence Index at launch), Claude Haiku 5.5 ($0.10/$0.50 for prompts up to 100,000 tokens), the Mythos-class Claude Fable 5.2 ($8/$40; 65 on the Artificial Analysis Intelligence Index v5.0.1 at its 9 November launch), and earlier models including Fable 5.1 ($10/$50), including Opus 5 ($5/$25) and Sonnet 5 ($2/$10) Key features: Prompt caching, Message Batches (50% off), a 1M-token context charged at standard rates on every current model except Haiku 5.5, tool use, Files API, native MCP support
The Anthropic API gives direct access to Claude Opus 5.5, which Artificial Analysis scored 58 on its independent Intelligence Index at its September launch, the highest it had measured, and to Claude Sonnet 5.5, which scored 56 at its launch six days later, at half the token price. Anthropic holds 40% of enterprise LLM API spend in Menlo Ventures’ survey of nearly 500 US enterprise decision-makers, published on 9 December 2025, ahead of OpenAI on 27% and Google on 21% (Menlo Ventures). Every current Claude model has a 1M-token context window, and prompt caching and the Batch API cut costs on repeated-context and asynchronous work. Anthropic published no SWE-bench figure for Opus 5.5 or Sonnet 5.5.
Why it wins: A flagship that launched with the highest Intelligence Index score Artificial Analysis had measured, the largest share of enterprise API spend, and a well-documented API that has become the reference implementation for tool use and MCP. Anthropic does not train on API inputs by default.
Limitations: Claude only — no multi-vendor choice from this endpoint. Opus 5.5 costs twice GPT-6.1 Sol per token, and Sonnet 5.5 cost $7.60 per completed index task at max effort on Artificial Analysis’s measurement, more than Opus 5.5’s $5.98.
Best for: Teams that want the highest model quality and reliable agentic behaviour, and are comfortable standardising on one vendor.
2. OpenAI API — broadest ecosystem
Type: First-party Flagship: GPT-6 Astra ($10/$50 per million tokens) Also serves: GPT-6.1 Sol ($2/$10), GPT-6 Sol ($2/$10), GPT-6 Luna ($0.10/$0.50), GPT-5.6 Sol ($4/$20, promotional to 21 November 2026), GPT-5.5 ($5/$30), GPT-5.4 ($2.50/$15), embeddings, image and audio models Key features: Responses API, Batch API (50% off), structured outputs, function calling, Realtime API, fine-tuning, the most widely supported SDKs
The OpenAI API is the first stop for most developers because of reach. Its SDK is the de facto standard that most other providers emulate, and it covers the widest surface — text, embeddings, image generation, speech and a Realtime API for voice agents — from one account. When GPT-6.1 Sol launched on 29 September, Artificial Analysis scored it 52 on its Intelligence Index v4.3, a point below GPT-6 Astra, at a fifth of Astra’s price and $0.72 per completed index task. GPT-6 Luna, at $0.10/$0.50, cost $0.07 per completed task at its 22 September launch. OpenAI’s price list charges more for long prompts: GPT-6 Astra’s long-context rate is $20/$75.
Why it wins: The broadest ecosystem, the most portable SDK, the widest range of modalities under one API, and, at GPT-6.1 Sol’s launch, the cheapest frontier-tier model per completed task. OpenAI does not train on API data by default.
Limitations: GPT-6 Astra’s $10/$50 is two and a half times Opus 5.5’s token price for a lower index score. OpenAI published no SWE-bench figure for GPT-6 Astra. Long prompts carry a surcharge.
Best for: Teams that want one vendor covering text, voice, vision and embeddings, and value ecosystem maturity over squeezing the lowest price.
3. Google Gemini API — best free tier
Type: First-party Flagship: Gemini 3.8 Flash ($0.75/$3.75 per million tokens to 31 December 2026; $1.50/$7.50 from 1 January 2027) Also serves: Gemini 3.1 Pro ($2/$12 up to 200K tokens; $4/$18 above; listed as a preview), and Flash-Lite models from $0.10/$0.40 Key features: A free tier on every Flash model, Google Search grounding, Batch mode (50% off), context caching
The Google Gemini API — accessed through Google AI Studio — has the most usable free tier of the first-party APIs: Google’s price list shows a free tier for every Flash model, including Gemini 3.8 Flash. On the paid tier, Gemini 3.8 Flash costs $0.75/$3.75 until 31 December 2026 and $1.50/$7.50 after. Gemini 4 Argon, which Artificial Analysis scored 53 on its index at its 30 September launch, has been on the paid API since 13 October 2026 at $2/$10 per million tokens until 30 November, then $4/$20. Gemini 4 Carbon, which had the top score on the index’s v5.0 at its 28 October launch, joined it on the paid API on 10 November at the same prices and dates. For production and data governance, the same models are available through Vertex AI with enterprise terms.
Why it wins: A free tier on current models, Google Search grounding as a native feature, and low paid prices on the Flash line.
Limitations: Content sent on the free tier is used to improve Google’s products, so route anything sensitive through the paid Gemini API or Vertex AI, where it is not. Gemini 4 Carbon’s and Argon’s introductory prices double after 30 November, and Gemini 3.8 Flash’s on 1 January 2027.
Best for: Prototyping, cost-sensitive builds, and anyone who wants a real free tier to test against.
4. OpenRouter — best unified, multi-model gateway
Type: Aggregator Models: Hundreds of models from the major labs and open-model hosts Pricing: No per-token markup; a 5.5% fee ($0.80 minimum) on card credit purchases, 5% on crypto (OpenRouter) Key features: One API key for every major model, automatic provider failover, a normalised OpenAI-compatible schema, free-model tier, per-request routing
OpenRouter solves the multi-vendor problem: one key, one billing relationship and one schema reach models from Anthropic, OpenAI, Google, DeepSeek, Meta, Mistral, xAI and dozens more. It passes through each provider’s price with no per-token markup and takes a 5.5% fee on credit top-ups instead (OpenRouter). If a provider returns an error, OpenRouter falls back to the next one automatically. Its free models allow 50 requests a day, or 1,000 a day once an account has bought $10 of credits, and it does not log prompts or completions unless you opt in.
Why it wins: Genuine multi-model flexibility with near-direct pricing and built-in redundancy, all behind one OpenAI-compatible endpoint.
Limitations: You are one hop further from each provider, so the newest models and the deepest provider-specific features can arrive later than on the first-party API. The 5.5% credit fee is a small tax on top of raw token cost.
Best for: Teams that want to compare models cheaply, avoid vendor lock-in, or add automatic failover without integrating each provider separately.
5. AWS Bedrock — broadest governed enterprise catalogue
Type: Cloud gateway Models: Anthropic’s Claude, OpenAI’s GPT models, Amazon Nova, Llama, Mistral, Cohere and others behind one AWS surface Pricing: Near-direct passthrough, billed through AWS Key features: IAM identity, CloudTrail audit logging, Bedrock Guardrails, Agents and Knowledge Bases, in-region data, no data retention
AWS Bedrock offers the broadest third-party model catalogue of the enterprise gateways, with mature agent and guardrails frameworks (EPC Group). It now carries both leading closed labs’ models: Anthropic’s Claude line, and OpenAI’s GPT-6 Astra and GPT-6.1 Sol, which became generally available there in September 2026 (AWS). Models run inside your AWS account with IAM permissions, CloudTrail logging and in-region data handling, and Bedrock does not retain or train on your prompts. For a team already on AWS, it turns “add an LLM” into an IAM policy rather than a new vendor contract.
Why it wins: The widest governed model selection plus AWS-native identity, logging and compliance — the safe default for regulated industries already on AWS.
Limitations: The newest frontier models can land on the first-party API before they reach Bedrock. Cross-region and quota management add operational overhead, and it only makes sense if AWS is already your platform.
Best for: Enterprises on AWS that need many models under one governed, audited, in-region surface.
6. Google Vertex AI — best for GCP and Gemini enterprise
Type: Cloud gateway Models: First-party Gemini plus a Model Garden that includes Anthropic, Llama and Mistral Pricing: Near-direct passthrough, billed through GCP Key features: 1M-token context, Google Search grounding, BigQuery integration, in-region data, no training on your data
Google Vertex AI is the enterprise path to Gemini, adding governance, MLOps and deep BigQuery integration to the same models available on the Gemini API. Its Model Garden also hosts third-party models including Anthropic’s Claude and Meta’s Llama, so it is not Gemini-only. For teams whose data already lives in Google Cloud, Vertex keeps everything — retrieval, grounding and serving — inside one governed environment.
Why it wins: The enterprise home for Gemini’s grounded models, with native access to BigQuery data.
Limitations: Best value comes from committing to the Google ecosystem; the third-party catalogue is narrower than Bedrock’s. Setup is heavier than calling the Gemini API directly.
Best for: Enterprises on Google Cloud, and any team that wants Gemini with Search grounding under governed terms.
7. Microsoft Foundry — best for Microsoft and OpenAI enterprise
Type: Cloud gateway Models: OpenAI models (GPT-6 Astra, GPT-6.1 Sol, GPT-6 Sol and Luna) plus a partner catalogue that includes Anthropic’s Claude Pricing: Near-direct passthrough, billed through Azure Key features: Deepest Microsoft-stack integration, FedRAMP High and enterprise compliance, content safety, in-region data, no training on your data
Microsoft Foundry — formerly Azure AI Foundry, the platform that absorbed Azure OpenAI and Azure AI Studio — is the enterprise route to OpenAI’s models with Microsoft’s compliance posture, including FedRAMP High certification (EPC Group). Its catalogue lists GPT-6 Astra, GPT-6.1 Sol, GPT-6 Sol and GPT-6 Luna (Microsoft), and Anthropic’s Claude models are served there too. For organisations standardised on Microsoft 365, Entra ID and Azure, it puts those models behind identity, logging and data-residency controls you already run.
Why it wins: The strongest Microsoft-ecosystem integration and the most enterprise-hardened path to OpenAI’s models, with the deepest public-sector compliance coverage.
Limitations: Weighted toward the OpenAI line; other vendors’ newest models can arrive later. Value depends on already being a Microsoft-stack organisation.
Best for: Regulated and public-sector enterprises on Microsoft that want OpenAI models under Azure governance.
8. Together AI — best for open-model hosting and fine-tuning
Type: Aggregator / inference specialist Models: A large open-weight catalogue — Llama, DeepSeek, Qwen, Kimi, GLM and more Pricing: Per-model, at open-weight rates; dedicated endpoints available Key features: Fast serverless inference, fine-tuning, dedicated GPU endpoints, OpenAI-compatible API
Together AI specialises in serving open-weight models at production quality and letting you fine-tune them. It is the natural home if your strategy is open models — you get serverless inference for spiky traffic, dedicated endpoints for steady load, and a fine-tuning pipeline, all behind an OpenAI-compatible API. Artificial Analysis tracks 14 Together endpoints, including DeepSeek V4.1 Flash, Kimi K3, GLM-5.3, Qwen 3.8 and gpt-oss-120B; the fastest, DeepSeek V4.1 Flash, runs at 278 output tokens per second.
Why it wins: The most complete platform for building on open-weight models, from serverless calls to fine-tuning to dedicated capacity.
Limitations: You give up access to the closed frontier models (Claude, GPT, Gemini) that only their makers serve. Running your own fine-tunes shifts more of the serving and evaluation burden onto your team.
Best for: Teams committed to open-weight models that need hosting, fine-tuning and dedicated capacity in one place.
9. Fireworks AI — best for fast open-model production
Type: Inference specialist Models: Open-weight catalogue tuned for speed Pricing: Per-model, at open-weight rates Key features: Low-latency optimised serving, fine-tuning, function calling, OpenAI-compatible API
Fireworks AI sits close to Together but leans harder into latency-optimised serving of open models. For high-throughput production workloads on open weights — retrieval pipelines, classification, high-volume generation — it offers fine-tuning and function calling built in. Artificial Analysis tracks seven Fireworks endpoints, including Kimi K3, GLM-5.3-Flash, MiniMax M3 and Llama 3.3 70B; the fastest runs at 425 output tokens per second. Like the other specialists, it accepts the OpenAI SDK with a changed base URL, so trialling it against Together or Groq is a configuration change.
Why it wins: Fast, cost-efficient production serving of open-weight models with a clean migration path from the OpenAI SDK.
Limitations: Open models only; no closed-frontier access. Feature depth is narrower than a first-party API’s full surface.
Best for: High-volume open-model workloads where latency and cost per token decide the economics.
10. Cerebras — fastest inference
Type: Inference specialist Models: Open-weight models served on Cerebras’s own wafer-scale chips Pricing: Per-model, at open-weight rates Key features: The highest measured output speed, function calling, JSON mode
Cerebras serves open-weight models on its own wafer-scale hardware. Artificial Analysis measures it at 1,719 output tokens per second on gpt-oss-120B, against 701 for SambaNova and 471 for Groq on the same model. Artificial Analysis tracks two Cerebras endpoints, both gpt-oss-120B, with a 131,000-token context window.
Why it wins: The highest output speed Artificial Analysis measures on a model that several providers serve, by a factor of more than two.
Limitations: A narrow model list, open weights only, and a higher price for gpt-oss-120B than most of the other hosts in Artificial Analysis’s comparison.
Best for: Real-time applications where output speed decides the experience and an open-weight model is good enough.
11. Groq — low latency across a wider open-model list
Type: Inference specialist Models: Open-weight catalogue served on custom LPU hardware Pricing: Per-model, at open-weight rates Key features: LPU-based serving, OpenAI-compatible API, free tier
Groq runs open-weight models on its own Language Processing Unit (LPU) hardware. Artificial Analysis measures it at up to 910 output tokens per second on gpt-oss-20B, 471 on gpt-oss-120B and 326 on Llama 3.3 70B, across the six Groq endpoints it tracks. Groq’s own figure is over 1,000 tokens per second (Groq). On gpt-oss-120B it is third for output speed, behind Cerebras and SambaNova. Its OpenAI-compatible API makes it a drop-in test.
Why it wins: High throughput at open-weight pricing across more models than Cerebras serves, behind a standard OpenAI-compatible endpoint.
Limitations: Restricted to the open-weight models Groq hosts — no closed-frontier access. Cerebras is faster on the model both serve.
Best for: Latency-sensitive applications that need a choice of open-weight models.
Feature comparison: the full matrix
| Feature | Anthropic | OpenAI | Gemini API | OpenRouter | Bedrock | Vertex AI | Microsoft Foundry | Together | Fireworks | Groq |
|---|---|---|---|---|---|---|---|---|---|---|
| Type | First-party | First-party | First-party | Aggregator | Gateway | Gateway | Gateway | Aggregator | Inference | Inference |
| Model choice | Claude only | OpenAI only | Gemini only | Hundreds | Multi-vendor | Gemini + garden | OpenAI + catalogue | Open-weight | Open-weight | Open-weight |
| Prompt caching | Yes | Yes | Yes | Provider-dependent | Yes | Yes | Yes | Model-dependent | Model-dependent | Limited |
| Batch API (50% off) | Yes | Yes | Yes | No | Model-dependent | Yes | Yes | No | No | No |
| Structured outputs | Yes | Yes | Yes | Provider-dependent | Yes | Yes | Yes | Yes | Yes | Yes |
| Fine-tuning | Limited | Yes | Yes | No | Yes | Yes | Yes | Yes | Yes | No |
| OpenAI-compatible | Partial | Native | Partial | Yes | Via SDK | Via SDK | Native | Yes | Yes | Yes |
| Trains on your data | No (default) | No (default) | Paid: no / free: may | No | No | No | No | No | No | No |
| Free tier | Limited | Limited | Yes (generous) | Yes (free models) | No | Trial credits | Trial credits | Trial credits | Trial credits | Yes |
None of the mainstream first-party APIs or enterprise gateways train on API inputs by default. The one exception is Google’s free tier, where content is used to improve Google’s products, which is why sensitive work belongs on the paid Gemini API or Vertex AI.
Pricing comparison: what you’ll actually pay
Model prices by platform (per million tokens, USD)
| Model | Platform(s) | Input | Output | Notes; index score at launch¹ |
|---|---|---|---|---|
| GPT-6 Luna | OpenAI, Microsoft Foundry | $0.10 | $0.50 | $0.07 per completed Artificial Analysis index task; index 37 |
| Claude Haiku 5.5 | Anthropic, Bedrock, Vertex, Microsoft Foundry | $0.10 | $0.50 | Prompts up to 100,000 tokens; $0.50/$2.50 above; index 43 |
| Muse Ember | Meta Model API | $0.10 | $0.50 | $0.30/$1.50 above 200,000 tokens; index 36 (v5.0.1) |
| DeepSeek V4.1-Flash | DeepSeek API | $0.15 | $0.60 | Off-peak; doubles in peak hours; MIT weights; index 39 |
| MiniMax M3 | MiniMax API, open-model hosts | $0.30 | $1.20 | Open weights, 1M context |
| Gemini 3.8 Flash | Gemini API, Vertex AI | $0.75 | $3.75 | To 31 December 2026; $1.50/$7.50 after; index 41 |
| Grok 4.7 | xAI API | $2.00 | $6.00 | Index 46 |
| GPT-6.1 Sol | OpenAI, Bedrock, Microsoft Foundry | $2.00 | $10.00 | Index 52; $0.72 per completed task |
| Claude Sonnet 5.5 | Anthropic, Bedrock, Vertex, Microsoft Foundry | $2.00 | $10.00 | Index 56; $7.60 per completed task at max effort |
| Gemini 3.1 Pro | Gemini API, Vertex AI | $2.00 | $12.00 | Up to 200K tokens; $4/$18 above |
| Claude Opus 5.5 | Anthropic, Bedrock, Vertex, Microsoft Foundry | $4.00 | $20.00 | Index 58, the highest measured at its launch |
| Claude Fable 5.2 | Anthropic, Bedrock, Vertex, Microsoft Foundry | $8.00 | $40.00 | Index 65 (v5.0.1); Mythos-class; $26.54 per completed task at max effort |
| GPT-6 Astra | OpenAI, Bedrock, Microsoft Foundry | $10.00 | $50.00 | Index 53; $20/$75 on long prompts |
¹ Each model’s Artificial Analysis Intelligence Index score and cost per task at launch (v4.3 or its v4.3.2 revision, or v5.0.1 where marked), from its page on this site. GPT-6 Astra and Gemini 3.8 Flash launched before v4.3 came out, so theirs are from when Artificial Analysis tested them on v4.3 on 7 September. Claude Fable 5.2 and Muse Ember launched on v5.0.1, which scores lower than v4.3, so their figures are not comparable with the others. Current scores are on the best AI models board.
Gateway platforms (Bedrock, Vertex AI, Microsoft Foundry) bill these models at near-direct passthrough rates plus your cloud’s usual overheads; OpenRouter passes through at or near direct rates with a 5.5% fee on credit purchases. Two levers cut the effective cost more than switching models: prompt caching (roughly 10x cheaper on repeated context) and Batch APIs (50% off for asynchronous work). Watch the tokenizer, too — newer flagship models can emit more tokens for the same text, so compare per-request cost, not just the per-token rate.
Cost strategy: route by task, not loyalty. Pin routine, high-volume calls to GPT-6 Luna, Claude Haiku 5.5 or an open-weight model on Cerebras, Groq, Together or Fireworks, reserve a flagship like Claude Opus 5.5 or GPT-6 Astra for the hard 20%, and use caching and Batch APIs wherever the workload allows.
Use-case recommendations
For the best model quality
Winner: Anthropic API with Claude Opus 5.5 ($4/$20)
The model that launched in September with the highest Artificial Analysis Intelligence Index score it had measured (58), and the reference API for tool use and MCP. Claude Sonnet 5.5 scored 56 at its launch, at half the token price.
For the broadest ecosystem
Winner: OpenAI API with GPT-6 Astra
One account covers text, embeddings, image, speech and a Realtime API, behind the SDK everyone else emulates. The best default when you want one vendor across every modality. Alternative: Anthropic if model quality outranks breadth.
For the lowest cost
Winner: OpenAI API with GPT-6 Luna ($0.10/$0.50)
At its 22 September launch Artificial Analysis measured GPT-6 Luna at $0.07 per completed Intelligence Index task, at an index score of 37. Claude Haiku 5.5 matches its token price for prompts up to 100,000 tokens and scored 43 at its October launch, at $0.21 per completed task. The cheapest open-weight API is DeepSeek V4.1-Flash at $0.15/$0.60 off-peak, doubling in peak hours. Best value at the frontier tier: GPT-6.1 Sol at $2/$10 and $0.72 per completed task at its launch.
For multi-model flexibility and no lock-in
Winner: OpenRouter
One key to hundreds of models with pass-through pricing and automatic failover — the cleanest hedge against any single vendor’s pricing or availability changes.
For the fastest responses
Winner: Cerebras
Artificial Analysis measures Cerebras at 1,719 output tokens per second on gpt-oss-120B, more than twice SambaNova (701) and more than three times Groq (471) on the same model — the pick for voice agents and anything real-time. Alternatives: Groq for a wider open-model list, and Fireworks AI and Together AI for open-model serving with more features.
For governed enterprise deployments
Winner: the gateway on the cloud you already run — AWS Bedrock, Microsoft Foundry or Google Vertex AI
Model gaps are small; compliance, data residency and integration decide enterprise impact, and a second cloud triples networking, observability and compliance overhead (EPC Group). Start where your data and identity already live: Bedrock for the broadest catalogue on AWS, Foundry for OpenAI-on-Microsoft, Vertex for Gemini-on-GCP.
For the longest context
Winner: Anthropic API (1M tokens at standard rates)
Every current Claude model has a 1,000,000-token context window, and all but Haiku 5.5 charge the same rate across it (Anthropic). OpenAI charges more on long prompts, and Gemini 3.1 Pro’s price rises to $4/$18 above 200,000 tokens.
For prototyping on a budget
Winner: Google Gemini API free tier, plus OpenRouter free models
The most generous free tiers for building and testing before you commit spend. Keep sensitive data off Google’s free tier, where content is used to improve its products.
How to choose an LLM API
Nine dimensions decide the fit. Rank them for your build before you compare vendors.
Model access — do you need one specific frontier model, or the freedom to switch? First-party for the former, an aggregator or gateway for the latter. Price — token rates vary roughly 100x across the table above; a routing setup usually beats any single flagship subscription. Rate limits — first-party APIs tier limits by spend history, which can throttle a fast-scaling launch, whereas gateways inherit your cloud quotas. Latency and throughput — for real-time experiences, an inference specialist like Cerebras or Groq changes what’s possible. Feature depth — prompt caching, Batch APIs, structured outputs, tool use and fine-tuning are not uniform; the matrix above shows where the gaps are. Data privacy and retention — confirm training and retention terms in writing for anything regulated. Compliance — SOC 2, HIPAA, FedRAMP and EU residency point you toward specific gateways. Ecosystem lock-in — an OpenAI-compatible endpoint keeps migration cheap; deep proprietary features raise the switching cost. Reliability — automatic failover (OpenRouter) or multi-region gateways matter for anything user-facing.
Our picks are ranked by suitability for a new build, weighting model access, price, feature depth, reliability and lock-in, and cross-checked against the same evidence behind our best AI models ranking. Two adjacent decisions pair naturally with your API choice: LLM observability and evaluation tooling, which tells you whether the model is actually behaving in production, and a vector database, which powers retrieval for anything beyond the context window — both are covered in their own guides as part of the wider LLM stack.
Related guides
For the underlying models these APIs serve, see our best AI models ranking. For building software specifically, the best AI for coding guide covers models, IDEs and agents, and best AI code review covers the review layer that catches what agents miss. For speech-to-text specifically — a different class of API from the text-generation platforms here — see best AI for transcription, which compares Deepgram, AssemblyAI and the other voice APIs, and best text-to-speech APIs for the synthesis half of a voice-agent pipeline.
Frequently asked questions
What is an LLM API?
An LLM API is a service you call over the internet to run a large language model without hosting it yourself. You send text (a prompt), the provider runs it through a model such as Claude Opus 5.5 or GPT-6 Astra, and you get the model’s response back, billed per token. LLM APIs come in three forms: first-party APIs from the labs (OpenAI, Anthropic, Google), enterprise cloud gateways (AWS Bedrock, Microsoft Foundry, Google Vertex AI), and aggregators that route to many models through one endpoint (OpenRouter).
What is the best LLM API in 2026?
The best LLM API for most teams is the Anthropic API: Claude Opus 5.5 ($4/$20 per million tokens) launched in September with 58 on the Artificial Analysis Intelligence Index, the highest score it had measured, and Anthropic holds 40% of enterprise LLM API spend in Menlo Ventures’ survey. For the broadest ecosystem, the OpenAI API with GPT-6 Astra and the cheaper GPT-6.1 Sol ($2/$10). For a free tier, the Google Gemini API. For multi-model access through one key, OpenRouter. For speed, Cerebras.
What is the cheapest LLM API?
The cheapest models on the major first-party APIs are OpenAI’s GPT-6 Luna, Anthropic’s Claude Haiku 5.5 and Meta’s Muse Ember, all at $0.10/$0.50 per million tokens; Haiku 5.5 charges $0.50/$2.50 on prompts over 100,000 tokens and Muse Ember $0.30/$1.50 over 200,000. At launch, Artificial Analysis measured GPT-6 Luna at $0.07 per completed index task and Haiku 5.5 at $0.21 on v4.3, and Muse Ember at $0.14 on v5.0.1. The cheapest open-weight API model is DeepSeek V4.1-Flash at $0.15/$0.60 off-peak, doubling in peak hours. At the frontier tier, GPT-6.1 Sol costs $2/$10. Prompt caching and Batch APIs cut effective costs further on repeated-context and asynchronous workloads.
Which LLM API is best for open-source models?
Together AI and Fireworks AI are the leading platforms for hosting and fine-tuning open-weight models such as DeepSeek, Llama and Qwen. Cerebras serves gpt-oss-120B fastest on Artificial Analysis’s measurements, and Groq offers a wider open-model list at high speed. OpenRouter reaches open and closed models alike through one endpoint.
What is the fastest LLM API?
Cerebras is the fastest on Artificial Analysis’s measurements: 1,719 output tokens per second on gpt-oss-120B, against 701 for SambaNova and 471 for Groq. Groq reaches 910 tokens per second on the smaller gpt-oss-20B and serves more models. Speed matters most for real-time experiences like voice agents, where the user waits on each response.
Is OpenRouter cheaper than calling APIs directly?
Not on the token itself. OpenRouter charges no per-token markup and passes through each provider’s price, then adds a 5.5% fee ($0.80 minimum) on card credit purchases (OpenRouter). You pay slightly more than going direct, in exchange for one key to hundreds of models, automatic failover and no per-vendor contracts.
Do LLM API providers train on my data?
The mainstream first-party APIs (OpenAI, Anthropic) and the enterprise gateways (AWS Bedrock, Microsoft Foundry, Google Vertex AI) do not train on your API inputs by default. The notable exception is Google’s free Gemini API tier, where content is used to improve Google’s products (Google), which is why sensitive work belongs on the paid Gemini API or Vertex AI.
What’s the difference between a first-party API and a gateway like Bedrock or OpenRouter?
A first-party API (OpenAI, Anthropic, Google) gives you one lab’s own models, with the newest releases first and the deepest features. A cloud gateway (AWS Bedrock, Microsoft Foundry, Google Vertex AI) puts many vendors’ models behind your cloud’s identity, logging and data-residency controls — governance is the point. An aggregator (OpenRouter) routes to hundreds of models through one endpoint for maximum flexibility and failover. Many production systems use all three: first-party for the flagship, a gateway for governed workloads, and an aggregator for cheap multi-model routing.
Can I switch LLM APIs without rewriting my code?
Increasingly, yes. Groq, Together, Fireworks, OpenRouter, xAI and DeepSeek all accept the OpenAI SDK with a changed base URL, so moving between them is a configuration change. Switching between the three first-party APIs (OpenAI, Anthropic, Google) still means adapting to each one’s request and response format, though thin abstraction layers and OpenRouter’s normalised schema smooth most of that over. Avoiding deep proprietary features keeps your switching cost low.