Pricing and budget ยท 2026-09-23

Claude Opus 5 5-minute and 1-hour cache-write prices: which one pays off when

Covers the difference between the two cache-write prices on anthropic/claude-opus-5 (5-minute and 1-hour TTL), how to send the `cache_control` marker through LLMTR, and which TTL lowers cost at which request interval.

Cost diagram showing 5-minute cache writes as cheaper but short-lived, and 1-hour cache writes as more expensive but long-lived, on Claude Opus 5.

Two separate write prices, a single read price

Claude Opus 5's pricing card carries cache writes as two separate line items: $6.25 per million tokens for the 5-minute TTL, $10 for the 1-hour TTL. Cache reads, independent of TTL, are calculated at a single price ($0.50). With a regular input price of $5, a 5-minute write costs 1.25x input, a 1-hour write 2x, and a read one tenth.

The model offers up to 1M-token context and 128K max output; combined with adaptive thinking, which is on by default, these three prices decide most of the total cost in an agent flow that resends a long system instruction or a large codebase repeatedly.

Sending the marker through LLMTR

LLMTR forwards the `cache_control` marker to Anthropic on both `/v1/messages` and `/v1/chat/completions`. The marker takes the form `{"type": "ephemeral"}`; `ttl` can be `"5m"` or `"1h"`, and without a `ttl` the 5-minute lifetime applies. On the Messages endpoint the marker can go on system, text and image blocks, tool definitions and tool_result blocks; on Chat Completions it goes on a text or image part of a message's content.

Everything before the marker (tool definitions, the system instruction and the messages up to that point) is cached as one prefix. Caching works by prefix match: if a single character in the prefix changes, for example a timestamp added to the system instruction, the next request can't read the cache and writes the prefix again. Put content that doesn't change first and the question that changes on every request after the marker. On Opus 5 the shortest cacheable prefix is 512 tokens; a shorter prefix doesn't return an error, it just isn't cached.

A 1-hour cache marker on the Messages endpoint

curl "$LLMTR_BASE_URL/v1/messages" \
  -H "Authorization: Bearer $LLMTR_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "anthropic/claude-opus-5",
    "max_tokens": 4096,
    "system": [
      {"type": "text", "text": "<long, fixed system instruction>", "cache_control": {"type": "ephemeral", "ttl": "1h"}}
    ],
    "messages": [{"role": "user", "content": "<question that changes on every request>"}]
  }'

Which TTL pays off when

Every read restarts the cache's lifetime. If requests sharing the prefix arrive less than 5 minutes apart, the 5-minute cache never goes cold; in that case the 1-hour TTL only means paying double for the write. The 1-hour TTL pays off when requests are 5 to 60 minutes apart: a user who comes back after 20 minutes, or a job that runs every quarter hour. In that range a 5-minute cache has expired by every request and is written again each time; since a write costs more than regular input, that is more expensive than sending no marker at all.

The table below shows only the cost of a fixed 100K-token prefix; content after the prefix and the output are billed at the same price in every case.

  • Requests less than 5 minutes apart: 5-minute TTL; it pays off on the first reuse.
  • Requests 5 to 60 minutes apart: 1-hour TTL; it pays off on the second reuse.
  • A prefix used only once: send no marker; a write costs more than regular input.
Total input cost of a fixed 100K-token prefix on Claude Opus 5
ScenarioNo marker5-min TTL1-hour TTL
Single request$0.50$0.625$1.00
2 requests within 5 minutes$1.00$0.675$1.05
10 requests, each within 5 minutes of the previous$5.00$1.075$1.45
4 requests 20 minutes apart$2.00$2.50$1.15

Verifying the cache is hit

In the Messages response's `usage` field, `cache_creation_input_tokens` gives the tokens written to cache and `cache_read_input_tokens` the tokens read from it; `input_tokens` is the regular-priced remainder after the last marker. In a Chat Completions response, tokens read from cache appear in `usage.prompt_tokens_details.cached_tokens`.

If the read count comes back as zero on the second request with the same prefix, either the prefix changed or the TTL expired. As a first step, check the system instruction and tool definitions for a value that changes on every request (a date, a request ID, a list whose order varies).

Frequently asked questions

Can I use the 1-hour cache with Claude Opus 5 through LLMTR?

Yes. Add `"ttl": "1h"` to the marker. The cached part is billed at $10 per million tokens when written and $0.50 on later reads.

Does the same marker work on Claude Opus 5.5?

Yes, the marker and TTL choice are the same. Opus 5.5, the current model in the Opus line, has lower prices: input $4 per million tokens, 5-minute write $5, 1-hour write $8, read $0.20.

Does adaptive thinking affect cost?

Adaptive thinking is on by default and reasoning tokens are billed as output; that's a separate line from input cost, so account for both together.

Related posts