AI Coding Model Pricing Comparison 2026

Compare 61 AI models from 10 providers. See exactly how much each model costs for your coding projects — from small scripts to large codebases.

Get Started with AI APIs

Ready to start coding with AI? Get API access from the leading providers.

Sign up for API access to Claude, GPT-4, Gemini, Qwen, and more — all from one place.

Get Claude API Access → Get OpenAI API Access → Get Gemini API Access →

Provider Showdowns

Which AI provider gives you the best value for coding? Head-to-head ecosystem comparisons.

Compare Top AI Models by Cost

All prices per million tokens. Click any model for detailed cost estimates across common coding scenarios.

Model Provider Input ($/M) Output ($/M) Cache Read ($/M) Small Script Medium Feature Large Project
Claude Sonnet 4 Anthropic $3.00 $15.00 $0.300 $0.62 $4.66 $23.29
Claude Opus 4 Anthropic $15.00 $75.00 $1.50 $3.08 $23.29 $116.44
Claude 3.5 Sonnet Anthropic $3.00 $15.00 $0.300 $0.62 $4.66 $23.29
Claude 3.5 Haiku Anthropic $0.800 $4.00 $0.080 $0.16 $1.24 $6.21
Claude 3 Opus Anthropic $15.00 $75.00 $2.77 $20.25 $101.25
Claude 3 Sonnet Anthropic $3.00 $15.00 $0.55 $4.05 $20.25
Claude 3 Haiku Anthropic $0.250 $1.25 $0.05 $0.34 $1.69
GPT-4o OpenAI $2.50 $10.00 $1.25 $0.41 $3.06 $15.31
GPT-4o mini OpenAI $0.150 $0.600 $0.075 $0.02 $0.18 $0.92
GPT-4 Turbo OpenAI $10.00 $30.00 $1.25 $9.50 $47.50
GPT-4 OpenAI $30.00 $60.00 $2.85 $22.50 $112.50
GPT-3.5 Turbo OpenAI $0.500 $1.50 $0.06 $0.48 $2.38
Gemini 2.5 Pro Google $1.25 $10.00 $0.34 $2.44 $12.19
Gemini 2.5 Flash Google $0.150 $0.600 $0.02 $0.17 $0.86
Gemini 2.0 Flash Google $0.100 $0.400 $0.02 $0.12 $0.58
Gemini 1.5 Pro Google $1.25 $5.00 $0.19 $1.44 $7.19
Gemini 1.5 Flash Google $0.075 $0.300 $0.01 $0.09 $0.43
Qwen 3.6 Plus Qwen $3.00 $15.00 $0.300 $0.62 $4.66 $23.29
Qwen Max Qwen $1.60 $6.40 $0.25 $1.84 $9.20
Qwen Plus Qwen $0.400 $1.20 $0.05 $0.38 $1.90
Qwen Turbo Qwen $0.080 $0.240 $0.01 $0.08 $0.38
DeepSeek Chat V3 DeepSeek $0.270 $1.10 $0.04 $0.31 $1.57
Mistral Large 2 Mistral $2.00 $6.00 $0.25 $1.90 $9.50
Mistral Small 3 Mistral $0.100 $0.300 $0.01 $0.10 $0.47
Claude 4 Haiku Anthropic $0.800 $4.00 $0.080 $0.16 $1.24 $6.21
Gemini 2.5 Flash Lite Google $0.037 $0.150 <$0.01 $0.04 $0.22
Mistral Medium Mistral $0.400 $2.00 $0.07 $0.54 $2.70
DeepSeek V3.2 DeepSeek $0.300 $1.20 $0.05 $0.34 $1.73
Qwen 3 Turbo Qwen $0.150 $0.600 $0.02 $0.17 $0.86
Grok 3 xAI $3.00 $15.00 $0.55 $4.05 $20.25
Grok 3 Mini xAI $0.300 $0.500 $0.03 $0.21 $1.02
Gemini 2.0 Pro Google $2.50 $10.00 $0.39 $2.88 $14.38
GPT-4.1 OpenAI $2.00 $8.00 $0.31 $2.30 $11.50
Qwen 3 Max Qwen $5.00 $20.00 $0.78 $5.75 $28.75
Mistral Large 3 Mistral $2.00 $6.00 $0.25 $1.90 $9.50
DeepSeek Jiuge DeepSeek $0.150 $0.600 $0.02 $0.17 $0.86
Grok 3 Vision xAI $5.00 $20.00 $0.78 $5.75 $28.75
Claude Sonnet 4 Lite Anthropic $1.00 $5.00 $0.100 $0.21 $1.55 $7.76
Llama 3.3 70B Meta $0.250 $1.00 $0.04 $0.29 $1.44
Reka Flash Reka $0.200 $0.800 $0.03 $0.23 $1.15

Most Cost-Effective Models

Lowest input token prices — best for high-volume tasks and budget projects.

AI Coding Platforms

Popular tools and IDEs that use AI models for coding. See which models they support and how much they cost.

Cursor

AI-first code editor built on VS Code. Supports multiple models including Claude and GPT-4.

Free tier available, Pro $20/mo, Business $40/mo/user

GitHub Copilot

AI pair programmer by GitHub and OpenAI. Integrated into VS Code, JetBrains, and Neovim.

Free for students, $10/mo individual, $19/mo business

Claude Code

Anthropic's official CLI tool for coding with Claude. Terminal-based AI coding assistant.

API usage-based pricing

Aider

AI pair programming in your terminal. Supports many models via API.

Free open source, API usage-based

Cline

Autonomous coding agent in VS Code. Can create/edit files, run commands, and use browser.

Free extension, API usage-based

Roo Code

Open-source AI coding assistant forked from Cline. Supports multiple API providers.

Free open source, API usage-based

Continue

Open-source AI code assistant for VS Code and JetBrains. Bring your own model.

Free open source, API usage-based

OpenAI Codex CLI

OpenAI's CLI tool for AI-assisted coding. Uses OpenAI's o-series models.

API usage-based

Open Interpreter

Natural language code execution on your computer. Runs code locally.

Free open source, API usage-based

Windsurf

AI-first IDE by Codeium (now part of AI coding ecosystem). Multi-model support with deep IDE integration and cascading AI assistance.

Free tier available, Pro $15/mo, Business $30/mo/user

Devstral

Mistral's open-weight coding agent. Designed for autonomous code generation and terminal-based development workflows.

Free open source, API usage-based via Mistral platform

Browse by Category

Best AI Tools For Your Use Case

Find the right model for your specific needs — ranked and priced.

View All Use Cases →

Cheapest AI for Every Use Case

Find the most affordable AI model for your specific task. Save up to 99% on AI API costs.

View Budget Analyzer →

State of AI Coding Costs 2026

Our comprehensive report analyzing pricing across all providers and models.

State of AI Coding Costs 2026 — Full Report

Complete analysis of 61 models from 10 providers. Includes cheapest-per-scenario breakdowns, provider comparisons, and key insights for developers and startups.

Read the full report →

AI API Budget Planner

Enter your monthly budget and team size. Get personalized model recommendations with shareable plans.

Plan Your AI API Budget →

See exactly how many API calls you can afford, which models fit your budget, and share your plan with your team.

Open Budget Planner →

What's New — Latest AI Model Releases

Stay up to date with the latest AI coding models added to our directory.

View All Updates →

Frequently Asked Questions

How much does AI coding cost?

AI coding costs range from $0.037/M tokens (Gemini 2.5 Flash Lite) to $30.00/M tokens (GPT-4). A typical small script (1K lines) costs between $0.01 and $2.85 depending on the model.

Which AI model is cheapest for coding?

The cheapest model is Gemini 2.5 Flash Lite at $0.037/M input tokens. For coding-specific tasks, Microsoft Phi-4 offers the best price-performance among coding-optimized models.

What is prompt caching and why does it matter?

Prompt caching lets you reuse previously processed context at a fraction of the cost. Models with caching (like Claude) can save 80-90% on repeated context. For a project with 70% cache hit rate, effective input costs drop significantly.

How do you calculate estimated costs?

We estimate based on typical token usage for each scenario: input tokens (reading existing code + your prompt), output tokens (generated code), and cache tokens (reused context). Actual costs vary by project complexity and code quality.