Opus 5 vs Grok 4.6 Cost: 3.6x the Bill for 1.75x the Code
One real task, measured: Opus 5 costs 3.6x Grok 4.6 and returns 1.75x as much code, in half the wall clock. Plus the usage field that hides the bill.
TL;DR
Opus 5 bills 3.6x what Grok 4.6 bills on the same task, which is almost exactly what the rate card promises. It also returns 1.75x as much code and does it in half the wall clock, which the rate card says nothing about.
There is a second problem underneath that. The two providers disagree about what counts as output, so one cost formula gives you a correct answer on Opus 5 and an answer 78% too low on Grok. Below: the measured numbers, the usage field that causes the gap, and a leaderboard entry that turns out not to exist.
How Much More Does Opus 5 Cost Than Grok 4.6?
On the rate card, 3.75x: $30 per million tokens combined against $8. Both prices are read off the ofox model pages on 2026-08-20 rather than from a catalog API, which lists only one tier and drops the second one on Grok.
| Claude Opus 5 | Grok 4.6 | |
|---|---|---|
| Input / 1M | $5.00 | $2.00 |
| Output / 1M | $25.00 | $6.00 |
| Cache read / 1M | $0.50 | $0.50 |
| Cache write / 1M | $6.25 (5 min), $10 (1 hr) | not charged |
| Context window | 1M | 500K |
| Max output | 128K | 66K |
| Released | 2026-07-25 | 2026-08-12 |
Two rows deserve more attention than the headline rates.
Cache writes are asymmetric. Anthropic bills you to put a prompt into the cache and again, at a lower rate, to read it back. xAI bills only the read. If your agent rewrites a long system prompt or a large tool schema on every session, that column decides more of your invoice than the $5-versus-$2 input rate does.
Grok 4.6 has a second price tier that the catalog does not expose. Once a prompt reaches 200K tokens, every token in that request bills at double ($4 in, $12 out), not just the tokens past the line. We measured where that cliff actually lands in Grok 4.6 API pricing. Nothing below crosses it; all the runs here sit at a few hundred prompt tokens.
What Does One Real Task Actually Bill?
$0.1417 on Opus 5, $0.0397 on Grok 4.6. Opus 5 costs 3.6x as much, against the 3.75x the rate card implies.
The task: rewrite a Python CSV-parsing module to stream instead of buffering, detect its header reliably, surface malformed rows instead of dropping them, and keep money as Decimal. Four runs per model, same prompt, same OpenAI-compatible endpoint, non-streaming, max_tokens 8000, on 2026-08-20.
| Opus 5 | Grok 4.6 | Grok as % of Opus 5 | |
|---|---|---|---|
| Prompt tokens | 270 | 381 | n/a |
| Visible output tokens (median) | 5,616 | 1,308 | n/a |
| Reasoning tokens (median) | not reported separately | 5,229 | n/a |
| Total tokens (median) | 5,886 | 6,865 | n/a |
| Wall clock (median) | 59.0s | 109.4s | 185%, i.e. slower |
| Output characters (median) | 9,044 | 5,160 | 57% as much |
| Bill per run (median) | $0.1417 | $0.0397 | 28.0% |
| Cost per 1,000 output chars | $0.01567 | $0.00769 | 49% |
The bill row is all-in, not an output-only figure: it is input at the listed rate plus everything the provider counts as output, priced as total_tokens - prompt_tokens. On Grok that deliberately includes the reasoning tokens, which is why it does not reconcile against the visible-output row. The next section is about exactly that gap. Input is a rounding error at this prompt size: $0.00135 of the Opus 5 run and $0.00076 of the Grok run.
So the headline holds and then stops holding. Per run, Opus 5 costs 3.6x Grok 4.6. Normalise by what actually came back and it costs only 2.0x. Still a real gap, but half the size the rate card led you to expect.
Both models produced a working module every time. Neither hit a truncation; all eight runs returned finish_reason: stop. The difference is thoroughness, not correctness: Opus 5 wrote more error branches, more docstring text, and in one run a small usage example. Whether you want that or not depends on the task, which is the whole point.
Why Is Grok Slower If It Writes Less?
Because most of what it produces, you never see. Median reasoning was 5,229 tokens against 1,308 tokens of visible answer, four reasoning tokens for every token in the file it hands you. Opus 5 does think on this prompt too, but it does not report the split.
You can see Opus 5’s hidden portion indirectly. In the first pass, without an explicit max_tokens, one Opus 5 run reported 4,096 completion tokens and returned 845 characters of text. Four thousand tokens do not produce 845 characters of Python. The rest was thinking that was billed and not returned.
Why Is Your Cost Estimate Wrong for Exactly One of These Models?
Because completion_tokens means different things on the two APIs, and the usual formula only matches one of them.
Almost every cost snippet on the internet computes:
cost = (usage.prompt_tokens * in_rate + usage.completion_tokens * out_rate) / 1e6
Run that against the same four Grok 4.6 responses and it returns a median of $0.0086. The real median is $0.0397. The formula understates the bill by 78%.
The reason is one field:
| Field | Opus 5 | Grok 4.6 |
|---|---|---|
completion_tokens | includes thinking | excludes reasoning |
completion_tokens_details.reasoning_tokens | not present | present, and large |
total_tokens | prompt + completion | prompt + completion + reasoning |
Verified on a short streamed request to both: Grok returned prompt 227 + completion 189 + reasoning 444 = total 860, and 227 + 189 alone is 416. Opus 5 returned prompt 40 + completion 891 = total 931, with no reasoning field at all.
The portable formula is total_tokens - prompt_tokens for the output side. It is correct on both, it survives a provider adding a reasoning field later, and it is what every number in this post uses.
out_tokens = usage.total_tokens - usage.prompt_tokens
cost = (usage.prompt_tokens * in_rate + out_tokens * out_rate) / 1e6
One consequence worth stating plainly: if you benchmarked these two models with the common formula and concluded Grok is 16x cheaper, that number was an artefact of the field, not of the model.
Does the Same Prompt Cost the Same Tokens on Both?
No. Opus 5 charges fewer tokens for identical English text, which cuts into the input-side price gap.
The 1,130-character prompt above metered at 270 tokens on Opus 5 and 381 on Grok 4.6. That looks like Opus 5 is the efficient one, and on the input side it is, but only once you account for what is riding along. Grok 4.6 carries a fixed per-request overhead of roughly 206 tokens that is not your text; the 4.6 versus 4.5 measurements pin it down with a three-point fit. Subtract it and your 1,130 characters cost about 175 tokens on Grok against 270 on Opus 5, or 6.5 versus 4.2 characters per token.
Two practical consequences:
- Short, high-frequency calls favour Opus 5’s tokenizer and Grok’s rate card at the same time, and the fixed overhead decides which wins. At a few hundred characters per call, 206 tokens of preamble is most of your input bill on Grok.
- Input is the small half here anyway. Output is 5x the input rate on Grok and 5x on Opus 5, and these runs produced 15-25x more output tokens than input tokens. Tokenizer differences on the prompt move the total by single-digit percent. Do not optimise the wrong end.
What Do the Benchmarks Actually Say?
Less than you have been told. Neither model is on the Terminal-Bench 2.1 leaderboard.
This is worth walking through, because a widely circulated summary this month put Opus 5 at 86.7% on Terminal-Bench 2.1 and called it a clear lead. Pulling the official board on 2026-08-20:
| Rank | Agent | Model | Accuracy |
|---|---|---|---|
| 1 | Claude Code | Fable 5 | 83.8% ± 1.2% |
| 2 | Codex | GPT-5.5 | 83.1% ± 1.1% |
| 3 | Terminus 2 | Fable 5 | 80.4% ± 1.2% |
| 4 | Cursor CLI | Grok 4.5 | 79.3% ± 1.5% |
| 5 | Claude Code | Opus 4.8 | 78.9% ± 1.3% |
Seventeen entries in total, all of them verified by a Terminal-Bench team member, and the most recent one dated 2026-07-11. No Opus 5. No Grok 4.6. The top score on the board is 83.8%, so an 86.7% would not merely lead. It would sit above the top of a board it is not on. Terminal-Bench 2.0, a separate leaderboard with 142 entries, also lists neither model.
That does not make 86.7% fabricated. Vendors run these suites internally and publish before submitting, and harness choice moves terminal-agent scores by several points on its own. It does mean the number is a vendor-reported figure rather than a verified board entry, and that comparing it against a differently-sourced number for the other model is comparing nothing at all.
The same caution applies to the numbers circulating for Grok 4.6. The one thing the official board does say about the family is a detail nobody quotes: the Grok 4.5 entry at rank 4 carries a -9.0% hack rate, the largest on the board by a factor of ten, meaning the graders found that share of its passes came from gaming the test rather than solving it. Rank 5, Opus 4.8, is at -0.0%. If you are choosing a model to run unsupervised against a test suite, that column is more actionable than the accuracy column.
Then What Should You Compare?
Your own workload, on the two numbers this post measures: bill per completed task, and output per dollar. Both are reproducible in an afternoon and neither depends on a vendor’s harness. The Opus 5 versus GPT-5.6 Sol comparison walks through the same exercise against a different opponent, with the same conclusion about launch benchmarks.
What Is the Community Actually Reporting?
A steady stream of complaints about Opus 5’s behaviour, and near-silence about Grok 4.6 in developer contexts. Both halves of that are informative.
Across a 30-day window of 1,338 posts pulled from developer subreddits on 2026-08-20, the Opus 5 threads that drew real discussion were overwhelmingly negative on the working experience rather than on capability:
- Opus 5 is a practically unusable model, r/ClaudeCode, 978 upvotes, 617 comments. The author’s framing is the relevant part: “a regression that the benchmarks missed completely,” reporting forgotten context and repeated mistakes over 1.5 weeks of use.
- Opus 5 is actually almost rage-inducing to use, r/ClaudeAI, 1,316 upvotes, 446 comments. Notable because the author had already applied Anthropic’s own updated prompting guidance and changed their
CLAUDE.mdbefore posting. - Opus 5 ARC AGI score was benchmaxxed, r/singularity, 1,607 upvotes, 237 comments. The same suspicion of headline scores that the Terminal-Bench check above turns into a checkable fact.
On the Grok side, the only developer-context thread of any size in the same window is Grok 4.6 Benchmarks on r/opencodeCLI at 134 upvotes and 93 comments. The larger Grok communities in the window are discussing image moderation and subscription cancellations, not API integration.
Treat all of this as evidence that people are arguing, not as evidence of what is true. None of these threads’ claims are reproduced here as fact. The measurable version of the complaint is in the table further up: on this task Opus 5 produced 1.75x more output than Grok 4.6 for 3.6x the price, which is a real trade and not obviously a good one for routine work. The symptom-by-symptom breakdown of the Opus 5 reports, including which ones are prompt problems rather than model problems, is in Claude Opus 5 alternatives.
What Breaks When You Switch?
Four things, all of them cheap to fix once you know.
| Symptom | Cause | Fix |
|---|---|---|
| Output stops mid-file at exactly 4,096 tokens | No max_tokens set; that is the default | Set it explicitly. Opus 5 allows 128K, Grok 4.6 allows 66K |
| Bill is ~4x your estimate on Grok | completion_tokens excludes reasoning_tokens | Use total_tokens - prompt_tokens |
| No reasoning text in the response on Opus 5 | Thinking is billed inside completion_tokens and not returned in non-streaming responses | Stream if you need it, and expect reasoning_details rather than a reasoning string |
| Prompt over 200K suddenly doubles on Grok | Second price tier applies to the whole request | Keep prompts under 200K or budget for $4/$12 |
The switch itself is a string change if you are already on an OpenAI-compatible endpoint:
from openai import OpenAI
client = OpenAI(base_url="https://api.ofox.io/v1", api_key=OFOX_KEY)
def run(model: str, prompt: str) -> tuple[str, float]:
r = client.chat.completions.create(
model=model, max_tokens=8000,
messages=[{"role": "user", "content": prompt}],
)
u = r.usage
rates = {"anthropic/claude-opus-5": (5, 25), "x-ai/grok-4.6": (2, 6)}
ri, ro = rates[model]
out = u.total_tokens - u.prompt_tokens # correct on both APIs
return r.choices[0].message.content, (u.prompt_tokens * ri + out * ro) / 1e6
Through 2026-08-31 the code OFOXAI2608 adds 15% to top-ups plus 15% back on usage, which lowers effective spend rather than the unit price. Both models sit behind the same key at list rates, Opus 5 and Grok 4.6, so the A/B above is one string swap rather than a second integration. Full setup for the Anthropic side is in the Claude Opus 5 API guide.
Which One Should You Actually Pick?
Split by task, and let output length be the deciding variable rather than the price.
Grok 4.6 takes the default slot for routine agent passes, the ones where a shorter and more focused answer is fine: test scaffolding, mechanical refactors, code explanation. That is most of the work, and a bill 3.6x smaller is a real saving on it. It also takes anything with a long cached system prompt, where the absent cache-write charge compounds every session, and any batch or offline job where 109 seconds against 59 matters to nobody.
Opus 5 takes the passes where completeness is the product, the run that has to enumerate every error branch rather than most of them. It also takes interactive work, at half the wall clock here and with its low reasoning-effort setting streaming in under three seconds, and anything above 500K of context, which Grok 4.6 cannot hold at all.
Pick neither if you are choosing on a leaderboard number. Neither model is on the board that number came from.
Four runs on one task, summarised honestly: the cheap model is genuinely cheap, the expensive model is genuinely more thorough, and the ratio between those two facts is 49%, not 28%. Measure your own workload before you commit to either. The script above is the whole experiment.
References
- ofox model page: Claude Opus 5
- ofox model page: Grok 4.6
- Terminal-Bench 2.1 leaderboard
- Terminal-Bench 2.0 leaderboard
- xAI developer docs: models and pricing
- Local runs on 2026-08-20 via an OpenAI-compatible gateway: 4 non-streaming runs per model at
max_tokens8000, plus one streamed run per model for usage-field verification
Frequently Asked Questions
- Is Grok 4.6 cheaper than Claude Opus 5?
- Yes, by a wide margin, but less than the rate card suggests. On list price Grok 4.6 is $2 input / $6 output per million against Opus 5 at $5 / $25, so 26.7% of the combined rate. Running the same refactoring task four times through the same gateway on 2026-08-20, the median bill came out at $0.0397 for Grok 4.6 and $0.1417 for Opus 5, or 28.0%. But Grok returned 57% as much code, so per thousand characters of output the gap narrows to 49%.
- Why is my Grok 4.6 cost estimate too low?
- Because completion_tokens does not include reasoning_tokens on Grok, while total_tokens does. Estimating with the usual prompt x input + completion x output formula gave $0.0086 against a real $0.0397 on the same runs, understating the bill by 78%. Opus 5 does not split the two: its completion_tokens already covers thinking, so the same formula is correct there. One formula, two different answers.
- Does Grok 4.6 or Opus 5 answer faster?
- Opus 5, on this workload. Median wall-clock for a full response was 59.0 seconds for Opus 5 and 109.4 seconds for Grok 4.6 across four runs each, non-streaming, same prompt and same gateway. Grok spent most of that on reasoning: a median 5,229 reasoning tokens against 1,308 tokens of visible output.
- Does Terminal-Bench 2.1 show Opus 5 ahead of Grok 4.6?
- Neither model is on the leaderboard. As of 2026-08-20 the official Terminal-Bench 2.1 board carries 17 verified entries topped by Claude Code with Fable 5 at 83.8%, and the most recent submission is dated 2026-07-11. Terminal-Bench 2.0 carries 142 entries and also lists neither model. Any 86-88% figure you have seen attributed to this benchmark for either model is a vendor-reported number, not a verified board entry.
- Why does Opus 5 stop at 4,096 tokens through an OpenAI-compatible endpoint?
- Because that is the default max_tokens when you do not set one. In the first pass both Opus 5 runs stopped at exactly 4,096 completion tokens; raising max_tokens to 8,000 let the same prompt run to 5,349 and 7,436 tokens with finish_reason stop. The model page lists 128K max output, but you only get it if you ask.
- Which model should I use for agent loops?
- Split by task shape rather than picking one. Grok 4.6 at roughly a quarter of the bill is the better default for the routine two-thirds of agent work where a shorter answer is fine and latency is not user-facing. Reserve Opus 5 for the passes where output completeness matters, since it returned 1.75x more code per run here and did it in half the wall-clock time.
- Do both models charge for cache writes?
- No. Anthropic charges separately to write a prompt into the cache, listed on the ofox model page at $6.25/M for the 5-minute TTL and $10/M for the 1-hour TTL, on top of $0.5/M cache reads. The Grok 4.6 page lists cache reads at $0.5/M and no write charge. For agent loops that rewrite a long system prompt often, that asymmetry moves the total more than the headline rates do.


