Best for · AI tools

Best AI model for coding: what each lab says, and what it costs

We read every plan page. Paid links are labelled. Money never changes a ranking. How we pick.

Verdict Our pick

The bar guide has a call.

The vectaai bar guide pointing at the verdict
  • Opus 5.5 or Gemini 4 Carbon for big refactors and agents that run for a long time.
  • Sonnet 5.5 or Hydrogen for daily edits and autocomplete-style help.
  • Claude Fable 5.2 ($8 and $40) only for the hardest reasoning jobs.

Compared here

  • 01Claude Opus 5.5
  • 02Claude Sonnet 5.5
  • 03Gemini 4 Carbon
  • 04Gemini 4 Hydrogen
  • 05gpt-5.3-codex
  • 06Claude Fable 5.2

Short answer

For most coding work, start with Claude Opus 5.5: Anthropic describes it as built "for long-running agentic coding and knowledge work", it is the model Anthropic tells you to start with, and it costs $4 per million input tokens and $20 per million output tokens on the API. Google's equivalent is Gemini 4 Carbon, "built for complex software engineering", at the same $4 and $20. For cheap everyday coding, Gemini 4 Hydrogen ($1.50 and $7.50, with a free API tier) and Claude Sonnet 5.5 ($2 and $10) are the value picks. OpenAI's pricing page names one coding-specific model, gpt-5.3-codex, at $1.75 and $14.

Pick Opus 5.5 or Gemini 4 Carbon for big refactors and agents that run for a long time. Pick Sonnet 5.5 or Hydrogen for daily edits and autocomplete-style help. Pick Claude Fable 5.2 ($8 and $40) only for the hardest reasoning jobs. Below: the price table, what each lab says each model is for, free ways in, and how to test on your own code.

See Claude plansTry Google AI Studio

Sponsored links. We may earn a commission; it never changes the pick.

At a glance

From platform.claude.com model overview, aistudio.google.com pricing and developers.openai.com pricing, read 3 December 2026. Standard API prices in US dollars per million tokens. The labs do not rank each other's models; descriptions are each vendor's own words.
ModelMakerInput / output per 1M tokensVendor's own descriptionFree API tier
Claude Opus 5.5Anthropic$4 / $20"For long-running agentic coding and knowledge work"No
Claude Sonnet 5.5Anthropic$2 / $10"The best combination of speed and intelligence"No
Claude Fable 5.2Anthropic$8 / $40"For demanding reasoning and long-horizon agentic work"No
Gemini 4 CarbonGoogle$4 / $20"Built for complex software engineering"Not available
Gemini 4 NeonGoogle$3 / $15"Complex software engineering, knowledge work, and science workflows"Not available
Gemini 4 HydrogenGoogle$1.50 / $7.50"Everyday coding and agentic workflows"Free of charge tier
Gemini 3.8 FlashGoogle$0.75 / $3.75 until 31 Dec 2026, then $1.50 / $7.50"Engineered for long-horizon software engineering"Free of charge tier
gpt-5.3-codexOpenAI$1.75 / $14Listed under Codex in specialized modelsNot stated
gpt-6.2-solOpenAI$2 / $10Listed as a flagship model; no coding descriptionNot stated

Money talk first. We may earn from some links on this page one day, but none of the three labs pays us for a ranking, and money does not change the order. We did not run our own benchmark suite. Benchmarks go stale in weeks, and the labs rarely compare themselves against rivals on their official pages. What we did: read Anthropic's, Google's and OpenAI's own model and pricing pages on 3 December 2026, and quote what each says its models are for and what they cost.

The honest answer first

"Best" depends on three things: how hard the task is, how long the model must work on its own, and how much you will spend. Once you know those, the field narrows fast:

  • Hard, long, agentic work (big refactors, multi-file features, agents running for an hour): Claude Opus 5.5 or Gemini 4 Carbon.
  • Everyday coding (functions, tests, bug fixes, explanations): Claude Sonnet 5.5, Gemini 4 Hydrogen or gpt-5.3-codex.
  • Hardest reasoning only: Claude Fable 5.2, at twice Opus 5.5's price.
  • Free: Gemini 4 Hydrogen's API free tier, Copilot Free, or a local open model.

What each lab says its models are for

Anthropic. The models overview says: "If you're unsure which model to use, start with Claude Opus 5.5 for most workloads." It describes Opus 5.5 as "For long-running agentic coding and knowledge work", Sonnet 5.5 as "The best combination of speed and intelligence", and Fable 5.2 as "For demanding reasoning and long-horizon agentic work". All three have a 1 million token context window and 128K tokens of max output, and a reliable knowledge cutoff of June 2026.

Google. The Gemini API pricing page describes Gemini 4 Carbon as "built for complex software engineering", Neon for "complex software engineering, knowledge work, and science workflows", and Hydrogen for "everyday coding and agentic workflows". Gemini 3.8 Flash is "engineered for long-horizon software engineering". Note that Gemini 4 Argon is deprecated, and Google says its requests route to Carbon from 15 December 2026.

OpenAI. The API pricing page lists a long set of flagship models, from gpt-6-luna at $0.10 and $0.50 to gpt-6-astra at $10 and $50. Only one model sits under a coding label: gpt-5.3-codex, in the Codex section of specialized models, at $1.75 input and $14 output (a fast tier costs $3.50 and $28). The page does not describe the flagship models as coding-focused, and it does not say which are current and which are legacy, so check OpenAI's model docs before you build on one.

Price per million tokens, sorted

ModelInputOutput
Gemini 3.8 Flash (until 31 Dec 2026)$0.75$3.75
Gemini 4 Hydrogen$1.50$7.50
gpt-5.3-codex$1.75$14
Claude Sonnet 5.5$2$10
Gemini 4 Neon$3$15
Claude Opus 5.5$4$20
Gemini 4 Carbon$4$20
Claude Fable 5.2$8$40

Output tokens cost far more than input, and coding agents write a lot. Two discounts matter on the Claude side: Anthropic says Batch API requests are 50% off, and prompt cache reads cost a small fraction of the base input price (5% on Opus 5.5 and Sonnet 5.5). For agents that re-read the same codebase, caching can cut the bill sharply.

Price changes coming soon

Two dates to put in your calendar if you build on these models:

  • 15 December 2026: Google says Gemini 4 Argon requests route to Carbon. Same list price ($4 and $20), but a different model answering your calls. Re-run your tests.
  • 1 January 2027: Gemini 3.8 Flash and 3.6 Flash double from $0.75 and $3.75 to $1.50 and $7.50 per million tokens, per Google's pricing page. At that point Hydrogen costs the same, so compare the two on your own tasks before the switch.

On the Claude side, the overview lists retirement dates no sooner than September 2027 for Opus 5.5 and Sonnet 5.5, so they are safe to build on for a while.

Free ways to code with AI

  • Gemini API free tier. Google lists "Free of charge" tiers for Gemini 4 Hydrogen and Gemini 3.8 Flash. Good for side projects and experiments.
  • GitHub Copilot Free. 2,000 completions a month and limited chat and agent use, per GitHub's plans page.
  • Google Antigravity Individuals. $0 a month, Gemini 4 Hydrogen, a weekly agent quota, per the Antigravity plans page.
  • Local open models. Free to run on your own machine if your hardware can handle them. Our best free local AI for coding guide covers the setup and the catch.

Model vs tool: do not mix them up

Many people searching for the best AI model really want the best coding tool. The model is the brain. The tool is the body it works in:

  • Claude Code runs Claude models in the terminal, IDEs and desktop, and comes with Claude Pro at $20 a month per the Claude pricing page.
  • Cursor, now Grok Build, lets you choose models from several labs. See Cursor vs VS Code.
  • Antigravity offers Gemini 4 models and, on paid plans, Claude Sonnet 5.5 and Opus 5.5. See Claude Code vs Antigravity.

A great model in a clumsy tool loses to a good model in a great one. Choose both.

How to pick for your own code in one afternoon

  1. Pick three real tasks from your backlog: a small bug, a medium feature, a refactor across files.
  2. Run each through two models in the same tool, for example Opus 5.5 and Gemini 4 Carbon, or Sonnet 5.5 and Hydrogen.
  3. Score what matters: did the tests pass, how many times did you step in, how much did it cost in tokens or quota.
  4. Keep the cheaper one unless the pricier one clearly saved you time. Your time is the expensive part.

Who should use what

  • Solo developer, side projects: Gemini 4 Hydrogen free tier or Copilot Free, then Claude Pro when you outgrow them.
  • Professional, daily coding: Claude Sonnet 5.5 or Opus 5.5 through Claude Code, or Gemini 4 Carbon through Antigravity.
  • Team building agents in CI: API access to Opus 5.5 or Carbon, with caching and batch discounts turned on.
  • Budget first: Gemini 3.8 Flash at the end-of-year price, or Hydrogen.

Want a tool that does not refuse security research tasks? See unrestricted coding AI. More in the AI tools hub. How we choose: how we pick.

Questions people ask

What is the best AI model for coding right now?

There is no single winner, but Claude Opus 5.5 is the safest starting point: Anthropic describes it as built for long-running agentic coding and recommends it for most workloads. Gemini 4 Carbon, described by Google as built for complex software engineering, costs the same $4 and $20 per million tokens. Test both on your own repository.

What is the best free AI model for coding?

Gemini 4 Hydrogen, for API users: Google's pricing page lists a free tier and describes it as for everyday coding and agentic workflows. Gemini 3.8 Flash also has a free tier. In editors, GitHub Copilot Free gives 2,000 completions a month, and Google Antigravity's free plan runs on Hydrogen. Running a local open model is the other free route.

Is Claude better than GPT for coding?

The labs do not publish head-to-head rankings of each other's models, and we did not run benchmarks, so we will not crown one. What we can say: Anthropic describes Opus 5.5 as built for agentic coding, while OpenAI's pricing page lists a dedicated Codex model, gpt-5.3-codex. Run the same task through both and compare the diffs.

Which AI model is cheapest for coding?

Among models whose makers describe them for coding, Gemini 3.8 Flash is cheapest on the list we read: $0.75 per million input tokens and $3.75 output until 31 December 2026, then $1.50 and $7.50. Gemini 4 Hydrogen is $1.50 and $7.50, gpt-5.3-codex $1.75 and $14, Claude Sonnet 5.5 $2 and $10.

Do I need the API, or is a subscription better?

If you code with a chat app or tool like Claude Code, Cursor or Copilot, a subscription is simpler and usually cheaper for daily use: Claude Pro is $20 a month and includes Claude Code. The API makes sense when you build your own tools, run code agents in CI, or need to pay strictly per token.

Sources

Every fact above comes from these pages. Prices change, so each one carries the date we read it.

  1. Claude models overview, checked 3 Dec 2026
  2. Gemini API pricing (Google AI Studio), checked 3 Dec 2026
  3. OpenAI API pricing, checked 3 Dec 2026
  4. Claude pricing (subscriptions), checked 3 Dec 2026
  5. GitHub Copilot plans, checked 3 Dec 2026
  6. Google Antigravity plans, checked 3 Dec 2026