What coding with Claude Code, Codex CLI and Cursor costs in Toman
A coding agent sends the whole conversation again on every call, so most of a session's input is read from the prompt cache. 1xAi bills a cached token at the vendor's own cache price plus the model's usual markup. In this page's example, a Claude Code session of 60 calls on claude-sonnet-5-5 comes to about 178,310 Toman, and the same session without the cache to 1,050,318 Toman. There is no coding subscription: each session is paid from the wallet, and credit you buy yourself has no expiry date.
Last updated:
How an agent session is billed
- A coding agent makes one model call per step, and each call sends the whole conversation so far again: the instructions, the files it read and the tools' output. So most of a session's input repeats, and the model's vendor reads it from the prompt cache.
- Each call is billed on its own, and its tokens have four rates: uncached input, input read from the cache, input written to the cache (on Anthropic) and output (the formula).
- A token read from the cache is billed at the model vendor's own cache price, plus the same markup as the model's other tokens (15% to 30% depending on the model), times the day's dollar rate. There is no separate markup on the cache. When a vendor publishes no cache price for a model, a cached token is billed at the input rate (prompt caching and the markup).
- Claude's prompt cache works only on the native Anthropic route, which is the route Claude Code connects to. OpenAI and Gemini models cache automatically.
- The prices on this page are read from the live price list (pricing page) and move with the day's dollar rate. 10% VAT is added once to each top-up, not to each call. An account that spent more than 5,000,000 Toman in 30 days pays a lower markup.
| Model | Input | Cache read | Cache write | Output |
|---|---|---|---|---|
claude-sonnet-5-5 | Input:325,680 Toman | Cache read:16,284 Toman | Cache write:407,100 Toman | Output:1,628,400 Toman |
claude-opus-5-5 | Input:624,220 Toman | Cache read:31,211 Toman | Cache write:780,275 Toman | Output:3,121,100 Toman |
gpt-5.3-codex | Input:569,940 Toman | Cache read:56,994 Toman | Cache write:Same as input | Output:4,559,520 Toman |
gpt-6.2-sol | Input:651,360 Toman | Cache read:32,568 Toman | Cache write:814,200 Toman | Output:3,256,800 Toman |
Example: a Claude Code session
The assumption of this example, not a measurement of anyone's account: a Claude Code session on claude-sonnet-5-5 of 60 model calls, whose context grows to about 80,000 tokens. Each call reads the earlier part of the conversation from the cache and writes the new part to it.
| Tokens | Count | Price per million tokens | Cost |
|---|---|---|---|
| Read from the cache | Count:2,850,000 | Price per million tokens:16,284 Toman | Cost:46,409 Toman |
| Written to the cache | Count:120,000 | Price per million tokens:407,100 Toman | Cost:48,852 Toman |
| Uncached input | Count:30,000 | Price per million tokens:325,680 Toman | Cost:9,770 Toman |
| Output | Count:45,000 | Price per million tokens:1,628,400 Toman | Cost:73,278 Toman |
| Session total | Count:3,045,000 | Price per million tokens: | Cost:178,310 Toman |
The same session without the cache, all 3,000,000 input tokens at the input rate, would have cost 1,050,318 Toman. The same tokens on claude-opus-5-5 come to about 341,760 Toman. Each call's amount is rounded up on its own, so the real total is a few Toman more.
Example: a Codex CLI session
The assumption of this example: a Codex CLI session on gpt-5.3-codex of 50 calls. Codex speaks only the Responses API, which on 1xAi takes OpenAI models. OpenAI caches a repeated prefix by itself, and writing to the cache costs nothing extra.
| Tokens | Count | Price per million tokens | Cost |
|---|---|---|---|
| Read from the cache | Count:1,700,000 | Price per million tokens:56,994 Toman | Cost:96,890 Toman |
| Uncached input | Count:300,000 | Price per million tokens:569,940 Toman | Cost:170,982 Toman |
| Output | Count:40,000 | Price per million tokens:4,559,520 Toman | Cost:182,381 Toman |
| Session total | Count:2,040,000 | Price per million tokens: | Cost:450,253 Toman |
The same session without the cache would have cost 1,322,261 Toman.
Example: Cursor with a 1xAi key
Cursor connects with your own key through the OpenAI-compatible route (/v1/chat/completions). On that route OpenAI models cache automatically and Claude has no prompt cache, so with the same tokens the cost depends on the model. The assumption of this example: 30 requests with 900,000 input tokens (600,000 of them repeated, which are cached) and 30,000 output tokens.
| Model | Cache on this route | Cost |
|---|---|---|
gpt-6.2-sol | Cache on this route:Automatic | Cost:312,653 Toman |
claude-sonnet-5-5 | Cache on this route:None | Cost:341,964 Toman |
For Claude with prompt caching, use a tool that connects to the native route, such as Claude Code.
Bought credit does not expire
- Credit you buy yourself has no expiry date (refunds and expiry). A session is billed when it runs; a day without coding costs nothing, and the balance stays where it is.
- A coding pack sold for one day or one week ends on its date, used or not. To compare, multiply the cost of an example session above by the number of sessions you actually run in that day or week.
- 1xAi has no coding subscription or pack today: every token is billed at the model's price on the pricing page. A top-up starts at 1,000 Toman.
- The sign-up wheel's gift credit is different: it is valid for 14 days from the spin.
Lowering the bill
- Keep a session going: Anthropic's default cache is dropped five minutes after its last use, and the call after that writes the context again at the cache-write rate.
- In Claude Code,
/compactsummarises a long conversation and/clearstarts a new one; a smaller context means less input on every call. - Use a cheaper model for simple work: the
/modelcommand in Claude Code, or themodelkey in Codex'sconfig.toml. - Put a spend cap on the key you give the agent (API keys), so that a runaway loop cannot spend the whole balance. Each call's cost is in the usage log.
1xAi is an independent gateway. It is not affiliated with, endorsed by, or a reseller for OpenAI, Anthropic, Google, DeepSeek, xAI, Moonshot AI, Z.ai, Alibaba Qwen, MiniMax or Tencent Hunyuan. Requests are relayed upstream rather than answered by models of our own, so each provider's own usage policies apply to what their models will and will not do, and their model availability is theirs to change. Current reachability is published on the status page.