What AI Assistants Cost: Plans, API Keys and Limits

Plan or API key? How Claude Code, Codex and Gemini CLI charge you, what happens at the usage limit, and five habits that keep your bill free of surprises.

Checked against official docs on 29 Oct 2026

On this page

You pay the AI company directly. This site sells no AI plans. This page explains how each company charges, so that you can choose well and avoid a surprise bill. We show no prices here, because prices change. Each section links to the official page.

Two ways to pay

  • A plan (subscription). You pay a fixed amount each month. Your use is included up to a limit. When you reach the limit, you wait until it resets, or you buy extra use.
  • An API key. An API key is a secret code from the AI company's developer site. You pay for each use, counted in tokens (small pieces of text that the model reads and writes). There is no fixed monthly amount, so a long task can cost more than you expect.

For a beginner, a plan is the safer start: the cost is fixed.

Claude Code

  • What you need: a Claude Pro, Max, Team or Enterprise plan, or a Claude Console account. The free Claude plan does not include Claude Code.
  • With a plan: your use is included up to your plan's limits. On Pro and Max you can turn on usage credits to keep working past the limit, and set a monthly spend limit for them.
  • With a Console account: Anthropic bills each token you use.
  • Check your use: type /usage in a session. On a plan it shows your usage bars.
  • Watch out: if a setting called ANTHROPIC_API_KEY exists on your computer and you approve it, Claude Code uses that key instead of your plan, and the key is billed per use. Type /status to see which one is active.

Official pages: Claude plans and Claude Code costs.

Codex CLI

  • What you need: a ChatGPT Plus, Pro, Business, Edu or Enterprise plan, or an OpenAI API key. OpenAI's plan table lists Codex CLI for these. The Free and Go plans list Codex in the desktop app only.
  • With a plan: how much you can do depends on the model, the size of the task and the length of the session. If you reach the limit during a task, Codex can still finish that turn, subject to fair use limits. Plus and Pro users can buy extra credits.
  • With an API key: OpenAI bills your use at its standard API rates.
  • Free API credits from a ChatGPT plan do not pay for Codex. ChatGPT Pro and Business plans can include free API credits, up to $500 per month. OpenAI says: "Codex usage through API keys is not supported by this benefit." These credits also do not raise your Codex limits when you sign in with ChatGPT. They are not the same as the extra Codex credits that Plus and Pro users can buy.
  • Check your use: type /status in a session, or open OpenAI's usage dashboard.

Official page: Codex pricing.

Gemini CLI

  • Who can use it: since 18 June 2026, Google no longer serves Gemini CLI for personal accounts with no paid plan, for Google AI Pro, for Google AI Ultra or for Gemini Code Assist for individuals. Google's replacement for these accounts is Antigravity CLI. See Install Gemini CLI.
  • With a company licence: Gemini Code Assist Standard and Enterprise still work with Gemini CLI. Your company pays a fixed price for each user.
  • With an API key or Vertex AI: Google bills each use at its API rates. Google's announcement names paid API keys for Gemini CLI. Google's README now calls paid API and Vertex keys "legacy" and says Gemini CLI is for Code Assist Standard and Enterprise.
  • Daily limits: they depend on your account. Google's pages do not show the same numbers today, so we show none here. Read Google's quota page for your account.
  • Check your use: type /stats model in a session. It shows token counts and quota.

Official pages: Gemini CLI quotas and pricing and Gemini API pricing.

For Antigravity CLI, Google lists its plans and limits on the Antigravity pricing page.

Five habits that prevent surprises

  1. Start with a plan, not an API key.
  2. If you use an API key or extra credits, look for a spend limit and set it first. Anthropic offers a monthly spend limit for usage credits on Pro and Max, and workspace spend limits in the Claude Console.
  3. Check your use every week with the command for your assistant: /usage, /status or /stats model.
  4. Give the assistant small, clear tasks. Long sessions and big projects use more of your allowance.
  5. Do not leave an assistant running unattended with full permissions. A task that goes wrong keeps using your allowance.

Treat an API key like a password: do not paste it into chats, websites or shared files. If you think someone else saw a key, delete it on the provider's site immediately and make a new one.

Plans and limits change often. Before you pay, read the official page for your assistant on the same day.

Sources