API prices updated daily · plan prices checked October 2026

Coding agent cost calculator

What do Claude Code, Codex or Gemini CLI cost per month on the API, and is a subscription cheaper?

Mostly chatting with ChatGPT, Claude or Gemini? Use the subscription vs API calculator →

How you use coding agents

Typical task
22
Prompt caching
Tokens per month Input 0 Output 0

An agent re-sends its whole working context on every step: system prompt, tools, the files it has read and earlier steps. So one task can use hundreds of thousands of input tokens. With caching, repeated context is billed at about 10% of the input price.

How much does Claude Code cost per month?

On Claude Pro or Max you pay the plan price ($20, $100 or $200) within its usage limits. On the API you pay per token: with caching, a typical feature task on Sonnet costs about $0.70, so 10 tasks a day come to roughly $150 a month.

Why do coding agents use so many tokens?

Every step sends the whole context again: system prompt, tool definitions, files the agent has read and all earlier steps. A 25-step task can send over a million input tokens, even if the code it writes is short.

Subscription or API for coding agents?

For a few small tasks a day the API is usually cheaper. For heavy daily use a $100–200 plan often costs less than the API would, as long as you stay within its limits.