Direct answer: the cost of 1 task equals 4 token parts times their prices: uncached input, cache reads, cache writes, and output. Multiply the result by the multipliers, divide it by the success rate, then multiply it by volume and the exchange rate. A simulated support bot with 20,000 chats per month gives 3 numbers: Luna IDR 750 thousand, Sol IDR 15.0 million, and Opus 5.5 IDR 29.0 million.

Main condition: this formula applies to the standard OpenAI and Anthropic APIs at the prices of 23 September 2026. Limit: the simulation assumes equal token counts across models, but each vendor tokenizes differently, so measure your own tokens before you decide.

We read the official pricing pages, the prompt caching guide, and the Bank Indonesia JISDOR rate on 23 September 2026. We tested the code in this article with an automatic check. Every workload in this article is a simulation with dummy data.

Why the price per token misleads

The price per token is easy to compare: on output, Opus 5.5 costs 2x Sol and 40x Luna. The bill, however, depends on tokens per task, the cache share, the prompt length, and the tasks that fail and run again.

A real example comes from vendor charts. On FrontierCode medium, Sol and Opus 5.5 both cost $0.80 per task, though the Opus 5.5 token price is 2x higher. If both vendors calculate cost the same way, Opus 5.5 uses about half the Sol tokens for the same task.

We use the same thinking in the task cost sheet for ModelArk, Codex, Claude, and MiniMax and the Hermes Agent token cost accounting schema (Indonesian). This article applies it to the 3 models released on 22 September 2026.

The cost-per-task formula

Every input token lands in exactly 1 of 3 price classes. OpenAI writes that a cache write is not an extra fee: an input token uses the uncached, cached, or cache-write price. Source: OpenAI on GPT-6 prompt caching.

Cost-per-task formula diagram: uncached input, cache read, cache write, and output times their prices, then multipliers, divided by the success rate, and times volume and the JISDOR rate
Four token parts make the cost of 1 task. The next 3 steps turn it into the cost per successful task in rupiah per month.

Part A: uncached input

Tokens the model processes from zero. The price is $2 on Sol, $0.10 on Luna, and $4 on Opus 5.5 per 1M tokens.

Part B: cache reads

Tokens from a prompt start that matches an earlier request. GPT-6 gives a 90% discount, so $0.20 on Sol and $0.01 on Luna. Opus 5.5 gives a 95% discount, so $0.20.

Part C: cache writes

Tokens stored in the cache for the first time. GPT-6 now bills 1.25x the input price: $2.50 on Sol and $0.125 on Luna. Opus 5.5 bills $5 for the 5-minute cache and $8 for the 1-hour cache.

Part D: output, including reasoning

Reasoning tokens and answer tokens pay the same output price. Higher effort adds reasoning tokens, so effort changes the cost directly.

Billing ruleGPT-6 Sol and LunaClaudeClaude ProThe paid subscription for the Claude AI assistant from Anthropic. It unlocks connectors to outside tools.Open the glossary Opus 5.5
Cache lifetimeAt least 30 minutes after the last write or reuse5 minutes, or 1 hour with a 2x cache write
Cache read discount90%95%
Cache write1.25x the input price1.25x (5 min) or 2x (1 hour)
Prompt above 272,000 tokens2x input and cache, 1.5x outputStandard price up to 1M tokens
Batch APIAPIThe official door 2 systems use to exchange data, without anybody copying it by hand.Open the glossary50% of standard50% of standard
Regional processing+10% where available1.1x for inference_geo us
Fast mode2x the price$8 input and $40 output

Sources: the GPT-6 Sol model page, the GPT-6 Luna model page, and the Claude pricing page, read on 23 September 2026.

Three traps that throw the estimate off

Three things make the price per token unequal between vendors. Check all 3 before you set a budget.

Three cost trap cards: token counts differ per vendor, the GPT-6 long-context premium above 272,000 tokens, and the 30-minute GPT-6 cache against the 5-minute or 1-hour Opus 5.5 cache
A WhatsApp chat with gaps over 5 minutes loses the 5-minute Claude cache. Measure the gaps between your customer messages.
  1. Token counts differ. Anthropic writes that the tokenizer of Claude 4.7 and later yields about 30% more tokens than its old tokenizer. Count your text with each vendor's token counting endpoint.
  2. Long context. GPT-6 raises the price of the whole request above 272,000 input tokens. Opus 5.5 keeps the standard price up to 1M tokens.
  3. Cache lifetime. The GPT-6 cache lasts at least 30 minutes. The Opus 5.5 cache lasts 5 minutes, or 1 hour at a 2x write cost.

What you need first

  • Per-request logs from the OpenAI and Anthropic APIs, not only the monthly invoice total.
  • A list of task types and monthly volumes, such as support chats, coding sessions, or documents.
  • A success rate per task type, from an automatic checker or a human review.
  • A dated rupiah rate. We use the Bank Indonesia JISDOR rate of 22 September 2026: IDR 17,883 per USD.
  • 1 sheet or a small script for the formula below.

Step 1: Read 4 numbers from the usage object

Take 4 numbers from every API response. The field names differ, and the meaning of input_tokens also differs between vendors.

Two columns of usage fields: the OpenAI Responses API uses total input_tokens, cached_tokens, cache_write_tokens, and output_tokens; the Anthropic Messages API uses uncached input_tokens, cache_read_input_tokens, cache_creation_input_tokens, and output_tokens
On OpenAI, input_tokens is the total of all input. On Anthropic, input_tokens is uncached input only.

The functions below calculate the cost of 1 response from its usage object. We tested both functions against the simulations in this article, including the 272,000-token premium.

const PRICE = { // USD per 1M tokens, 23 September 2026
  'gpt-6-sol':       { input: 2,   cached: 0.2,  write: 2.5,   output: 10 },
  'gpt-6-luna':      { input: 0.1, cached: 0.01, write: 0.125, output: 0.5 },
  'claude-opus-5-5': { input: 4,   cached: 0.2,  write: 5,     output: 20 },
};

function costOpenAI(model, u) {
  const cached = u.input_tokens_details?.cached_tokens ?? 0;
  const write = u.input_tokens_details?.cache_write_tokens ?? 0;
  const fresh = u.input_tokens - cached - write;
  const long = u.input_tokens > 272000; // GPT-6 long-context premium
  const kIn = long ? 2 : 1, kOut = long ? 1.5 : 1, p = PRICE[model];
  return (kIn * (fresh * p.input + cached * p.cached + write * p.write)
    + kOut * u.output_tokens * p.output) / 1e6;
}

function costAnthropic(model, u) {
  const p = PRICE[model]; // 5-minute cache write; the 1-hour cache costs $8
  return (u.input_tokens * p.input
    + (u.cache_read_input_tokens ?? 0) * p.cached
    + (u.cache_creation_input_tokens ?? 0) * p.write
    + u.output_tokens * p.output) / 1e6;
}

Verify: for OpenAI, fresh plus cached plus cache-write tokens equals input_tokens. Field sources: the OpenAI prompt caching guide and the Claude pricing page.

Step 2: Split cached tokens from fresh tokens

Calculate 1 conversation with and without the cache to see the effect. Our simulation uses 4 turns, a fixed 4,500-token prompt, 24,000 input tokens in total, and 1,600 output tokens.

Bar chart of the cost of 1 support chat with and without cache for GPT-6 Luna, GPT-6 Sol, and Claude Opus 5.5, with a note on the 1-hour cache for Opus 5.5
The cache cuts the Sol and Opus 5.5 cost by more than a third on this chat. Long customer gaps change which cache lifetime to use.
ModelNo cacheWith cacheSaving
GPT-6 Luna$0.0032$0.002134%
GPT-6 Sol$0.0640$0.042034%
Claude Opus 5.5$0.1280$0.081237%

Verify: in your real log, the cache read share is close to this assumption. When customer gaps often pass 5 minutes, use the 1-hour cache on Opus 5.5 or accept the cache misses.

Step 3: Check the long-context premium

Log the largest prompt size per task type. Above 272,000 tokens, the Sol price advantage over Opus 5.5 almost disappears.

Line chart of the cost of 1 request against prompt length from 10,000 to 900,000 tokens: the GPT-6 Sol line jumps at 272,000 tokens and almost meets the Claude Opus 5.5 line, while the GPT-6 Luna line stays low
At 200,000 tokens, Sol costs half of Opus 5.5. At 400,000 tokens, both nearly match.
Prompt without cache, 4,000 output tokensGPT-6 LunaGPT-6 SolClaude Opus 5.5
100,000 tokens$0.01$0.24$0.48
200,000 tokens$0.02$0.44$0.88
400,000 tokens$0.08$1.66$1.68
800,000 tokens$0.16$3.26$3.28

Verify: none of your task types sits between 250,000 and 272,000 tokens without an alert. The full rule is in the GPT-6 Sol and Luna migration guide.

Step 4: Multiply by volume and the exchange rate

Multiply the cost of 1 task by the monthly volume, then by the JISDOR rate. The table below uses 3 simulated workloads with dummy data.

Three groups of monthly cost bars in rupiah: a WhatsApp support bot, a coding agent, and batch document review for GPT-6 Luna, GPT-6 Sol, and Claude Opus 5.5
For support chat, Luna is 20x cheaper than Sol. For documents above 272,000 tokens, Sol and Opus 5.5 nearly match.
Simulated workloadAssumption per unitGPT-6 LunaGPT-6 SolClaude Opus 5.5
WhatsApp support bot, 20,000 chats24,000 input tokens, 75% cached; 1,600 output tokensIDR 750 thousandIDR 15.0 millionIDR 29.0 million
Coding agentAI agentAn AI program that performs work steps by itself, for example reading a message, drafting a reply, and recording the result.Open the glossary, 66 sessions40 turns x 60,000 tokens, 95% cached; 60,000 output tokensIDR 80 thousandIDR 1.6 millionIDR 2.7 million
Document review, 500 documents400,000 input tokens, 4,000 output tokens, Batch APIIDR 371 thousandIDR 7.4 millionIDR 7.5 million

These numbers use the same token count for each model. In real use, Opus 5.5 often uses fewer tokens per task, and Luna at max effort uses more tokens than Luna at medium.

Verify: your simulated total sits within 20% of last month's invoice. When the gap is larger, your token or volume assumption is wrong.

Step 5: Divide by the success rate

A failed task is still billed. Divide the cost per task by the success rate to see the cost per usable result.

Two bar panels of the cost per successful FrontierCode task: at medium Luna $0.15, Sol $1.74, Opus 5.5 $1.47; at max Luna $0.26, Sol $4.34, Opus 5.5 $11.38
At medium, Opus 5.5 costs less per successful task than Sol. At max, the order flips.
FrontierCode 1.1Cost per taskScoreCost per successful task
GPT-6 Luna medium$0.05335.5%$0.15
GPT-6 Sol medium$0.8045.9%$1.74
Claude Opus 5.5 medium$0.8054.6%$1.47
GPT-6 Sol max$2.1449.3%$4.34
Claude Opus 5.5 max$6.1954.4%$11.38

The scores and costs come from the OpenAI and Anthropic charts, so both are vendor claims. Replace the score with the pass rate of your own 20 tasks. The test method is in the GPT-6 Sol, Luna, and Claude Opus 5.5 comparison.

Worked example: a 1-month budget for a dummy small business

A simulation with dummy data. The online shop "Kopi Sleman" runs a support bot and 1 developer with a coding agent. The routing plan: Luna for support, Sol for coding.

DateInputWhat the system recordsOutput
1 October 2026Starting budget from the simulationSupport on Luna IDR 750 thousand, coding on Sol IDR 1.6 millionPlan of IDR 2.4 million per month
8 October 2026First-week logSupport cache share 68%, not 75%Raise the support estimate by 10%
15 October 2026Support pass rate94% pass the schemaSchemaExtra description inside page code that tells a search engine what the page is, for example an article, a service, or a question and answer.Open the glossary, 6% move up to SolAdd the escalation cost
31 October 2026Final invoice12% gap from the planThe assumptions hold; reuse them next month

The dates in this table are a simulated plan, not real data. The pattern matters: plan, measure 1 week, correct the assumptions, then compare with the invoice.

Cost calculation checklist

  1. Store the 4 usage numbers per request. Owner: developer. Evidence: the log table schema.
  2. Group requests per task type. Owner: developer. Evidence: a task type column in the log.
  3. Calculate the cache read share per task type. Owner: developer. Evidence: a weekly cache share report.
  4. Log the largest prompt and set an alert at 250,000 tokens. Owner: ops. Evidence: the alert rule.
  5. Measure the success rate per task type. Owner: team lead. Evidence: checker or review results.
  6. Convert the cost to rupiah with a dated rate. Owner: finance. Evidence: a sheet with the rate source.
  7. Compare the simulation with last month's invoice. Owner: finance. Evidence: the gap in percent.
  8. Stop using the simulation and measure again when the gap is more than 20%.

The cheapest model depends on the workload shape

This Rama Digital recommendation applies to the prices of 23 September 2026 and the simulations above.

Workload shapeCheapest model per successful taskCondition
High volume, short prompts, code checks the resultGPT-6 LunaEffort high for tasks that contain numbers
Daily coding with a high cache shareGPT-6 SolThe Sol pass rate on your tasks is close to Opus 5.5
Hard coding that often fails on SolClaude Opus 5.5 mediumLower cost per successful task on FrontierCode medium
Documents above 272,000 tokensSol and Opus 5.5 nearly matchPick the one with the higher pass rate
Chats with long gapsGPT-6A 30-minute cache with no new write charge on reuse

Pick the model with the lowest cost per successful task, not the lowest token price. Calculate again every 30 days, because model prices and versions change fast.

Frequently asked questions

Are reasoning tokens billed? Yes. Reasoning tokens pay the output price. Higher effort adds reasoning tokens, so the cost rises with effort.

Which exchange rate should a budget use? Use a dated rate from an official source. We use the Bank Indonesia JISDOR rate of 22 September 2026, IDR 17,883 per USD.

Why can I not compare OpenAI and Anthropic input_tokens directly? On OpenAI, input_tokens is the total of all input, cache included. On Anthropic, input_tokens is uncached input only.

Can the Batch API combine with the cache? Anthropic writes that Batch API and prompt caching discounts can combine. Check the same behavior on your OpenAI invoice before you use it in a budget.

How often should I update this calculation? Update it every 30 days, or at once after a vendor changes a price or releases a new model.

Next step

The limit that still applies: this simulation uses the same tokens for each model, and each vendor tokenizes differently. A safe budget uses 1 week of logs from your own system.

If you want us to map your workflows and estimate their effort and impact, open AI Workflow Audit. To talk it through first, pick a 30-minute first consultation slot.

Sources