July 30, 2026
Claude Opus 5 API Pricing: Official Rates, Gateway Rates, and Real Cost
Compare Claude Opus 5 API prices, then estimate real spend from output length, prompt caching, reasoning tokens, repeated agent turns, and retries.
The Claude Opus 5 API price is easy to quote and easy to underestimate. Anthropic lists the standard API at $5 per million input tokens and $25 per million output tokens. GlideflowAI’s current Opus 5 route is $0.85 input and $4.25 output per million tokens. Both are dated prices, checked on July 30, 2026.
Those four numbers are only the start of a useful estimate. A coding agent can send the same repository context through several turns, create cache entries, read them later, spend tokens on reasoning, and produce long tool calls. You need to model the whole loop—not just the first prompt.
Claude Opus 5 price at a glance
| Route | Input / 1M tokens | Output / 1M tokens | Cache pricing shown separately? |
|---|---|---|---|
| Anthropic standard API | $5.00 | $25.00 | Yes |
| GlideflowAI OpenAI-/Anthropic-compatible route | $0.85 | $4.25 | Not in the public model-menu fields |
The Anthropic figures come from Anthropic’s official Claude pricing page. The Glideflow figures come from the live public pricing API: Opus 5 has a model_ratio of 0.425; multiplying it by 2 gives the $0.85 input price, and multiplying that by the completion_ratio of 5 gives the $4.25 output price. You can check the current menu on /pricing.
The relative arithmetic is the same on input and output:
$0.85 / $5.00 = 0.17$4.25 / $25.00 = 0.17That comparison does not say the two routes have identical features, limits, latency, support, or cache treatment. A compatible gateway changes the endpoint and billing path; it does not turn a gateway route into the provider-direct service. Test the protocol features your application actually uses before moving traffic.
What actually drives an Opus 5 bill
The billable token count is not simply the text you typed. For an agent, the request can include system instructions, conversation history, tool definitions, file contents, and results returned by tools. The response can include visible prose, code, tool arguments, and reasoning-related output charged under the model’s output-token rules.
Four variables usually matter most.
Output length
Opus 5’s official output rate is five times its input rate. The same 5:1 relationship appears in Glideflow’s current route price. That makes verbose answers disproportionately important.
Suppose one run sends 100,000 uncached input tokens and returns 10,000 output tokens:
| Route | Input calculation | Output calculation | Total |
|---|---|---|---|
| Anthropic | 0.1 × $5 = $0.50 |
0.01 × $25 = $0.25 |
$0.75 |
| Glideflow | 0.1 × $0.85 = $0.085 |
0.01 × $4.25 = $0.0425 |
$0.1275 |
Now keep the input fixed but let the answer grow to 40,000 output tokens. The official total becomes $0.50 + $1.00 = $1.50; the Glideflow menu calculation becomes $0.085 + $0.17 = $0.255. The input did not change. The total doubled.
This is why “be concise” is not merely a style preference in an automated workflow. Give the agent a stopping condition, ask for focused diffs, and avoid requesting a full restatement of every file after each tool call.
Cache writes and cache reads
Anthropic publishes separate prompt-caching prices for Opus 5. A five-minute cache write costs $6.25 per million tokens, a one-hour cache write costs $10 per million, and a cache hit or refresh costs $0.50 per million. Those correspond to 1.25×, 2×, and 0.1× the base input price on Anthropic’s pricing page.
The first cached request can therefore cost more than an ordinary input request. Reuse is where the saving appears.
Take a stable 200,000-token repository prefix that one agent uses ten times within a valid five-minute cache window. Ignoring the smaller changing suffix, the provider-direct cache portion is:
First 200,000-token cache write:0.2 × $6.25 = $1.25
Nine 200,000-token cache reads:9 × 0.2 × $0.50 = $0.90
Total cached-prefix input cost:$1.25 + $0.90 = $2.15Sending the same 200,000 tokens ten times at the normal $5 input price would be 10 × 0.2 × $5 = $10. But this only works if the requests qualify for cache reuse. Change the prefix, miss the cache window, or use a route that handles caching differently and the calculation changes.
Glideflow’s public model menu currently exposes a base input ratio, output multiplier, and a cache ratio, but it does not present the full provider-direct write-duration schedule above as a customer-facing price table. Do not assume Anthropic’s cache-write terms carry over unchanged. If prompt caching is material to your application, verify the route behavior and the usage records with a small controlled test.
Reasoning tokens
Reasoning is not a free side channel. Anthropic states that thinking tokens are billed as output tokens. The exact amount depends on the request and model behavior, so a budget based only on visible answer length can be too low.
Your application should rely on returned usage data rather than trying to infer billable output from the text displayed in the UI. Two answers with similar visible length can have different billed usage. Store the API’s input and output usage beside the model ID, timestamp, cache fields, and request purpose. That record is more useful than estimating from characters.
If an agent framework hides usage details, run one equivalent request directly through the API and inspect the response. The current model catalog gives you the exact route ID; use claude-opus-5, not a display label copied from a dashboard screenshot.
Agent loops
An agent request rarely stands alone. A typical loop may plan, search the repository, read files, call a test command, inspect the failure, edit code, rerun the test, and summarize. Each model turn can carry part of the accumulated history again.
That creates a multiplicative effect:
cost per turn × number of turns × retriesIf one turn is cheap but the agent needs fifteen of them, compare that run with the complete cost of a five-turn alternative. Price per million tokens is necessary for budgeting, but cost per completed task is the operational metric.
Keep the comparison reproducible. Use the same repository state, prompt, permissions, maximum turns, and test command. Record failed attempts instead of deleting them from the total.
A worked monthly Opus 5 estimate
Consider a small team running 300 bounded coding-agent tasks per month. The following counts are concrete workload inputs for the calculation, not a claim about an average Opus 5 session:
- 180,000 ordinary input tokens per task
- 12,000 total output tokens per task, including billed reasoning output
- 300 tasks
- no cache discount included
Monthly token use is:
Input:180,000 × 300 = 54,000,000 tokens
Output:12,000 × 300 = 3,600,000 tokensThe provider-direct standard-price estimate is:
Input: 54 × $5.00 = $270.00Output: 3.6 × $25.00 = $90.00Total: $360.00The current Glideflow menu-price estimate is:
Input: 54 × $0.85 = $45.90Output: 3.6 × $4.25 = $15.30Total: $61.20The difference in this specific arithmetic is $360.00 - $61.20 = $298.80. It is not a forecast of your saving. Your real total depends on token counts, cache handling, retries, group multipliers, and any route-specific billing behavior.
You can reuse this small formula in a spreadsheet:
monthly cost = (monthly input tokens / 1,000,000 × input price) + (monthly output tokens / 1,000,000 × output price)Add separate cache-write and cache-read terms only when you have verified prices for the route being modeled. Combining uncached input and cache hits into one invented blended rate makes the spreadsheet look precise while hiding the assumption that matters most.
How to measure a real agent run
Start with one representative issue rather than a synthetic “hello” request. Keep it safe: use a branch, limit writable paths, and name the test the agent must run. Then collect:
- Exact model ID and route.
- Input, output, cache-creation, and cache-read usage returned by the API.
- Total turns, including retries.
- Whether the task passed the named test.
- Human cleanup time.
Run the same issue twice if cache behavior is part of the decision. The cold run and warm run answer different questions.
For a direct compatibility check through Glideflow, use the versioned OpenAI-style endpoint:
export GLIDEFLOW_API_KEY="sk-your-key"
curl https://api.glideflowai.com/v1/chat/completions \ -H "Authorization: Bearer $GLIDEFLOW_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-opus-5", "messages": [ {"role": "user", "content": "Return exactly: connection ok"} ], "max_tokens": 128 }'This verifies the key, base URL, and model ID. It does not verify an agent loop, prompt caching, or feature parity with Anthropic’s native endpoint. For tool-specific setup, follow the Claude Code connection guide and test the actual client.
Choosing between official and gateway access
Use Anthropic’s direct API when you need its native commercial relationship, documented provider-direct features, or support path. Use a compatible gateway when one endpoint and one balance across several model families reduce integration work for your project. Neither choice removes the need to inspect usage and failures.
Before changing a production client, compare one cold run, one repeated run, and one tool-heavy run. Calculate both routes from the returned usage—not from prompt length alone. Then browse the live /pricing page, create a restricted test key at /start, and put a hard turn limit on the first Opus 5 task.
