AI coding pricing, compared
There are three ways to pay for AI coding agents: a monthly subscription, the vendor API at list price, or Code By AI. This page puts the real numbers side by side so you can pick in a minute.
One key covers four protocols — Anthropic Messages, OpenAI Responses, OpenAI Chat Completions and Gemini — at the same per-token price, and the OpenAI-format endpoints answer Claude models too.
Three ways to buy
Subscription
A flat monthly fee for a capped amount of usage. Predictable, but you stop working when the cap hits, and unused quota does not roll over.
Vendor API
Pay per token at list price. No ceiling, but a heavy month on a frontier model costs far more than a subscription.
Code By AI
The same agents behind one key, billed from 1/10 of list price per token. No monthly commitment, no per-vendor accounts.
What a working month costs
Example workload: 20M input tokens and 2M output tokens per month, before cache savings.
| By channel | Workload | List price | Code By AI | You save |
|---|---|---|---|---|
| Codexgpt-5.6-terra | 20M / 2M | $80.00 | $10.67 | 87% |
| Claude Codeclaude-sonnet-5 | 20M / 2M | $60.00 | $8.00 | 87% |
| Geminigemini-3.8-flash | 20M / 2M | $22.50 | $2.25 | 90% |
How paying works
- 01
Top up your balance
Pick an amount and pay; the credit lands in your balance right away.
- 02
Create one API key
The same key works for Claude Code, Codex and Gemini.
- 03
Pay per token as you use it
Usage is deducted from your balance at the rate on each model card. Volume discount starts at 120 quota ($20 before discount).
By channel
Pricing questions
- Does Code By AI really start at 1/10 of the official price?
- Yes, as low as 1/10. Each model is billed at a fixed fraction of the vendor list price: 1/10 for Gemini, 1/7.5 for Claude and Codex, and 1/5 for the Claude Fable models. Every model page shows both the list price and what you pay.
- Do unused tokens expire?
- There is no monthly plan or quota. You top up a balance and it is debited per token as you use it — nothing resets at the end of the month.
- Can I switch between Claude, Codex and Gemini?
- Yes. One API key covers all three channels. Each channel has its own endpoint and wire format, so you switch by pointing the matching client at us — Claude Code, Codex CLI and Gemini CLI each already speak theirs.
- Do I need a separate key for each protocol?
- No. One key is accepted by all four endpoints. Claude models are also callable through the OpenAI-format endpoints: send claude-sonnet-5 to /v1/chat/completions and it is forwarded to the Claude channel at Claude prices, so any OpenAI SDK can reach Claude without an Anthropic client. GPT and Codex models stay on the OpenAI endpoints and Gemini on its own endpoint, because the gateway forwards protocols rather than translating them.
- Where do the models come from?
- Code By AI does not host models. Requests are forwarded to third-party model provider channels for Claude, GPT and Gemini, which is how the prices stay below the official rates. If you name a model ID whose family prefix is known but whose suffix is unknown or misspelled, the request is answered by that family's default model and billed at its price.
- How reliable is the service?
- Our request success rate is above 99%. There is no public status page yet; if a request fails before the model returns a result, it is not charged.
Volume discount starts at 120 quota ($20 before discount), up to 15%.