DEV Community

hopbase
hopbase

Posted on Originally published at hop-base.com

Claude Fable 5.1 API: 1M Context, $0.25/M Cache Reads and Migrating from Fable 5

Anthropic's newest flagship, Claude Fable 5.1 (model ID claude-fable-5-1), is available through the HopBase API over the native Anthropic Messages protocol. If your key already calls Claude, switching is a one-line model-name change; confirm with GET /v1/models.

Model specs

  • 1M context window, 128K max output: whole repositories, long documents, and long multi-turn conversations fit in a single request, with no need to split long outputs.
  • Adaptive thinking, always on: no thinking parameter needed; steer reasoning depth and spend with output_config.effort (low through max).
  • Built for long-horizon agent work: stronger than Fable 5 at long-running autonomous coding, document / spreadsheet / slide work, multi-step research, vision, and computer use. Same tokenizer as Fable 5, so token counts are essentially unchanged.
  • Native Anthropic Messages API: standard /v1/messages; the Anthropic SDK and Claude Code switch over with zero code changes.

Pricing: official list price

Item (per million tokens) Claude Fable 5.1 Claude Fable 5
Input $10 $10
Output $50 $50
Cache write (5 min / 1 hour) $12.50 / $20 $12.50 / $20
Cache read (hit) $0.25 (0.025×) $1.00

Cache reads cost a quarter of Fable 5's, so long sessions and agent loops that re-read the same prefix save the most.

What the cache-read cut means per turn

Take an agent loop that re-sends a 200K-token prefix (system prompt + tool definitions + repo context) every turn, adds 5K fresh input tokens and gets 2K output tokens back:

Fable 5.1: 200K × $0.25/M + 5K × $10/M + 2K × $50/M = $0.05 + $0.05 + $0.10 = $0.20 per turn
Fable 5:   200K × $1.00/M + 5K × $10/M + 2K × $50/M = $0.20 + $0.05 + $0.10 = $0.35 per turn
Enter fullscreen mode Exit fullscreen mode

Over a 50-turn session that is about $10 versus $17.50 — a 43% saving with no prompt changes, as long as the prefix stays byte-identical so it keeps hitting the cache (the one-time cache write is extra in both cases). Live list prices for every model are on the pricing page.

Three things to check when migrating from Fable 5 / Opus 5

  • Forced tool use is gone: tool_choice any / tool returns 400. Use auto plus an instruction naming the tool, and strict: true or structured outputs when you need schema-valid JSON.
  • Thinking blocks are bound to the model: pass them back unchanged within a conversation and keep the history append-only — editing earlier turns invalidates earlier thinking blocks.
  • No assistant prefill: as with every Claude model since 4.6, control output format with structured outputs or the system prompt.

Three-minute quickstart

curl https://api.hop-base.com/v1/messages \
  -H "x-api-key: sk-your-key" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-fable-5-1",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello, introduce yourself"}]
  }'
Enter fullscreen mode Exit fullscreen mode

Full setup steps are in the Anthropic SDK guide and the Claude Code guide. If you already have a key, just switch the model name to claude-fable-5-1.


Originally published on the HopBase blog.

Top comments (0)