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.

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 rule | GPT-6 Sol and Luna | ClaudeClaude ProThe paid subscription for the Claude AI assistant from Anthropic. It unlocks connectors to outside tools.Open the glossary Opus 5.5 |
|---|---|---|
| Cache lifetime | At least 30 minutes after the last write or reuse | 5 minutes, or 1 hour with a 2x cache write |
| Cache read discount | 90% | 95% |
| Cache write | 1.25x the input price | 1.25x (5 min) or 2x (1 hour) |
| Prompt above 272,000 tokens | 2x input and cache, 1.5x output | Standard price up to 1M tokens |
| Batch APIAPIThe official door 2 systems use to exchange data, without anybody copying it by hand.Open the glossary | 50% of standard | 50% of standard |
| Regional processing | +10% where available | 1.1x for inference_geo us |
| Fast mode | 2x 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.

- 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.
- 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.
- 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.

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.

| Model | No cache | With cache | Saving |
|---|---|---|---|
| GPT-6 Luna | $0.0032 | $0.0021 | 34% |
| GPT-6 Sol | $0.0640 | $0.0420 | 34% |
| Claude Opus 5.5 | $0.1280 | $0.0812 | 37% |
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.

| Prompt without cache, 4,000 output tokens | GPT-6 Luna | GPT-6 Sol | Claude 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.

| Simulated workload | Assumption per unit | GPT-6 Luna | GPT-6 Sol | Claude Opus 5.5 |
|---|---|---|---|---|
| WhatsApp support bot, 20,000 chats | 24,000 input tokens, 75% cached; 1,600 output tokens | IDR 750 thousand | IDR 15.0 million | IDR 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 sessions | 40 turns x 60,000 tokens, 95% cached; 60,000 output tokens | IDR 80 thousand | IDR 1.6 million | IDR 2.7 million |
| Document review, 500 documents | 400,000 input tokens, 4,000 output tokens, Batch API | IDR 371 thousand | IDR 7.4 million | IDR 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.

| FrontierCode 1.1 | Cost per task | Score | Cost per successful task |
|---|---|---|---|
| GPT-6 Luna medium | $0.053 | 35.5% | $0.15 |
| GPT-6 Sol medium | $0.80 | 45.9% | $1.74 |
| Claude Opus 5.5 medium | $0.80 | 54.6% | $1.47 |
| GPT-6 Sol max | $2.14 | 49.3% | $4.34 |
| Claude Opus 5.5 max | $6.19 | 54.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.
| Date | Input | What the system records | Output |
|---|---|---|---|
| 1 October 2026 | Starting budget from the simulation | Support on Luna IDR 750 thousand, coding on Sol IDR 1.6 million | Plan of IDR 2.4 million per month |
| 8 October 2026 | First-week log | Support cache share 68%, not 75% | Raise the support estimate by 10% |
| 15 October 2026 | Support pass rate | 94% 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 Sol | Add the escalation cost |
| 31 October 2026 | Final invoice | 12% gap from the plan | The 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
- Store the 4 usage numbers per request. Owner: developer. Evidence: the log table schema.
- Group requests per task type. Owner: developer. Evidence: a task type column in the log.
- Calculate the cache read share per task type. Owner: developer. Evidence: a weekly cache share report.
- Log the largest prompt and set an alert at 250,000 tokens. Owner: ops. Evidence: the alert rule.
- Measure the success rate per task type. Owner: team lead. Evidence: checker or review results.
- Convert the cost to rupiah with a dated rate. Owner: finance. Evidence: a sheet with the rate source.
- Compare the simulation with last month's invoice. Owner: finance. Evidence: the gap in percent.
- 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 shape | Cheapest model per successful task | Condition |
|---|---|---|
| High volume, short prompts, code checks the result | GPT-6 Luna | Effort high for tasks that contain numbers |
| Daily coding with a high cache share | GPT-6 Sol | The Sol pass rate on your tasks is close to Opus 5.5 |
| Hard coding that often fails on Sol | Claude Opus 5.5 medium | Lower cost per successful task on FrontierCode medium |
| Documents above 272,000 tokens | Sol and Opus 5.5 nearly match | Pick the one with the higher pass rate |
| Chats with long gaps | GPT-6 | A 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.




