Cloud Intelligence™Cloud Intelligence™

Cloud Intelligence™

Cost Per Task, Not Cost Per Token: Unit Economics of Frontier LLM Workloads

A cost-per-task analysis of Anthropic and OpenAI frontier models, August 2026

This page is also available in Deutsch, Español, Français, Italiano, 日本語, and Português.

Aug 11, 202614 min read
Vadim Solovey

About Vadim Solovey

Founded DoiT in 2011 and have been here ever since — in every flavor of CTO, co-CEO, and now CEO. I started my career in 1999 building data centers before anyone called it "the cloud," and I've spent the two decades since trying to deliver on what the cloud was actually supposed to be. I still write code most weeks.

My personal page

Summary

Cost per token is the wrong unit for agentic and production workloads. The right unit is expected cost per completed task, plus the cost of cleaning up wrong outputs that escape automated checks:

E[cost per solved task]=Cattemptpsuccess\mathbb{E}[\text{cost per solved task}] = \frac{C_{\text{attempt}}}{p_{\text{success}}}

On raw per-task token cost in mid-2026, OpenAI's newest frontier model is often the cheaper option. Artificial Analysis measured GPT-5.6 Sol at $1.04 per Intelligence Index task versus Claude Opus 5 at $2.03 and Claude Fable 5 at $2.75. OpenAI closed the token-efficiency gap.

Anthropic wins the moment reliability enters the denominator. On tau-bench, Claude Opus 4.8 held far more of its single-attempt score across repeated runs and violated policy less than half as often as GPT-5.5. In high-stakes unattended loops, that consistency drives down retries and human cleanup, which is where most of the real money is.

Key Findings

Flagship list prices have converged. Claude Opus 5 costs $5 input / $25 output per million tokens. GPT-5.6 Sol costs $5 / $30. Anthropic is now cheaper on output list price, not more expensive. The old "Claude costs more per token" framing is largely obsolete at the frontier.

Token counts are not comparable across vendors. Anthropic's tokenizer from Opus 4.7 onward produces roughly 30 percent more tokens for the same text, and Opus 4.8 and Opus 5 report about 1.88 tokens per English word versus about 1.17 on GPT-5's o200k encoding. A given dollar-per-million rate buys fewer words of Claude context. This distorts naive per-token comparisons against Anthropic.

Reasoning tokens are billed as output tokens on both platforms, and OpenAI hides them while Anthropic can return them. A 500-token visible answer can carry thousands of billed reasoning tokens.

The success-rate denominator dominates. A model that is 10 percent more expensive per attempt but succeeds far more consistently can be much cheaper per correct, policy-compliant task once retries and human cleanup are counted.

Prompt caching changes the arithmetic of long sessions on both sides. Cache reads cost 10 percent of input on both Anthropic and OpenAI's current models.

Details

The problem: per-token pricing measures the wrong thing

Teams pick models on capability, availability, and vendor fit. But when they compare costs, they scan a price sheet: $5 against $10 per million tokens, and stop there. That comparison is close to useless for anything agentic.

An agentic task is not one API call. It is a loop.

media

Plan, call a tool, read the result, decide, edit, verify, repeat. Vantage's analysis of agentic coding sessions models a representative 50-turn coding session at roughly 1 million input tokens and 40,000 output tokens, an input-to-output ratio near 25 to 1 with input accounting for about 85 percent of total cost, because the model re-reads an accumulating context on every turn. Gartner's March 2026 analysis found agentic workflows burn 5 to 30 times more tokens per task than a simple chatbot query, and its senior director analyst Will Sommer framed the risk directly: chief product officers "should not confuse the deflation of commodity tokens with the democratization of frontier reasoning." Bai et al. (arXiv:2604.22750), a preprint analyzing eight frontier LLM trajectories on SWE-bench Verified, co-authored by researchers including Stanford's Erik Brynjolfsson and MIT's Alex Pentland, found agentic coding tasks consume up to 1,000 times more tokens than code reasoning and code chat, with up to 30x run-to-run variance and input tokens dominating the bill.

Most engineers have never seen what an agent trajectory actually costs. The Bai et al. team published their raw data at longjubai.github.io/agent_token_consumption, including a guessing game: you read a real coding task, predict the token bill, then see what eight frontier models actually spent. Play three rounds before you trust any cost estimate, including your own. The models themselves underestimate their usage, and so will you. That gap between predicted and actual spend is the whole argument for measuring cost per task instead of forecasting it.

Two facts follow. First, the number of tokens per task varies wildly by model, so the same list price produces very different bills. Second, some fraction of tasks fail, and a failed trajectory still costs full price. The unit that survives both facts is cost per completed task.

A formal definition

Define the cost of a single attempt as the sum over trajectory steps of billed tokens times their rates:

Cattempt=s=1S(inspin+cachespcache+outspout)C_{\text{attempt}} = \sum_{s=1}^{S} \left( \text{in}_s \cdot p_{\text{in}} + \text{cache}_s \cdot p_{\text{cache}} + \text{out}_s \cdot p_{\text{out}} \right)

If each attempt succeeds independently with probability pp and you retry until success, the expected number of attempts is 1/p1/p, so:

E[cost per solved task]=Cattemptpsuccess\mathbb{E}[\text{cost per solved task}] = \frac{C_{\text{attempt}}}{p_{\text{success}}}

If you cap retries at NN attempts, eventual success probability is 1(1p)N1 - (1-p)^N and the expected model cost per solved task rises accordingly. That is the model cost. It is not the total cost.

The total cost includes wrong outputs that pass automated checks and reach a human or production:

E[total cost per correct task]=Cattemptpsuccess+LKcleanup\mathbb{E}[\text{total cost per correct task}] = \frac{C_{\text{attempt}}}{p_{\text{success}}} + L \cdot K_{\text{cleanup}}

where LL is the leak rate, the probability a wrong or non-compliant output escapes detection, and KcleanupK_{\text{cleanup}} is the cost of fixing it. This term is usually invisible on the API bill and frequently larger than the bill itself.

Current pricing (August 2026)

Anthropic, standard API, per million tokens:

Model Input Output Cache read Batch (in/out)
Claude Fable 5 $10 $50 $1.00 $5 / $25
Claude Opus 5 (flagship default) $5 $25 $0.50 $2.50 / $12.50
Claude Opus 4.8 $5 $25 $0.50 $2.50 / $12.50
Claude Sonnet 5 $2 (intro) / $3 $10 (intro) / $15 $0.30 $1.50 / $7.50
Claude Haiku 4.5 $1 $5 $0.10 $0.50 / $2.50

Anthropic cache writes cost 1.25x input for the 5-minute TTL and 2x input for the 1-hour TTL. Sonnet 5's introductory $2 / $10 runs through August 31, 2026.

OpenAI, standard API, per million tokens:

Model Input Output Cache read Batch (in/out)
GPT-5.6 Sol (flagship) $5 $30 $0.50 $2.50 / $15
GPT-5.6 Terra $2 $12 $0.20 $1 / $6
GPT-5.6 Luna $0.20 $1.20 $0.02 $0.10 / $0.60
GPT-5.5 $5 $30 $0.50 $2.50 / $15
GPT-5.4 $2.50 $15 $0.25 $1.25 / $7.50

OpenAI's Batch API takes 50 percent off both input and output with a 24-hour window. Flex offers the same 50 percent at variable latency. Priority costs about 2.5x for lower latency. GPT-5.6 introduced cache-write pricing at 1.25x input with a 30-minute minimum, matching Anthropic's model. Note the long-context penalty: on GPT-5.5 and GPT-5.6, any request above about 272,000 input tokens bills at 2x input and 1.5x output for the whole session. Anthropic includes the full 1M context at flat rates on Opus 5, Opus 4.8, and Sonnet 5.

Cost per task, measured

Artificial Analysis publishes an absolute dollar cost per task on its Intelligence Index. At max reasoning effort, as of August 2026: GPT-5.6 Sol costs $1.04, Claude Opus 4.8 costs $1.80, Claude Opus 5 costs $2.03, Claude Sonnet 5 costs $2.29 at standard rates ($1.53 on introductory pricing that expires August 31, 2026), and Claude Fable 5 costs $2.75.

On this suite OpenAI's frontier model delivers near-top intelligence at roughly one third the cost of Anthropic's most capable model. That is the honest headline, and it runs against the naive thesis.

The ranking is also unstable in exactly the way this post predicts. When Artificial Analysis published its Coding Agent Index analysis in May 2026, Claude Opus 4.7 (max) in Claude Code cost $4.10 per task against $4.82 for GPT-5.5 (xhigh) in Codex, a Claude win. The live index now shows the same pair at roughly $5.63 and $5.05 as of August 10, order reversed, because cost per task is recomputed from current token prices and refreshed runs. Same models, same benchmark, opposite conclusion within a quarter. In the current generation, GPT-5.6 Sol in Codex leads the index and runs about 10 percent cheaper per task than Opus 4.8 in Claude Code. The ranking is workload-specific, generation-specific, and date-specific, which is exactly the point.

Worked example 1: a coding task where OpenAI wins

Take one SWE-bench-style bug fix. Model the session with caching on the system prompt and tools.

Claude Opus 4.8 at $5 / $25, cache read $0.50. Effective input 1,000,000 tokens, 80 percent cache reads, output 40,000 tokens.

  • Input: 200k fresh at $5/M = $1.00, plus 800k cache reads at $0.50/M = $0.40.
  • Output: 40k at $25/M = $1.00.
  • Cache write once, 50k at $6.25/M = $0.31.
  • Cattempt$2.71C_{\text{attempt}} \approx \$2.71.

GPT-5.6 Sol at $5 / $30, cache read $0.50. Sol is more output-economical, so model 700,000 effective input tokens and 15,000 output tokens.

  • Input: 140k fresh at $5/M = $0.70, plus 560k cache reads at $0.50/M = $0.28.
  • Output: 15k at $30/M = $0.45.
  • Cache write once, about $0.07.
  • Cattempt$1.50C_{\text{attempt}} \approx \$1.50.

Now divide by independent SWE-bench Verified success on the Vals AI harness: GPT-5.6 Sol 96.2 percent, Claude Opus 4.8 88.6 percent. We use Opus 4.8 here because it has an independently measured Vals AI number; Opus 5's published figures mix harnesses.

Sol: $1.500.962$1.56 per solved issue\text{Sol: } \frac{\$1.50}{0.962} \approx \$1.56 \text{ per solved issue} Opus 4.8: $2.710.886$3.06 per solved issue\text{Opus 4.8: } \frac{\$2.71}{0.886} \approx \$3.06 \text{ per solved issue}

OpenAI wins this one on both per-attempt cost and success rate. For pure autonomous coding on public SWE-bench Verified in mid-2026, the token-efficient frontier OpenAI model is the cheaper choice per solved issue. Any honest cost-per-task analysis has to concede this.

Worked example 2: a tool-use task where Anthropic wins

Now take an unattended airline support agent that refunds and rebooks. Wrong actions are expensive because they hit real money and policy.

From the Contra Collective tau-bench test, airline domain: Claude Opus 4.8 pass@1 = 0.64 with 4 policy violations per 100 tasks. GPT-5.5 pass@1 = 0.58 with 9 policy violations per 100 tasks. These are shorter dialogues, so assume per-attempt costs of about $0.30 for Opus and $0.22 for the more token-efficient GPT-5.5. Assume each escaped policy violation costs $25 to clean up, in line with 2026 service-desk resolution benchmarks.

This test predates GPT-5.6 Sol, so the OpenAI side is one generation behind; no comparable Sol run on tau-bench airline has been published, and this comparison should be re-run when one exists.

Per 100 tasks, retry-until-success plus cleanup:

Opus 4.8: 100$0.300.64+4$25=$46.9+$100=$146.9    $1.47 per correct task\text{Opus 4.8: } 100 \cdot \frac{\$0.30}{0.64} + 4 \cdot \$25 = \$46.9 + \$100 = \$146.9 \;\Rightarrow\; \$1.47 \text{ per correct task} GPT-5.5: 100$0.220.58+9$25=$37.9+$225=$262.9    $2.63 per correct task\text{GPT-5.5: } 100 \cdot \frac{\$0.22}{0.58} + 9 \cdot \$25 = \$37.9 + \$225 = \$262.9 \;\Rightarrow\; \$2.63 \text{ per correct task}

media

The per-token price favored OpenAI. The per-attempt cost favored OpenAI. The success-and-reliability-adjusted cost per correct task favored Anthropic by nearly 2x, driven entirely by the cleanup term. The lever is the cost of a wrong output. When that cost is high, Claude's consistency pays for itself. tau-bench makes the consistency concrete: Opus 4.8 held 56 percent of tasks across 8 consecutive runs in retail versus 41 percent for GPT-5.5, and 34 percent versus 22 percent in airline. Consistency is what you buy for unattended operation.

Tokenizer and verbosity distortions

Two effects pull in opposite directions. First, Anthropic's tokenizer inflates token counts, so equal per-token prices understate Claude's effective per-word cost. Second, output verbosity varies by model and workload, and here the story reversed in 2026. Independent testers found GPT-5.5 used about 72 percent fewer output tokens than Claude Opus 4.7 on equivalent coding tasks, and Artificial Analysis measured GPT-5.6 Sol using fewer tokens than Opus 4.8 while scoring higher on intelligence. The old assumption that Claude is the terse one no longer holds at the frontier.

Verbosity is not the same as capability. The Terminal-Bench 2.0 paper (arXiv:2601.11868, ICLR 2026) found no statistically significant relationship between output tokens and success (r = −0.170, p = 0.515), and noted Claude Sonnet 4.5 and Claude Opus 4.1 achieving top-tier success rates (43 percent and 38 percent) with relatively moderate token usage. There is no evidence that spending more tokens buys more correctness. But more tokens always buy a bigger bill, so measure output tokens per task per model rather than assuming.

Reasoning-token billing

Both vendors bill hidden or semi-hidden thinking tokens at the output rate. OpenAI's reasoning tokens are invisible in the response. Anthropic can return summarized thinking. Opus 5 now runs adaptive thinking by default, and every thinking token bills at $25 per million, which is why matched-effort tests report Opus 5 emitting roughly twice the output tokens of Opus 4.8 on the same task. The practical consequence: effort setting, not model choice, often moves the bill the most. Instrument reasoning tokens separately from visible output.

Caching

Prompt caching is the highest-leverage lever on long agentic sessions. Both platforms price cache reads at 10 percent of input. Anthropic uses explicit cache_control breakpoints and charges 1.25x for a 5-minute write or 2x for a 1-hour write. OpenAI caches automatically above about 1,024 tokens of stable prefix. In an agent loop, the system prompt, tool schemas, and a growing conversation prefix repeat on every turn, which is the exact shape caching was built for. Token accumulation in a loop is quadratic. Cache reads flatten it toward linear.

ProjectDiscovery raised its cache hit rate from 7 percent to 84 percent while serving 9.8 billion tokens from cache, cutting real LLM spend by 59 percent, with post-optimization runs reaching 66 percent and the trailing 10 days at 70 percent. A loop that fires at least every 5 minutes keeps its Anthropic cache warm indefinitely, paying the write premium once. Put stable content first. Anything after a variable element does not cache.

Hidden costs

The API bill is the visible cost. The hidden cost is human time spent on wrong outputs. A 2025 study cited by LogRocket found senior engineers spend an average of 4.3 minutes reviewing an AI-generated suggestion versus 1.2 minutes for human-written code, and Faros AI's analysis of more than 10,000 developers found a 98 percent increase in pull request volume alongside a 91 percent increase in review time.

Faros also found, across 211 real engineering tasks, that a cheaper model with the right repository context and a verification loop can beat a stronger model working blind, which means context and harness engineering moves the quality-cost frontier itself, sometimes more than model choice does. These costs land on the most expensive and most constrained people on the team.

How to instrument cost per task

Log tokens per trajectory, not per call. Tag every request with a task ID. Sum input, cache read, cache write, reasoning, and visible output tokens across the whole loop.

Record the outcome. Mark each task solved or failed by an automated check, and record retries.

Compute success-rate-adjusted cost: total trajectory dollars divided by solved tasks. This is your real unit.

Track a leak rate. Sample completed tasks that passed automated checks and have a human grade correctness or policy compliance. Multiply the leak rate by your loaded cleanup cost.

Report cost per unit. A resolved ticket, per merged PR, or per correct action, by model and by effort setting. Make it visible to the team generating it.

Separate interactive from batchable work at design time. Route the batchable half to Batch or Flex for 50 percent off.

Cloud bill shouldn't be a mystery

One platform for AI and Cloud optimization.

Recommendations

Default to measuring cost per solved task, adjusted for retries and cleanup. Stop comparing price sheets. Stand up the six-step instrumentation above before you pick a model.

Route by workload, do not standardize on one vendor. For high-volume, low-stakes, token-heavy work such as classification, extraction, and bulk generation, favor the cheapest tier that clears your quality bar, which today often means GPT-5.6 Luna, GPT-5.4, or Claude Haiku 4.5 on Batch. For autonomous coding on well-tested repos, GPT-5.6 Sol is currently the strongest cost-per-solved-issue option on public SWE-bench Verified. For high-stakes unattended tool use where a wrong action is expensive, favor Claude Opus 5 or Opus 4.8 for their consistency and lower policy-violation rate.

Turn on caching before you optimize anything else. Put system prompts and tool schemas first, keep them stable, and confirm cache hits in the usage object. Expect 50 to 70 percent input savings on agent loops.

Tune effort settings per task class. On adaptive-thinking models, the effort knob moves the bill more than the model choice. Cap output tokens to what the downstream UI actually consumes.

Thresholds that should change your decision: if your automated check catches essentially all wrong outputs and cleanup is cheap, the cleanup term vanishes and the token-efficient OpenAI model usually wins. If cleanup costs more than roughly 5 to 10 times a single attempt, the reliability-driven Anthropic advantage dominates and you should pay the higher per-attempt price. Re-run the math whenever a new model ships, because the frontier reprices roughly monthly.

For the formal model behind these numbers, including the break-even cleanup cost derivation and a replicable measurement protocol, see the companion whitepaper.

Caveats

The frontier moves fast. Prices and model names in this post are current as of August 2026 and several came from secondary trackers rather than first-party pricing pages. Verify against the live Anthropic and OpenAI pricing pages before committing a budget.

Benchmark scores on both sides are partly inflated by memorization and reward hacking. METR reported GPT-5.6 Sol showed a higher reward-hacking rate than any public model it had evaluated on its ReAct harness. Vendor-reported SWE-bench numbers are self-reported with differing harnesses. Treat a few points of benchmark gap with caution and run your own held-out eval.

The two worked examples use plausible but constructed token counts and cleanup costs. They illustrate the mechanism. Your numbers will differ. The point is the method, not the specific dollars.

The Artificial Analysis cost-per-task figures are for the Intelligence Index suite, not coding specifically, and the tau-bench figures come from a single consultancy test that is not peer-reviewed. Cross-harness comparisons of cost against success are directional, not exact.

This analysis excludes fine-tuning, dedicated capacity, and enterprise-negotiated rates, any of which can change the ranking.