← Back to the pricing map

Cheapest first

Cheapest LLM API for coding

Budget and fast-tier coding-capable models, ranked by live monthly cost — and what you give up to get there.

This is a ranking, not a single head-to-head, because "cheapest LLM for coding" is a shopping question with more than two candidates worth checking. Every major API provider now ships at least one model tuned or priced for coding-agent workloads — long tool-call chains, repeated file context, and iterative diffs — and the cheapest option changes as providers reprice their budget tiers.

The workload used here (24M input / 6M output tokens a month, with prompt caching and batch discounts applied) approximates a coding agent that re-sends a working set of file context on most calls and can tolerate some asynchronous batch processing for non-interactive tasks like test generation. Interactive, low-latency coding-assistant usage will look different — check the live Compare tool with real-time-only assumptions if that's your use case.

Cheapest is not the same as best-value: a budget-tier coding model that requires more retries or produces lower-quality diffs can cost more in developer time than a pricier model that gets it right the first time. Treat this ranking as a starting shortlist for cost, and validate output quality on your actual codebase before committing.

Live pricing snapshot

Workload: 24M input tokens, 6M output tokens per month · Last verified Jul 15, 2026
Discounts (opt in, off by default):
RankQuality signalUnit priceBlended $/1Mvs cheapest
01DeepSeekDeepSeek Chat V3.2 Cheapestsourcebudget1421 LMArena Elo (approx.)In $0.28 / Out $0.42 per 1M tokens$0.31/1M$9.24
02xAIGrok Code Fast 1sourcebudget70.8% SWE-bench VerifiedunverifiedIn $0.20 / Out $1.50 per 1M tokens$0.46/1M$13.81.5× (+$4.56)
03AnthropicClaude Haiku 4.5sourcefast73.3% SWE-bench VerifiedIn $1.00 / Out $5.00 per 1M tokens$0.90/1M$272.9× (+$17.76)
04OpenAIGPT-5.3 Codexsourcereasoning85.0% SWE-bench VerifiedIn $1.75 / Out $14.00 per 1M tokens$4.20/1M$12613.6× (+$116.76)

Prices are read live from the AICostCompass catalogue at page load, not hardcoded on this page, and reflect the workload above. Adjust the workload in the Compare tool to price your own usage instead.

Quality signal links to its source and is whatever third-party benchmark is actually published for that model (SWE-bench Verified, GPQA Diamond, an Elo rating, etc.) — different metrics aren't directly comparable across rows, and "Not verified" means we found no credible published score rather than that the model scores zero.

Reading the ranking

Prompt caching matters more for coding workloads than almost any other use case, since coding agents typically re-send large, mostly-unchanged file context on every call — a model that looks pricier on raw per-token rate can come out cheaper once caching discounts are applied, and the ranking above already accounts for that.

Rate limits, SLA & data residency

Cheapest-per-token is moot if you're throttled. Cost table above, capacity/policy context below.

OpenAI

Rate limits: Five spend-based usage tiers (Tier 1 at $5 spent up to Tier 5 at $1,000+ cumulative spend and 30+ days), enforced on requests and tokens per minute and per day. A new account starts at Tier 1 with meaningfully lower limits than an established Tier 5 or enterprise account.

SLA: No published uptime SLA on standard pay-as-you-go API access. Enterprise / high-commitment customers can negotiate priority processing and an SLA via sales.

Data residency: Official data residency program for at-rest processing/storage in specific regions (EU, UK, Japan, Canada, South Korea, Singapore, Australia, India, UAE), plus a Zero Data Retention option — both sales-gated for eligible enterprise customers.

Source · checked 2026-07-18

Anthropic

Rate limits: Organization-level usage tiers (Start, Build, Scale, plus custom enterprise), tied to spend, with separate request- and token-per-minute ceilings. Self-service increase requests unlock once you hit roughly 50% of your current limit.

SLA: No uptime guarantee on the default Standard tier. A Priority Tier product targeted 99.5% uptime for committed-capacity contracts, though Anthropic's docs currently note it's no longer available for new purchases (existing contracts continue through term).

Data residency: Zero Data Retention available for eligible orgs. The direct API only supports "us" or "global" inference routing today — dedicated EU-only residency requires routing through AWS Bedrock or Google Vertex AI's EU endpoints instead.

Source · checked 2026-07-18

DeepSeek

Rate limits: No public requests-per-minute tier table — DeepSeek instead publishes a fixed concurrent-request cap per model per account, with capacity expansion available on request at no extra cost.

SLA: Not verified: no published uptime SLA was found in official DeepSeek documentation or policy pages as of the last check.

Data residency: DeepSeek's privacy policy states personal data is collected, processed, and stored in the People's Republic of China. No published enterprise zero-data-retention program or region-choice option was found.

Source · checked 2026-07-18

xAI

Rate limits: Team-level tiers set by cumulative API spend (tracked since Jan 1, 2026), with per-model request- and token-per-minute limits that unlock automatically as spend grows and don't downgrade.

SLA: Not verified: xAI references an enterprise uptime commitment, but a specific percentage could not be confirmed on an xAI-owned page as of the last check — confirm directly with xAI before relying on a number.

Data residency: Standard API data is retained roughly 30 days for abuse auditing then deleted, with no training on API inputs/outputs by default. An Enterprise Vault option adds dedicated infrastructure, customer-managed keys, and tenant isolation.

Source · checked 2026-07-18

Methodology

Each candidate's current per-1M-token input/output rate is applied to a 24M input / 6M output token monthly workload, with cache and batch discounts applied where the provider currently offers them, read live from the catalogue and ranked by resulting monthly cost.

Frequently asked questions

What counts as a "coding-capable" model here?

Models that providers market or tune specifically for coding-agent and tool-use workloads, spanning several providers rather than one — see the live table above for the current ranked list and each model's quality tier.

Will the cheapest model produce good code?

Not necessarily — this ranking is by cost, not by output quality. Budget-tier models generally trade some capability for price; validate against your own codebase and task complexity before standardizing on the cheapest option.

Does this include coding assistant subscriptions like Cursor or Copilot?

No — this ranks metered API pricing for coding-oriented models. For seat-priced coding assistant subscriptions, see the best AI coding assistant for teams comparison.

Related guides