Claude Fable 5.2 API pricing and access
Run Claude Fable 5.2 (model ID claude-fable-5-2) through Code By AI for $2.00 per 1M input tokens and $10.00 per 1M output tokens. Anthropic lists the same model at $8.00 and $40.00; you pay about 75% less than that, with no monthly subscription.
What Claude Fable 5.2 is for
Use this model through Claude Code to explain unfamiliar code, investigate errors and draft tests for changes. Review generated code and run your own tests before using it.
Official price
$8.00
per 1M tokens, USD
Your price
$2.00
per 1M tokens, USD
You save
−75%
1/4 of official price
| Official price | Your price | |
|---|---|---|
| Input | $8.00 | $2.00 |
| Cache read | $0.20 | $0.05 |
| Cache write (5 min) | $10.00 | $2.50 |
| Cache write (1 hour) | $16.00 | $4.00 |
| Output | $40.00 | $10.00 |
Claude cache writes cost 1.25× the input rate for 5-minute entries or 2× for 1-hour entries. These rates replace the normal input rate for those tokens; the cache-read price applies only to reads.
What claude-fable-5-2 costs in a typical month
For 20M input and 2M output tokens, the same workload costs $240.00 at list price and $60.00 through Code By AI — 75% less.
How to use claude-fable-5-2
Export ANTHROPIC_BASE_URL=https://www.codebyai.net/api/agent and ANTHROPIC_AUTH_TOKEN=sk-proj-xxxx, then launch the CLI, and use the model ID claude-fable-5-2. The Claude Code guide walks through the full configuration.
export ANTHROPIC_BASE_URL="https://www.codebyai.net/api/agent" export ANTHROPIC_AUTH_TOKEN="sk-proj-xxxx"
No key yet? Create one
Claude Code, Codex and Gemini CLI compatibility
A client can call claude-fable-5-2 only when it speaks the endpoint that serves this model. The table shows what works and the minimum configuration.
- Claude CodeAvailable
Set ANTHROPIC_BASE_URL="https://www.codebyai.net/api/agent" and ANTHROPIC_AUTH_TOKEN, then use model claude-fable-5-2.
Open the Claude Code guide - CodexAvailable
Available through the Responses endpoint: it accepts Claude models, so claude-fable-5-2 is forwarded to the Claude channel and billed at Claude rates.
Open the Codex guide - Gemini CLINot applicable
Not applicable: the Gemini generateContent endpoint serves the Gemini family only.
Open the Gemini CLI guide
Compare other Claude Code models
Your price /1M
Claude Opus 5.5 vs Fable 5.2: API price and when to use which
- claude-haiku-4-5-20251001$0.25 / $1.25
- claude-sonnet-5Default$0.50 / $2.50
- claude-sonnet-5-5$0.50 / $2.50
- claude-sonnet-4-6$0.75 / $3.75
- claude-opus-5-5$1.00 / $5.00
- claude-opus-4-6$1.25 / $6.25
- claude-opus-4-7$1.25 / $6.25
- claude-opus-4-8$1.25 / $6.25
- claude-opus-5$1.25 / $6.25
- claude-fable-5$2.50 / $12.50
- claude-fable-5-1$2.50 / $12.50
Similar price on other channels
Claude Fable 5.2 FAQ
Get started
Four steps to your first request
- 01
Create a free account
Sign up with Google, GitHub or email and set a password. No card is required.
- 02
Generate an API key
Create a key in one click from the dashboard. It lets your CLI authenticate with Code By AI.
- 03
Top up your balance
Add credit before your first request; usage is charged per token from your balance.
- 04
Point your CLI at Code By AI
Export one base-URL variable, or add a model provider block to config.toml. The setup guides list the exact lines for each agent.
No card required to sign up · API usage requires a top-up