Best LLM API Models for Coding

This guide highlights models whose public metadata indicates coding, programming, developer, or software-oriented use cases.

50Models listed
1M input + 500K outputCost example tokens
USD / 1MNormalized prices

Quick shortlist

Start with DeepSeek V4.1 Flash.

This guide starts with coding-oriented models and practical popularity signals so developers can shortlist options faster.

Lead model 🔥DeepSeek V4.1 Flash
ProviderDeepSeek
Sample cost$0.46
Context1.05M

The ranking is a discovery aid, not a final recommendation. Always compare the model against your workload and verify provider pricing before production use.

How to read this ranking

Models are included when their public model metadata indicates coding, programming, developer, software, or code generation use cases.

Model Ranking

Browse all models
ModelProviderPromptOutputSample costYour CostContextPopularityRelease
🔥DeepSeek V4.1 FlashDeepSeek$0.0158$0.891$0.46$0.461.05M#1
New🔥Step 5 PreviewStepFun$1$2.7$2.35$2.351M#2
🔥GLM 5.3 FlashZ.ai$0.15$0.5$0.4$0.41.05M#3
🔥Hy4 previewTencent$0.7506$2.2509$1.88$1.881.05M#5
🔥Claude Opus 5.5Anthropic$4$20$14$141M#8
🔥DeepSeek V4 Flash 0731DeepSeek$0.016$0.64$0.34$0.341.05M#9
🔥GLM 5.3Z.ai$0.12$4.8$2.52$2.521.05M#10
NewPareto 26.9unbiased$2.5$7.5$6.25$6.25262.14K
NewGemini 4 ArgonGoogle$2$10$7$71.05M
NewGemini 4 Argon (batch)Google$1$5$3.5$3.51.05M
NewClaude Haiku 5.5Anthropic$0.1$0.5$0.35$0.351M
NewClaude Haiku 5.5 (batch)Anthropic$0.05$0.25$0.17$0.171M
NewMistral Large 4Mistral$0.68$2.09$1.73$1.731.05M
NewApodex 1.1 Mini (free)Apodex$0$0$0$0262.14K
NewPareto 26.10 Previewunbiased$0.8$3.2$2.4$2.41.05M
NewGPT-6.1 SolOpenAI$2$10$7$71.05M
NewGPT-6.1 Sol (batch)OpenAI$1$5$3.5$3.51.05M
Space Bunny Alphastealth$0$0$0$01M
Claude Opus 5.5 (batch)Anthropic$2$10$7$71M
Grok 4.7SpaceXAI$2$6$5$5500K
Ternary Bonsai 2 27BPrismML$0.075$0.5$0.33$0.33262.14K
Paretounbiased$2.5$7.5$6.25$6.25262.14K
Union Alphastealth$0$0$0$0262.14K
DeepSeek V4.1 Flash (batch)DeepSeek$0.112$0.336$0.28$0.281.05M
Nex-N2.5-MiniNex AGI$0.025$0.1$0.08$0.08262.14K
Nex-N2.5-Mini (free)Nex AGI$0$0$0$0262.14K
Nex-N2.5-ProNex AGI$0.075$0.25$0.2$0.2262.14K
Nex-N2.5-Pro (free)Nex AGI$0$0$0$0262.14K
GPT-6 AstraOpenAI$10$50$35$351.05M
GPT-6 Astra (batch)OpenAI$5$25$17.5$17.51.05M
Muse Spark 1.3 ContributorMeta$0.1$0.2$0.2$0.21.05M
Muse Spark 1.3Meta$1.25$4.25$3.38$3.381.05M
Gemini 3.8 FlashGoogle$0.75$3.75$2.62$2.621.05M
Gemini 3.8 Flash (batch)Google$0.375$1.875$1.31$1.311.05M
Claude Fable 5.1Anthropic$10$50$35$351M
Claude Fable 5.1 (batch)Anthropic$5$25$17.5$17.51M
Granite 4.2 8BIBM$0.06$0.25$0.18$0.18131.07K
Qwen3.8 FlashQwen$0.15$0.47$0.39$0.391M
GLM 5.3 Flash (batch)Z.ai$0.06$0.2$0.16$0.161.05M
Muse Spark 1.2 ContributorMeta$0.1$0.2$0.2$0.21.05M
Ox Alphastealth$0$0$0$01.05M
GLM 5.3 (batch)Z.ai$0.45$2$1.45$1.451.05M
Qwen3.8 27BQwen$0.04$2.3$1.19$1.191M
Qwen3.8 27B (free)Qwen$0$0$0$0262.14K
Gemini 3.7 FlashGoogle$0.75$3.75$2.62$2.621.05M
Gemini 3.7 Flash (batch)Google$0.375$1.875$1.31$1.311.05M
Seed 2.1 TurboByteDance Seed$0.5$2.5$1.75$1.75262.14K
Seed-2.0-CodeByteDance Seed$0.5$3$2$2262.14K
Grok 4.6SpaceXAI$2$6$5$5500K
LFM2.5-2.6B (free)LiquidAI$0$0$0$065.54K

Pricing FAQ

How is the sample workload cost calculated?

The sample workload uses 1,000,000 input tokens plus 500,000 output tokens, then applies each model's normalized USD price per 1 million tokens.

Why do input and output token prices matter separately?

Many applications are output-token heavy, while retrieval and classification workloads may be input-token heavy. Comparing both prices helps avoid picking a model that is cheap for the wrong workload shape.

Should I verify prices before production use?

Yes. AI Model Matrix normalizes public pricing metadata for comparison, but provider availability, limits, and prices can change. Always verify the final contract or provider dashboard before production use.

Related Guides

Cheapest LLM APIs

Sort models by estimated workload cost and normalized token prices.

Open guide

Largest Context Windows

Find models for long documents, retrieval, and codebase context.

Open guide

Coding Models

Compare code-oriented models by cost, context, and practical popularity signals.

Open guide

Free Models

Browse zero-price models for prototypes and evaluation.

Open guide

RAG Models

Start from large context windows and practical input-cost constraints.

Open guide

Chatbot Costs

Find budget-sensitive models for output-heavy assistant traffic.

Open guide

Cost Calculator

Enter your own input and output token volume before narrowing the shortlist.

Estimate cost