Ninja Builder Sign in Get started

What AI coding really costs: subscriptions vs API keys

Plans with limits or pay-per-token API keys: how coding usage is counted, current prices, and how to estimate your own bill.

By Ninja Builder team5 min read
Title card: What AI coding really costs, beside a screenshot of AI accounts with weekly usage meters

Key takeaways

  • You pay either a monthly plan with usage limits or an API key billed per token.
  • Entry plans with a coding agent cost $8 to $20 a month in December 2026; heavy plans run from $39 to $200 or more.
  • Agents use far more tokens than chat because they re-read a growing context on every step.
  • Measure a week of real use before upgrading; occasional limits are cheaper to solve with extra credits or a second provider.

AI coding costs money in one of two ways: a monthly subscription that includes a usage allowance with limits, or an API key where you pay for every token the model reads and writes. Entry plans from Anthropic, OpenAI and GitHub cost between $8 and $20 a month in December 2026, and heavier plans run from about $39 to $200 or more. What you actually spend depends less on the price list and more on how you use agents, because a coding agent reads far more text than a chat does.

This guide explains how usage is counted, lists the current plans with links to the official pages, and shows how to estimate and lower your own cost.

Two ways to pay: plans and API keys

Comparison diagram: subscription plans have a fixed monthly price and limits that reset; API keys have no monthly fee but bill every input, output and cached token, so spend grows with use
Plans cap your bill and your usage. API keys cap neither, unless you set a budget.

With a subscription (Claude Pro, ChatGPT Plus, Copilot Pro and so on) you pay a fixed price and get an allowance. When you use it up you wait for a reset, buy extra, or move to a bigger plan. Your bill is predictable; your access is not unlimited.

With an API key you pay per token, at a price set for each model. Nothing stops you at a limit, so the bill follows your usage exactly. That suits automation and short bursts of heavy work, and it can surprise you if an agent runs for hours.

Why coding agents use so many tokens

A token is a piece of text, roughly a short word or part of a longer one. Providers count three kinds: input (what the model reads), output (what it writes) and cached input (text it has seen recently, usually billed at a lower rate).

A chat question might use a few thousand tokens. An agent is different. On every step of its loop it re-reads the conversation so far, the instructions, and the files it opened, then writes a little more. A task that takes thirty steps re-reads that growing context thirty times. That is why one afternoon of agent work can use more of your allowance than a month of chatting, and why long sessions get more expensive as they go.

Current subscription prices

These are the published prices on each vendor's page in early December 2026, before tax. They change often, so treat the links as the source of truth.

ProviderPlans that include the coding agentHow usage is counted
Anthropic (Claude Code)Pro $20 a month ($17 billed yearly), Max $100, Ultra $200, Team and Enterprise per seat. The Free plan does not include Claude Code.A five-hour session limit and a weekly limit, shared between the Claude apps and Claude Code
OpenAI (Codex)Free, Go $8, Plus $20, Pro from $100, Business $25 per user monthly ($20 billed yearly)Plus: a number of messages per five-hour window, varying by model; weekly limits may apply. Pro currently has no five-hour limit
GitHub (Copilot)Free, Pro $10, Pro+ $39, Max $100, Business $19 and Enterprise $39 per seatMonthly AI credits (1 credit = $0.01), priced by tokens and model. Code completions stay unlimited on paid plans

Two details that matter. Anthropic's limits are shared, so a long Claude chat in the browser eats into the same allowance as your coding agent. And Copilot's credit allowance is spent faster on larger models, so the same plan buys a different amount of work depending on the model you pick.

What happens when you reach a limit

  • Claude: Anthropic lists four options: wait for the reset, turn on usage credits (available on Pro and Max), switch to a Console account with API credits, or upgrade. We cover these in what to do when you hit your Claude limit.
  • Codex: wait for the displayed reset, buy credits (eligible Plus and Pro users can do this without changing plan), or upgrade.
  • Copilot: upgrade, set a budget for additional usage, or wait for the monthly reset.

When an API key makes sense

API pricing is listed per million tokens and differs a lot between models, so compare on the official pages: Anthropic, OpenAI and Google Gemini. An API key is a good fit when you run agents from scripts or CI, when you need more than any plan allows for a short period, or when your company wants usage billed to one account. Always set a monthly spend limit in the provider's console before you start an agent on a key.

There is also a third option: running a model on your own computer. There is no per-token bill, but you need capable hardware, and local models are usually weaker than the top hosted ones on large coding tasks.

How to estimate your own cost

  1. Start on an entry plan from a provider you like, for one or two weeks of normal work.
  2. Watch the meters. Note how often you hit a limit and on which kind of task. Most tools show usage: Claude's usage settings, OpenAI's Codex usage page, Copilot's /usage command.
  3. Find the expensive habits. Usually it is a few long sessions, not many short ones.
  4. Decide: if you hit limits only now and then, buying extra or adding a second provider is cheaper than the next plan up. If you hit them daily, the bigger plan probably pays off.

Ways to spend less

  • Give one clear task per session and start fresh when the topic changes.
  • Point the agent at the files that matter instead of the whole repository.
  • Use a smaller, cheaper model for routine edits and save the top model for hard problems.
  • Keep a short project instructions file so the agent doesn't rediscover your setup each time.

More detail in how to reduce token usage.

See exactly where your usage goes

Ninja Builder, a desktop app for Mac, Windows and Linux, uses the AI accounts you already pay for and shows where the tokens went. Activity › Usage lists every chat with its share of the tokens you used over 24 hours, 7, 30 or 90 days, including the workflows and background agents that chat started. It counts every provider you use, from Claude to ChatGPT, Gemini, Copilot, Cursor and local models, and it shows tokens, never money.

Ninja Builder Usage panel with a 24-hour token chart and a list of chats ranked by their share of usage
Every chat listed by its share of your usage, biggest first.

For Claude accounts, Settings › Accounts shows each account's Week meter and when it resets. When a limit stops a chat, you can wait for the reset or carry on with a ChatGPT, Gemini or local model account in the same chat.

Ninja Builder Settings, Accounts page with three AI accounts, each with a weekly usage meter and time until reset
Week meters and reset times per account.
Track Claude Usage & Limit Resets Per Chat: Ninja Builder Statistics

Ninja Builder itself costs $4.99 a month after a 14-day free trial, on top of whatever AI plan you use (pricing). Download Ninja Builder to see your own numbers.

Frequently asked questions

Is it cheaper to use an API key or a subscription for coding?

For steady daily use a subscription is usually more predictable, because the bill is fixed. An API key suits automation and short bursts, but long agent sessions can cost more than a plan. Set a spend limit if you use a key.

Why does a coding agent use up my limit so fast?

On every step an agent re-reads the conversation, its instructions and the files it opened. A task with many steps re-reads a growing context many times, so it uses far more tokens than a chat.

Does my ChatGPT Plus plan include API credits?

No. ChatGPT plans include Codex use with your ChatGPT sign-in, but API usage is billed separately on the OpenAI platform.

What is a GitHub AI credit worth?

GitHub's billing documentation puts one AI credit at $0.01. Credits are used by Copilot Chat, the CLI and agents, priced by tokens and model; code completions on paid plans do not use credits.

Keep reading