IN ENGLISH · API DOCS

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:

[01]CODING AGENT COSTS

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.
Today's prices of the models in these examples, in Toman per million tokens
ModelInputCache readCache writeOutput
claude-sonnet-5-5Input:325,680 TomanCache read:16,284 TomanCache write:407,100 TomanOutput:1,628,400 Toman
claude-opus-5-5Input:624,220 TomanCache read:31,211 TomanCache write:780,275 TomanOutput:3,121,100 Toman
gpt-5.3-codexInput:569,940 TomanCache read:56,994 TomanCache write:Same as inputOutput:4,559,520 Toman
gpt-6.2-solInput:651,360 TomanCache read:32,568 TomanCache write:814,200 TomanOutput:3,256,800 Toman
[02]CODING AGENT COSTS

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.

A Claude Code session on `claude-sonnet-5-5`
TokensCountPrice per million tokensCost
Read from the cacheCount:2,850,000Price per million tokens:16,284 TomanCost:46,409 Toman
Written to the cacheCount:120,000Price per million tokens:407,100 TomanCost:48,852 Toman
Uncached inputCount:30,000Price per million tokens:325,680 TomanCost:9,770 Toman
OutputCount:45,000Price per million tokens:1,628,400 TomanCost:73,278 Toman
Session totalCount:3,045,000Price 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.

[03]CODING AGENT COSTS

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.

A Codex CLI session on `gpt-5.3-codex`
TokensCountPrice per million tokensCost
Read from the cacheCount:1,700,000Price per million tokens:56,994 TomanCost:96,890 Toman
Uncached inputCount:300,000Price per million tokens:569,940 TomanCost:170,982 Toman
OutputCount:40,000Price per million tokens:4,559,520 TomanCost:182,381 Toman
Session totalCount:2,040,000Price per million tokens:Cost:450,253 Toman

The same session without the cache would have cost 1,322,261 Toman.

[04]CODING AGENT COSTS

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.

A Cursor session on two models
ModelCache on this routeCost
gpt-6.2-solCache on this route:AutomaticCost:312,653 Toman
claude-sonnet-5-5Cache on this route:NoneCost:341,964 Toman

For Claude with prompt caching, use a tool that connects to the native route, such as Claude Code.

[05]CODING AGENT COSTS

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.
[06]CODING AGENT COSTS

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, /compact summarises a long conversation and /clear starts a new one; a smaller context means less input on every call.
  • Use a cheaper model for simple work: the /model command in Claude Code, or the model key in Codex's config.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.