rankozo

AI tools · Ranked by price to features

10 Best LLM APIs of 2026

By the Rankozo research desk · Updated November 9, 2026 · Next review December 24, 2026

Google Gemini API is the best LLM API for developers comparing price per million tokens in 2026, with a free tier and Gemini 2.5 Flash-Lite at $0.10 per 1M input tokens; OpenAI API suits teams that want one vendor from GPT-6 Luna at $0.10 up to GPT-6 Astra, and DeepSeek API suits long-context work at $0.15 off-peak; the cheapest paid rate here is Fireworks AI from $0.05 per 1M input tokens.

Tools ranked
10
With free plan
3
Cheapest paid plan
Fireworks AI, $0.05
per 1M input tokens

By the numbers

Comparison table

Tool
Google Gemini API019.39.5$0.10per 1M input tokensYes
OpenAI API029.18.9$0.10per 1M input tokensNo
Anthropic Claude API038.98.4$0.10per 1M input tokensNo
DeepSeek API048.99.6$0.15per 1M input tokens (off-peak)No
Fireworks AI058.79.2$0.05per 1M input tokensNo
Groq068.79.3$0.07per 1M input tokensYes
Mistral AI078.79.1$0.10per 1M input tokensNo
Together AI088.69.0$0.15per 1M input tokensNo
OpenRouter098.58.0Freeprovider list price plus 5.5% on credit purchasesYes
xAI API108.07.6$1per 1M input tokensNo

Click a column to sort. Prices are the cheapest paid plan quoted from each vendor's US pricing page; "Check price" means the US price check is pending.

How this ranking works

One method for every tool. We compared documented features and published prices; we did not run hands-on tests. Value carries the most weight.

Full method
40%
35%
25%
ValueFeaturesEase of use

This list is for developers who call language models from their own code and want to compare what a million tokens costs at each provider. We compared documented features and published USD rates on each vendor's own pricing pages and docs, and scored value at 40%, features at 35% and ease of use at 25%. The starting price is the lowest published input rate per 1M tokens for a text model; output tokens cost more everywhere, so check both columns before you commit. OpenRouter resells other providers at their list price, so its entry shows its platform fee instead of a token rate.

The verdict

Google Gemini API offers the most for the least: a free tier on several models, $0.10 input on Gemini 2.5 Flash-Lite and a 50% Batch discount, though Google has scheduled price increases for its newest models. OpenAI API is the safest single vendor, with four tiers from GPT-6 Luna at $0.10 to GPT-6 Astra at $10. DeepSeek gives a 1M context window at $0.15 off-peak, and Anthropic's Claude Haiku 5.5 matches the $0.10 floor while Opus 5.5 and Fable 5.1 cover the hardest work. Groq, Mistral, Fireworks and Together are the picks for cheap open-weight models, OpenRouter puts 600+ models behind one key, and xAI is the priciest entry point here at $1.

  1. 01Top value

    Google Gemini API

    9.3/10

    Google's developer API for Gemini models, with a free tier in Google AI Studio and paid rates per 1M tokens.

    Price

    $0.10per 1M input tokens

    Free tier; paid from $0.10 per 1M input tokens (Gemini 2.5 Flash-Lite)

    “$0.10 (text / image / video) $0.30 (audio)” Quoted from the pricing page, November 9, 2026.

    Free plan
    Yes
    Value (40%)
    9.5
    Features (35%)
    9.3
    Ease of use (25%)
    9.0

    Best forDevelopers who want a free tier to prototype and the lowest per-token rates from a first-party model vendor.

    The Gemini API ranks first because it combines a real free tier with the lowest paid rates of any first-party model vendor. In Google AI Studio you can call several Flash and Flash-Lite models without paying, which is enough to build and test an app, though Google uses free-tier content to improve its products. On the paid tier, Gemini 2.5 Flash-Lite costs $0.10 per 1M input tokens and $0.40 output, Gemini 3.1 Flash-Lite costs $0.25 and $1.50, and the Batch API halves those rates. Context caching and Grounding with Google Search are included, with 5,000 free search requests a month on Gemini 3 and newer models before $14 per 1,000. The flagship Gemini 4 Argon is paid only, at $2.00 in and $10.00 out. The weak spot is price stability: Google has published increases that double Argon's rates on December 1, 2026 and Gemini 3.8 Flash on January 1, 2027, so budget with the later figures.

    • ✓Free tier covers Flash and Flash-Lite models for prototyping
    • ✓Gemini 2.5 Flash-Lite costs $0.10 in and $0.40 out per 1M tokens
    • ✓Paid-tier content is not used to improve Google's products
    • ✕Free-tier content is used to improve Google's products
    • ✕Gemini 4 Argon doubles to $4.00 input on December 1, 2026
    • ✕Gemini 3.8 Flash doubles to $1.50 input on January 1, 2027
    Cheapest text model:
    Gemini 2.5 Flash-Lite, $0.10 input, $0.40 output per 1M tokens
    Gemini 3.1 Flash-Lite:
    $0.25 input, $1.50 output per 1M tokens
    Gemini 3.8 Flash:
    $0.75 input, $3.75 output through December 31, 2026
    Gemini 4 Argon:
    $2.00 input, $10.00 output through November 30, 2026; paid tier only
    Batch:
    50% off on the paid tier

    Bottom line: Start here if price per token is your main filter: the free tier and $0.10 Flash-Lite rate are hard to beat. Plan around the scheduled increases on Argon and 3.8 Flash.

    Visit ai.google.dev ↗

  2. 02

    OpenAI API

    9.1/10

    OpenAI's API for GPT-6 text models, image, voice and transcription models, plus built-in tools such as web search.

    Price

    $0.10per 1M input tokens

    Pay as you go; from $0.10 per 1M input tokens (GPT-6 Luna)

    “GPT-6 Luna Our most efficient model for focused, high-volume tasks. Price Input: $0.10 / 1M tokens” Quoted from the pricing page, November 9, 2026.

    Free plan
    No
    Value (40%)
    8.9
    Features (35%)
    9.5
    Ease of use (25%)
    9.0

    Best forTeams that want one vendor for text, images and voice, with a cheap tier for volume and a top tier for hard tasks.

    OpenAI's API is the broadest single platform here. Its text lineup is a four-step ladder: GPT-6 Luna for high-volume tasks at $0.10 per 1M input tokens and $0.50 output, GPT-6.1 Terra at $1.00 and $5.00 for visual reasoning and computer use, GPT-6.1 Sol at $2.00 and $10.00 for coding and agent work, and GPT-6 Astra at $10.00 and $50.00 for the hardest jobs. Cached input drops Luna to $0.01. The Batch API takes 50% off inputs and outputs for jobs that can wait 24 hours, and Flex processing trades speed for lower prices. The same account covers image models, realtime voice, streaming transcription from $0.017 a minute and a web search tool at $10 per 1,000 calls. It loses ground on value because there is no free API tier, data residency adds 10%, and the posted rates assume context under 272K tokens.

    • ✓GPT-6 Luna costs $0.10 in, $0.01 cached and $0.50 out
    • ✓Widest product range on one bill: text, image, voice and transcription
    • ✓Clear tier ladder from Luna to Sol, Terra and Astra
    • ✕No free tier for the API
    • ✕Listed rates apply to context under 272K tokens
    • ✕Data residency adds 10% to prices
    GPT-6 Luna:
    $0.10 input, $0.01 cached, $0.50 output per 1M tokens
    GPT-6.1 Terra:
    $1.00 input, $5.00 output per 1M tokens
    GPT-6.1 Sol:
    $2.00 input, $10.00 output per 1M tokens
    GPT-6 Astra:
    $10.00 input, $50.00 output per 1M tokens
    Batch:
    50% off inputs and outputs

    Bottom line: OpenAI is the safest choice when you want text, images and voice from one vendor, and Luna at $0.10 keeps volume work cheap. It ranks below Gemini only because there is no free tier.

    Visit openai.com ↗

  3. 03

    Anthropic Claude API

    8.9/10

    Anthropic's API for Claude models, from Haiku 5.5 for high-volume tasks to Fable 5.1 for long agent work.

    Price

    $0.10per 1M input tokens

    Pay as you go; from $0.10 per 1M input tokens (Claude Haiku 5.5, prompts up to 100,000 tokens)

    “Claude Haiku 5.5 For high-volume, latency-sensitive tasks such as classification, extraction, and routing $0.10 / MTok for prompts up to 100,000 tokens” Quoted from the pricing page, November 9, 2026.

    Free plan
    No
    Value (40%)
    8.4
    Features (35%)
    9.4
    Ease of use (25%)
    8.9

    Best forDevelopers who need strong coding and agent models and a low-cost Haiku tier for routing and extraction.

    Anthropic's API covers four current Claude tiers. Claude Haiku 5.5 is built for classification, extraction and routing at $0.10 per 1M input tokens and $0.50 output for prompts up to 100,000 tokens, rising to $0.50 and $2.50 above that. Sonnet 5.5 costs $2 and $10, Opus 5.5 costs $4 and $20 for long agent coding, and Fable 5.1 costs $10 and $50 for the most demanding reasoning. Prompt caching is a strong cost lever: Haiku 5.5 cache hits cost $0.01 and Sonnet 5.5 hits $0.10, and automatic caching needs one field in the request. The Batch API halves both input and output. Two details matter for budgeting. Anthropic says Claude 4.7 and later use a tokenizer that produces about 30% more tokens for the same text, and US-only inference adds a 1.1x multiplier. There is no free API tier, which keeps it below Gemini and OpenAI on value.

    • ✓Haiku 5.5 costs $0.10 in and $0.50 out for prompts up to 100,000 tokens
    • ✓Cache hits on Haiku 5.5 cost $0.01 per 1M tokens
    • ✓Opus 5.5 at $4 input is cheaper than the earlier Opus 4.x models at $5
    • ✕No free API tier
    • ✕Haiku 5.5 rises to $0.50 input over 100,000-token prompts
    • ✕Newer tokenizer produces about 30% more tokens for the same text
    Claude Haiku 5.5:
    $0.10 input, $0.50 output per 1M tokens up to 100,000-token prompts
    Claude Sonnet 5.5:
    $2 input, $10 output per 1M tokens
    Claude Opus 5.5:
    $4 input, $20 output per 1M tokens
    Claude Fable 5.1:
    $10 input, $50 output per 1M tokens
    US-only inference:
    1.1x multiplier on Claude 4.6 and later

    Bottom line: Claude is a strong pick for coding and agent workloads, with Haiku 5.5 matching the $0.10 floor for routine calls. Test your own prompts, since the newer tokenizer raises token counts.

    Visit claude.com ↗

  4. 04

    DeepSeek API

    8.9/10

    DeepSeek's API for its Flash and V4 Pro models, compatible with the OpenAI and Anthropic API formats.

    Price

    $0.15per 1M input tokens (off-peak)

    Pay as you go; deepseek-flash $0.15 per 1M input tokens off-peak, $0.30 peak

    “1M INPUT TOKENS (CACHE MISS) OFF-PEAK $0.15 $0.66 PEAK $0.3 $1.32” Quoted from the pricing page, November 9, 2026.

    Free plan
    No
    Value (40%)
    9.6
    Features (35%)
    8.4
    Ease of use (25%)
    8.6

    Best forDevelopers who want a 1M-token context window at a very low rate and can run jobs outside peak hours.

    DeepSeek is the value pick for long inputs. Both of its models, deepseek-flash (served by DeepSeek-V4.1-Flash-1017) and deepseek-v4-pro, take a 1M-token context and return up to 384K output tokens, and both offer thinking and non-thinking modes, JSON output and tool calls. Pricing has two clocks: off-peak rates are half the peak rates, and peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC on weekdays, so weekends and most of the day are off-peak. deepseek-flash costs $0.15 per 1M input tokens off-peak and $0.30 at peak, with output at $0.60 and $1.20, and cache hits fall to $0.003. deepseek-v4-pro runs $0.66 to $1.32 input and $1.98 to $3.96 output. Switching is easy because the API accepts the OpenAI and Anthropic formats at api.deepseek.com. The trade-offs are no free tier, vision on the Flash model only, and a smaller model range than the large US vendors.

    • ✓Cache hits cost $0.003 per 1M tokens off-peak on deepseek-flash
    • ✓Drop-in base URL for the OpenAI and Anthropic formats
    • ✓Very large context window for the price
    • ✕Peak hours double the rate on weekdays
    • ✕No free tier
    • ✕Vision is supported on deepseek-flash only
    deepseek-flash input:
    $0.15 off-peak, $0.30 peak per 1M tokens (cache miss)
    deepseek-flash output:
    $0.60 off-peak, $1.20 peak per 1M tokens
    deepseek-v4-pro:
    $0.66 to $1.32 input, $1.98 to $3.96 output per 1M tokens
    Context:
    1M tokens, up to 384K output
    Peak hours:
    01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday

    Bottom line: DeepSeek gives the most context per dollar on this list, especially for jobs you can schedule off-peak. Pick it when long documents or codebases drive your token count.

    Visit deepseek.com ↗

  5. 05

    Fireworks AI

    8.7/10

    An inference platform for open-weight models with serverless per-token pricing, reserved throughput and fine-tuning.

    Price

    $0.05per 1M input tokens

    Prepaid credits; serverless from $0.05 per 1M input tokens

    “Serverless Pay per token · From $0.05 / 1M input tokens” Quoted from the pricing page, November 9, 2026.

    Free plan
    No
    Value (40%)
    9.2
    Features (35%)
    8.5
    Ease of use (25%)
    8.0

    Best forTeams running open models in production who want several pricing modes and a path to reserved capacity.

    Fireworks has the lowest published entry rate here: NVIDIA Nemotron 3.5 Lightning 30B A3B costs $0.05 per 1M input tokens and $0.20 output. Its serverless menu runs up through GPT OSS 120B at $0.15 and $0.60, DeepSeek V4.1 Flash at $0.30 and $1.20, GLM 5.3 at $1.40 and $4.40, and Kimi K3 at $3.00 and $15.00. What sets it apart is pricing modes. On the same endpoint you can send a request as Standard, Priority, Fast, Batch at 50% off, or Spot at 30% off on best-effort capacity, and cached input bills at half price or less with no write fee. As traffic grows, reserved throughput adds an SLA and 99.9% uptime terms, and managed fine-tuning starts at $0.50 per 1M training tokens. The trade-offs: usage draws down prepaid credits, Spot throughput can drop to zero, and US-only serverless carries a 50% premium on most models.

    • ✓Lowest published input rate on this list at $0.05
    • ✓Switch pricing mode per request on the same endpoint
    • ✓Monthly spend limits and auto reload
    • ✕Usage draws down prepaid credits
    • ✕Spot capacity can drop to zero, so you need retries
    • ✕US-only serverless costs 50% more on most models
    Cheapest model:
    NVIDIA Nemotron 3.5 Lightning 30B A3B, $0.05 input, $0.20 output
    OpenAI GPT OSS 120B:
    $0.15 input, $0.60 output per 1M tokens
    DeepSeek V4.1 Flash:
    $0.30 input, $1.20 output per 1M tokens
    Kimi K3:
    $3.00 input, $15.00 output per 1M tokens
    Discounts:
    Batch 50% off, Spot 30% off

    Bottom line: Fireworks is the cheapest place on this list to start with open models, at $0.05 per 1M input tokens. Its Batch and Spot modes make it strong for background jobs.

    Visit fireworks.ai ↗

  6. 06

    Groq

    8.7/10

    GroqCloud serves open-weight models such as GPT OSS on its own inference hardware, with published speeds per model.

    Price

    $0.07per 1M input tokens

    Free plan; Developer plan from $0.075 per 1M input tokens (GPT OSS 20B)

    “GPT OSS 20B openai/gpt-oss-20b 1000 $0.075 input $0.30 output” Quoted from the pricing page, November 9, 2026.

    Free plan
    Yes
    Value (40%)
    9.3
    Features (35%)
    7.9
    Ease of use (25%)
    8.8

    Best forDevelopers who need fast responses from open-weight models at a low rate, with a free plan to start.

    Groq stands out for speed. GroqCloud lists a measured token speed next to each model, and its production GPT OSS 20B model runs at about 1,000 tokens per second for $0.075 per 1M input tokens and $0.30 output, the second-lowest input rate on this list. GPT OSS 120B, OpenAI's open-weight flagship with built-in browser search and code execution, runs at about 500 tokens per second for $0.15 and $0.60. Both have a 131,072-token context window. A free plan with its own rate limits lets you test before paying, and paid usage moves to the Developer plan with higher limits, plus Batch and Flex processing tiers. The docs cover OpenAI compatibility, prompt caching, structured outputs and coding tool setups. The catch is catalog size: only a handful of text models carry public prices, Llama 3.1 8B and Llama 3.3 70B now say contact sales, and newer models such as Qwen3.8-27B are still in preview.

    • ✓GPT OSS 20B costs $0.075 in and $0.30 out
    • ✓Speed is listed for every production model
    • ✓Free plan to test before paying
    • ✕Small production catalog of priced text models
    • ✕Llama 3.1 8B and Llama 3.3 70B now need an Enterprise contract
    • ✕Context window is 131,072 tokens on the GPT OSS models
    GPT OSS 20B:
    $0.075 input, $0.30 output per 1M tokens, 1,000 tokens per second
    GPT OSS 120B:
    $0.15 input, $0.60 output per 1M tokens, about 500 tokens per second
    Qwen3.8-27B (preview):
    $0.80 input, $4.00 output per 1M tokens
    Context window:
    131,072 tokens on GPT OSS models
    Whisper Large V3 Turbo:
    $0.04 per hour of audio

    Bottom line: Groq is the pick when response time matters as much as price, and GPT OSS 20B at $0.075 is one of the lowest rates here. Look elsewhere if you need a wide model catalog.

    Visit groq.com ↗

  7. 07

    Mistral AI

    8.7/10

    Mistral's API for its own open-weight Mistral and Ministral models, plus hosted GLM and DeepSeek models.

    Price

    $0.10per 1M input tokens

    Pay as you go; from $0.10 per 1M tokens in and out (Ministral 3 3B)

    “Ministral 3 3B ↗ $0.1 $0.01 $0.1” Quoted from the pricing page, November 9, 2026.

    Free plan
    No
    Value (40%)
    9.1
    Features (35%)
    8.3
    Ease of use (25%)
    8.5

    Best forDevelopers who want small open-weight models at flat in and out rates, or European regional inference.

    Mistral is a good fit for teams that want small, cheap models with predictable bills. Its Ministral 3 family charges the same rate in both directions: $0.10 per 1M tokens for 3B, $0.15 for 8B and $0.20 for 14B, which makes output-heavy jobs far cheaper than on most rivals. Mistral Small 4 combines instruct, reasoning and coding at $0.15 in and $0.60 out, and the flagship Mistral Large 4 costs $0.70 and $2.10. The same API also hosts Z.ai GLM 5.3 and DeepSeek V4.1 Flash, so you can compare third-party models without a second account. Batch processing cuts prices by 50%, cached input can be up to 90% cheaper, and Mistral Moderation 2 is free. Small 4 and the Ministral 3 models are Apache 2.0 open weights you can also self-host. On the downside, Mistral's free plan is aimed at its Vibe app and Studio rather than a published free API rate, and the first-party lineup is narrower than Google's or OpenAI's.

    • ✓Ministral 3 models charge the same rate for input and output
    • ✓Mistral Small 4 and Ministral 3 are Apache 2.0 open weights
    • ✓Regional inference options in the docs
    • ✕Free plan covers Vibe and Studio, not a documented free API rate
    • ✕Smaller first-party catalog than OpenAI or Google
    • ✕Commercial self-hosting of some models needs a Mistral license
    Ministral 3 3B:
    $0.10 input, $0.10 output per 1M tokens
    Ministral 3 8B:
    $0.15 input, $0.15 output per 1M tokens
    Mistral Small 4:
    $0.15 input, $0.60 output per 1M tokens
    Mistral Large 4:
    $0.70 input, $2.10 output per 1M tokens
    Batch:
    50% off

    Bottom line: Mistral is the value pick for output-heavy work, since Ministral 3 charges the same low rate for input and output. Choose Large 4 when you need a stronger model under $1 input.

    Visit mistral.ai ↗

  8. 08

    Together AI

    8.6/10

    A platform for open-source models covering serverless inference, batch, dedicated endpoints, fine-tuning and GPU clusters.

    Price

    $0.15per 1M input tokens

    Pay as you go; chat models from $0.15 per 1M input tokens (GLM-5.3-Flash)

    “GLM-5.3-Flash $0.15 $0.03 (cached) $0.50” Quoted from the pricing page, November 9, 2026.

    Free plan
    No
    Value (40%)
    9.0
    Features (35%)
    8.6
    Ease of use (25%)
    8.1

    Best forTeams that want a broad open-model catalog and plan to fine-tune or move to dedicated hardware later.

    Together AI suits teams that expect to grow beyond simple API calls. Its serverless catalog covers open models across chat, vision, image, audio, video, embeddings and rerank, with chat models such as GLM-5.3-Flash, MiniMax M3.1 Flash and Qwen3.8 Flash at $0.15 per 1M input tokens. GLM-5.3-Flash costs $0.50 output and $0.03 for cached input, gpt-oss-120B is $0.15 and $0.60, DeepSeek V4.1 Flash 1017 is $0.30 and $1.20, and Kimi K3 is $3.00 and $15.00. Batch inference has its own price column for jobs that can wait. Beyond that, the same account offers provisioned throughput, dedicated endpoints, LoRA and full fine-tuning with per-job minimum charges, and GPU clusters from H100 to GB300. For pure token price it trails Fireworks, whose cheapest model starts lower, and the long price table takes time to read. There is no first-party flagship, so you depend on open-model releases.

    • ✓Large catalog of open models from GLM, Kimi, DeepSeek, Qwen and MiniMax
    • ✓Cached input prices listed per model
    • ✓One vendor from serverless calls to dedicated GPUs
    • ✕Entry rates are higher than Fireworks for comparable models
    • ✕Pricing page lists many models, which takes time to compare
    • ✕No first-party flagship model
    GLM-5.3-Flash:
    $0.15 input, $0.03 cached, $0.50 output per 1M tokens
    gpt-oss-120B:
    $0.15 input, $0.60 output per 1M tokens
    DeepSeek V4.1 Flash 1017:
    $0.30 input, $1.20 output per 1M tokens
    Kimi K3:
    $3.00 input, $15.00 output per 1M tokens
    Fine-tuning:
    Priced per 1M training tokens with a minimum charge per job

    Bottom line: Together is a solid home for open models when you also want fine-tuning and dedicated capacity from one vendor. For the lowest entry rate alone, Fireworks is cheaper.

    Visit together.ai ↗

  9. 09

    OpenRouter

    8.5/10

    A single OpenAI-compatible API that routes requests to 600+ models from 80+ providers at their list prices.

    Price

    Freeprovider list price plus 5.5% on credit purchases

    Free plan with 25+ free models; paid usage at provider list prices plus a 5.5% fee on credit purchases

    “OpenRouter's fee is charged when you buy credits, 5.5% on Standard and 8% on Business, never on individual requests.” Quoted from the pricing page, November 9, 2026.

    Free plan
    Yes
    Value (40%)
    8.0
    Features (35%)
    8.7
    Ease of use (25%)
    9.0

    Best forDevelopers who want to try many models behind one key and pay provider list prices plus a small credit fee.

    OpenRouter is not a model vendor but a router, and that makes it useful for price comparison. One OpenAI-compatible API reaches 600+ models from 80+ providers, and OpenRouter says it bills inference at each provider's list price on every plan. Its own fee is charged when you buy credits: 5.5% on Standard and 8% on Business. If you bring your own provider keys, the first $25,000 of list-price inference a month carries no fee and 5% after that. Standard adds auto-routing, preferred vendor selection, budgets, spend controls and prompt caching, and fallback routing retries other providers when one fails, with no token charge for failed attempts. The free plan includes 25+ free models capped at 20 requests a minute and 50 a day, rising to 1,000 a day once you have bought $10 of credits. The cost is the fee itself, which makes every token about 5.5% dearer than going direct, and paid rate limits depend on the underlying provider.

    • ✓No markup on provider token prices
    • ✓Failed attempts are not charged for model tokens
    • ✓25+ free models for testing
    • ✕5.5% fee on Standard credit purchases, 8% on Business
    • ✕Free plan is capped at 50 requests a day
    • ✕Rate limits on paid models come from each provider
    Platform fee:
    5.5% on Standard, 8% on Business credit purchases
    Models:
    600+ from 80+ providers
    Free models:
    20 requests a minute, 50 a day, or 1,000 a day after $10 in credits
    BYOK:
    $25,000 of list-price inference a month with no fee, then 5%
    Workspaces:
    5 on Free and Standard, 1,000 on Business

    Bottom line: OpenRouter is the easiest way to compare many models with one key and one bill. Go direct to a provider once you settle on a model, to save the 5.5% fee.

    Visit openrouter.ai ↗

  10. 10

    xAI API

    8.0/10

    xAI's API for Grok text models, plus voice, image and video generation APIs.

    Price

    $1per 1M input tokens

    Pay as you go; from $1.00 per 1M input tokens (grok-build-0.1), grok-4.7 at $2.00

    “grok-build-0.1 Long context ≥ 200k tokens 256k $1.00 $0.20 $2.00” Quoted from the pricing page, November 9, 2026.

    Free plan
    No
    Value (40%)
    7.6
    Features (35%)
    8.2
    Ease of use (25%)
    8.4

    Best forDevelopers who want Grok models with large context windows and server-side web and X search tools.

    xAI's API is built around Grok. The flagship grok-4.7 handles code and general work with agentic tool calling and configurable reasoning, a 500k context window and rates of $2.00 per 1M input tokens, $0.50 cached and $6.00 output, a low output price for a top model. The cheapest entry is grok-build-0.1 at $1.00 and $2.00 with a 256k window, and grok-4.3 and the grok-4.20 models offer a 1M window at $1.25 and $2.50. Once a prompt reaches 200k tokens, xAI bills the whole request at long-context rates, which double the price. Server-side Web Search and X Search tools add current data, since Grok 4.7's knowledge cutoff is May 2026, and the platform also has a Batch API, prompt caching, priority processing and voice, image and video APIs. It ranks last on value because its entry rate is ten times the $0.10 floor set by Google, OpenAI and Anthropic, and there is no free tier.

    • ✓grok-4.7 output at $6.00 is low for a flagship
    • ✓1M context on grok-4.3 at $1.25 input
    • ✓Access to X posts through X Search
    • ✕Highest entry rate on this list at $1.00
    • ✕Prompts of 200k tokens or more bill every token at the long-context rate
    • ✕No free tier
    grok-4.7:
    $2.00 input, $0.50 cached, $6.00 output per 1M tokens, 500k context
    grok-build-0.1:
    $1.00 input, $2.00 output per 1M tokens, 256k context
    grok-4.3:
    $1.25 input, $2.50 output per 1M tokens, 1M context
    Long context:
    Rates double for prompts of 200k tokens or more
    Knowledge cutoff:
    May 2026 for Grok 4.7

    Bottom line: xAI is the choice if you want Grok or need X Search inside your app. For cheap high-volume calls, the other nine providers start lower.

    Visit x.ai ↗

What to check before you pay

01

Compare output rates, not only input

Output tokens cost 2 to 8 times the input rate on most models here. GPT-6 Luna is $0.10 in and $0.50 out, Claude Haiku 5.5 is $0.10 in and $0.50 out, and grok-4.7 is $2.00 in and $6.00 out. Mistral's Ministral 3 models are the exception, with the same rate in and out.

02

Check scheduled price changes

Google lists Gemini 4 Argon at $2.00 input through November 30, 2026 and $4.00 from December 1, and Gemini 3.8 Flash doubles from $0.75 to $1.50 on January 1, 2027. Read the dates on the pricing page before you budget a year ahead.

03

Use batch, caching and off-peak discounts

OpenAI, Anthropic, Google, Mistral and Fireworks all cut prices by 50% for batch jobs. DeepSeek charges half outside its peak hours, Fireworks Spot is 30% off, and cached input can fall to a tenth of the normal rate or less on most providers.

04

Count tokens the way the provider does

Anthropic says its newer tokenizer for Claude 4.7 and later produces about 30% more tokens for the same text, and xAI and Anthropic bill higher rates once prompts pass a long-context threshold. Run your own prompts through each API before you compare list prices.

05

Decide between first-party and hosted open models

OpenAI, Anthropic, Google and xAI sell their own closed models. Groq, Fireworks and Together host open-weight models such as GPT OSS, GLM and DeepSeek, often for less, and OpenRouter routes to many providers through one OpenAI-compatible API.

FAQ

What is the cheapest LLM API?

Fireworks AI has the lowest published input rate here, $0.05 per 1M tokens for NVIDIA Nemotron 3.5 Lightning 30B A3B. Groq charges $0.075 for GPT OSS 20B, and Google, OpenAI, Anthropic and Mistral all have a model at $0.10 per 1M input tokens.

Which LLM API has a free tier?

Google's Gemini API has a free tier with free input and output tokens on selected models, though Google uses that content to improve its products. Groq has a free plan, and OpenRouter offers 25+ free models capped at 50 requests a day.

How much do GPT-6 and Claude cost per million tokens?

OpenAI charges $0.10 input and $0.50 output for GPT-6 Luna and $10 and $50 for GPT-6 Astra. Anthropic charges $0.10 and $0.50 for Claude Haiku 5.5 on prompts up to 100,000 tokens, $2 and $10 for Sonnet 5.5 and $4 and $20 for Opus 5.5.

How can I cut LLM API costs?

Use batch processing where you can wait: OpenAI, Anthropic, Google, Mistral and Fireworks take 50% off. Cache repeated prompts, since cached input often costs a tenth of the normal rate or less, and run DeepSeek jobs off-peak at half price.

Will Gemini API prices go up?

Yes, on some models. Google lists Gemini 4 Argon at $2.00 input through November 30, 2026 and $4.00 from December 1, and Gemini 3.8 Flash at $0.75 through December 31, 2026 and $1.50 from January 1, 2027.

Questions or corrections: editorial@rankozo.comSee our disclosure. Prices change; confirm on the vendor page before buying.

More rankings