Verified 2026-11-18 · rates follow the live catalog

Cheap AI API: what one request really costs

A price per million tokens is hard to feel. The 50 billed text models on this page have input prices that differ by 1,000×, and that spread is the whole story of cheap inference. To make it concrete, every price below is turned into the cost of one request: a 20,000-token prompt answered with a 1,000-token reply and nothing cached. That is an illustration of a single coding-agent step, not a measurement of your traffic, so scale it to your own prompt sizes.

The cheapest models, per request

The 12 cheapest billed text models at their most expensive hour of the day, cheapest first
ModelInput / 1MOutput / 1MOne request1,000 requestsOne request, prompt cached
Gemma 4 26B$0.01$0.03$0.00023$0.23—
GPT-OSS 20B$0.02$0.03$0.00043$0.43—
Llama 4 Scout$0.027$0.085$0.00062$0.62—
MiniMax M3$0.03$0.12$0.00072$0.72$0.00024
GPT-OSS 120B$0.035$0.075$0.00077$0.77—
Qwen3.8 27b$0.045$0.32$0.0012$1.22—
GPT-6 Luna$0.05$0.25$0.0013$1.25$0.00035
Hy4 Flash$0.063$0.2529$0.0015$1.51$0.00031
GLM-4.7-Flash$0.06$0.40$0.0016$1.60—
Qwen3.8 Flash$0.075$0.235$0.0017$1.74$0.0004
Claude Haiku 5.5$0.10$0.50$0.0025$2.50$0.0007
MiMo-V2.5$0.14$0.28$0.0031$3.08—

Every figure is what the model bills at the most expensive hour of the day, so it is the most a request can cost. A discount that applies at every hour is already inside it, and scheduled discounts, which lower the price further during set hours, are listed under published discounts below.

Gemma 4 26B is the cheapest at $0.00023 a request, and Claude Fable 5.1 is the dearest at $0.25: 1,087× apart. At 100,000 requests a month that is $23 against $25,000.

What the expensive end costs

The four dearest billed text models for the same request
ModelOne requestMultiple of the cheapest
Claude Fable 5.1$0.251,087×
Claude Fable 5$0.251,087×
Claude Fable 5.2$0.20870×
GPT-6 Astra$0.125543×

These rows are here so the gap is visible, not to argue that the cheap models match them. Price does not measure quality, and a cheaper model that needs two attempts is not cheaper. Shortlist by price, then run the shortlist on your own tasks.

Published discounts

These models publish a discount against their list price:

Each model's page shows its list price, its rates and its schedule.

Prompt caching

40 of the 50 models above publish a separate, lower price for input tokens served from cache, which matters for agents that resend a long, stable prefix on every step. On MiMo-V2.6-Pro the same request costs $0.00094 when the whole prompt is a cache hit, against $0.0096 when it is not.

Before paying for anything, check the free models: 2 models are free to call for a limited time.

Agents spend by the session rather than by the request. The cost-per-session guide ranks models by what a whole coding-agent session costs.

Plan or credits

On-demand credits bill per token at the rates above. The $20 Minion and $80 Boss plans add an included allowance, and usage past it bills as on-demand credits. If your on-demand spend regularly passes a plan's monthly price, compare the two on the pricing page.

Questions

What is the cheapest LLM API for coding?

At its most expensive hour of the day, Gemma 4 26B is the cheapest billed text model here, at $0.00023 for the request above. Whether it is good enough for your codebase is the part a price cannot tell you.

Is cheaper per token cheaper per task?

Not necessarily. A model that needs more attempts, or a longer prompt to reach the same result, can cost more per finished task. Compare cost per request, then measure cost per completed task on a sample of your own work.

Model catalog · Pricing · Comparisons · Cost guides · Integration guides · FAQ
Guides: GLM coding plan alternative · Free AI API · LLM gateway · LLM proxy · Cheap AI API · OpenAI-compatible API
Model APIs: GLM API · DeepSeek API · Kimi API · Qwen API · MiniMax API