The Cheapest LLM API, Computed Honestly

"Cheapest" has two correct answers depending on your usage shape. For light or bursty use, open-weight per-token models are unbeatable — DeepSeek V4 Flash starts around $0.09 per million input tokens. For agents that actually run all day, the math flips hard toward flat-rate. Here is both answers with the working shown.

Light or bursty use: cheap per-token models win

If your agent runs minutes a day, don't pay a subscription for it. These are the current per-token prices (live from OpenRouter data), plus what our worked example — an active agent at 150 requests/day (~54M input + 5.4M output tokens/month) — would cost on each:

Model$/M input$/M outputActive agent / monthNotes
DeepSeek V4 Flash$0.10$0.20~$6/moThe per-token price floor among capable models; 1M context.
MiniMax M2.1$0.30$1.20~$23/moStrong tool use for the price; a favorite for high-volume agent steps.
DeepSeek V4 Pro$0.43$0.87~$28/moNear-frontier coding quality; the value champion for harder tasks.
Kimi K2.7 Code$0.75$3.50~$59/moCoding-tuned; strong function calling.
GLM 5.2$0.97$3.05~$69/moOpen-weight flagship with 1M context.
Claude Sonnet 4.6$3$15~$243/moThe proprietary daily-driver benchmark, for comparison.

Prices from the OpenRouter catalog snapshot this site syncs regularly; caching discounts not included. Redo the math for your own workload with the live cost calculator.

Always-on agents: the math flips to flat-rate

The table above already shows the turn: at active-agent volume, even mid-priced per-token models cross $39/month, and frontier models cross hundreds. Run the same workload on frontier quality per-token (Sonnet-class at ~$3/$15) and the example costs roughly $243/month — for one agent. Flat-rate flips that: a fixed monthly price ($9-$399 by execution speed), unlimited tokens, and the heavier your agent runs, the better the deal gets. The trade-off is honest too: you don't pin model versions, and sustained extreme load is paced rather than instant.

How flat-rate unlimited works →What per-token rate limits do to agents →

Cheapest LLM API — common questions

What is the cheapest LLM API in 2026?

For raw per-token price among capable models, DeepSeek V4 Flash (around $0.09 per million input tokens) sets the floor, with MiniMax M2.1 and DeepSeek V4 Pro close behind. For sustained agent workloads, flat-rate subscriptions (from $9/month for unlimited tokens) beat any per-token price once your agent runs for hours a day.

Is a cheap per-token model or a flat-rate plan cheaper for an AI agent?

Compute your monthly tokens. A light agent (a few dozen requests a day) costs single-digit dollars on cheap per-token models — flat rate can't beat that. An active agent (150+ requests/day with real context) burns tens of millions of tokens monthly; on frontier per-token prices that's hundreds of dollars, where a flat plan at $9-$39 wins by an order of magnitude.

What hidden costs make 'cheap' per-token APIs expensive?

Retry storms (failed and rate-limited requests still consume attempts and engineering time), context re-sending (agents resend history every step, multiplying input tokens), and bill variance (one runaway loop can cost more than a year of a flat plan). Cheap per-token pricing is real, but agents are built to consume it aggressively.

Are free LLM APIs good enough for agents?

Free tiers are for evaluation, not operation: daily request caps and aggressive rate limits end agent sessions mid-task. They're great for trying a model; they're not an operating plan for anything always-on.