HomeGuides → Claude Opus 5 in production

Claude Opus 5 in production

This model's bill is rarely about the tokens you think it is about. Here is one of ours, taken apart line by line.

The short version

A real invoice, taken apart

7 calls on this platform. Look at the token counts before the money:

input          90 tokens  ×  $5.00 / 1M            =  $0.00045
output      8,338 tokens  ×  $25.00 / 1M           =  $0.20845
cache read  7,082 tokens  ×  $0.50 / 1M   (10%)    =  $0.00354
cache write 147,302 tokens  ×  $6.25 / 1M  (125%)   =  $0.92
                                                      ─────────
                                                      $1.13308

invoice total for those 7 calls:                    $1.13

Ninety input tokens. Eight thousand output tokens. And 81% of the money went to cache writes — rewriting context that produced nothing a user ever saw.

That arithmetic also confirms Anthropic's cache multipliers against a real bill rather than a docs page: reads at a tenth of input, writes at one and a quarter times it.

Why this happens

Prompt caching works by storing a prefix of your prompt. Send the same prefix again and it is a cheap read. Change anything inside it — even one character near the top — and the whole prefix is written again at 125% of the input rate.

Things that quietly invalidate a cache prefix:

Each of those turns a $0.50 read into a $6.25 write. In an agent loop that runs for hours, that difference is the entire bill.

The order of operations for cutting a Claude bill

  1. Measure the cache-write share first. Your usage log has the numbers. If cache writes are a large fraction, stop here — the rest of the list is smaller.
  2. Stabilise the prefix. Move anything variable to the end of the prompt. Sort tool definitions deterministically. Trim conversation history from the tail.
  3. Shorten output. Output bills at five times input on this model. A prompt that produces 30% shorter answers saves more than most model swaps.
  4. Only then consider dropping to claude-sonnet-5, which is $2.00 / $10.00 against $5.00 / $25.00 here — and which requires re-validating your outputs, unlike the three steps above.

When to use it, and when not

Reach for Opus when a task has genuinely defeated the cheaper models: multi-file refactors, long-context reasoning, coding agents working over a real codebase.

Do not send it classification, extraction, routing or tagging. Those are high-volume and low-judgement, they dominate token counts in most pipelines, and a small model handles them indistinguishably. Routing only the final reasoning step to Opus usually cuts blended cost by more than half.

Calling it

from openai import OpenAI

client = OpenAI(api_key="YOUR_KEY", base_url="https://apiclan.us/v1")

resp = client.chat.completions.create(
    model="claude-opus-5",
    messages=[{"role": "user", "content": "Hello"}],
)

Using Claude Code or the Anthropic SDK? Those clients append /v1/messages themselves, so the base URL is https://apiclan.us with no /v1. Getting it backwards returns a 404 from the edge — the request never reaches the gateway and never appears in your usage log, which looks exactly like a bad key. Per-client settings are in the base URL guide.

What you pay here

Per 1M tokensList priceAPICLANYou save
Input$5.00$1.5070%
Output$25.00$7.5070%

Cache reads and writes bill at the same fraction of their own rates. Calculator and sibling models on the price page.

Questions people actually ask

My token count is small but the bill is not. Why?

Almost always cache writes. They bill above the input rate and do not appear in the input-token column. Check the cache-creation figure in your usage log.

Should I just turn caching off?

No. Reads are a tenth of the input rate — caching is heavily net-positive when the prefix is stable. The problem is never caching itself, it is a prefix that keeps changing.

Opus 5 or Sonnet 5?

Sonnet is $2.00 / $10.00 against Opus at $5.00 / $25.00 and is fast enough for interactive use. Try Sonnet first on twenty real inputs from your own product; move up only where you can see the difference.

Start using it

No subscription, no monthly minimum, no sales call. Top up with USDT and spend what you use — 1 USDT gives you 2 credits of API balance.

Read the 30-second quickstart

Prices quoted on this page are regenerated automatically from live billing data. Third-party terms are quoted from that party's own published documentation.