How to Use Claude Fable 5 in OpenClaw
A hands-on guide — two paths, real errors, and how to fix them.
Tested on OpenClaw 2026.5.27 (WSL2/Linux) · OrcaRouter plugin requires OpenClaw ≥ 2026.5.12 · July 2026
Claude Fable 5 is Anthropic's first publicly released Mythos-class model — a tier that sits above Opus, built for long-running, multi-step, autonomous work. That profile makes it a natural fit for an agent framework like OpenClaw, where the model isn't just answering a question but planning, calling tools, and sustaining coherence across many turns.
This guide covers two ways to wire Fable 5 into your OpenClaw agent: directly through an Anthropic API key (Path A), and through OrcaRouter using a single OpenAI-compatible key (Path B). Both get you to the same model — they differ in setup, cost control, and routing flexibility.
A note on verification: Path B was tested end-to-end on OpenClaw 2026.5.27 — every command block and error message in that section is a real transcript from that run. Path A follows Anthropic's and OpenClaw's official documentation.
First, the thing most tutorials skip: Fable 5's safeguard reroute
For a chatbot this would be a footnote. For an agent framework it's the most important section in the guide, so it goes first.
Fable 5 ships with additional safety measures. Per Anthropic's official page, the model includes robust safeguards for cybersecurity and biology: many queries in these domains are automatically routed to Anthropic's next-most-capable model, Claude Opus 4.8, if flagged by these safeguards — and you are not charged Fable prices for rerouted requests. Anthropic explains the fallback experience in more detail in this support article.
What this means for your OpenClaw agent
• Refusals arrive as a successful response, not an error. On the Claude API, a declined request returns a normal response with a refusal stop reason rather than an HTTP error. Your agent loop must treat that as “retry on another model,” not “the API went down.”
• What you get back may not be Fable 5. If you're comparing models inside OpenClaw and a response feels off, a safeguard reroute to Opus 4.8 may be the reason. It's expected behavior, not a bug — outside those gated domains, the model behaves normally.
Everything else in this guide is mechanical; this is the part that needs your attention.
0. Prerequisites
• OpenClaw ≥ 2026.5.12 installed and initialized (openclaw --version to check — this guide was tested on 2026.5.27).
• A working gateway (openclaw status shows it reachable).
• Node 22.19+ or 24.
• If you are behind a network that needs a proxy to reach Anthropic / OrcaRouter, make sure the gateway service itself can use it — this trips up almost everyone once (see §2.3).
Key-safety rule: you generate and paste API keys yourself. Never share a key in a screenshot, a chat, or a public repo. Store keys in a file readable only by you (chmod 600) and reference them from there — never hard-code a key into a file you might commit.
1. Which path should you pick?
Anthropic official key
OrcaRouter key
Key prefix
sk-ant-
sk-orca-
Models reachable
Anthropic models only
Fable 5 + GPT / Gemini / GLM / DeepSeek…
Setup in OpenClaw
Built-in provider
Install the ClawHub plugin first
Routing / spend policy
Per-agent config
Central console
Native refusal / fallback
First-class (Anthropic's own API)
Depends how the router surfaces it
Billing
Anthropic account
OrcaRouter account (single balance)
Both paths reach the same model. Neither is “better” — they're different trade-offs. If Fable 5 is the only frontier model you care about and you want the cleanest access to its native behavior, go direct. If you're routing many models and want one key plus central control, a router earns its keep.
2. Path A — Anthropic official API key
The most direct route: OpenClaw talks straight to Anthropic, no intermediary. You get the model exactly as Anthropic serves it, including native refusal and fallback semantics.
2.1 Generate the key
• Sign in at console.anthropic.com.
• Open API Keys → Create Key. Copy the sk-ant- string (shown once).
• Under Billing, add credit and set a monthly cap so a runaway agent can't drain your account. Fable 5 is priced at $10 per million input tokens and $50 per million output tokens, with a 90% input-token discount for prompt caching (source).
2.2 Store the key safely
Keep it in a protected secrets file rather than pasting it inline anywhere:
touch ~/.openclaw_secrets && chmod 600 ~/.openclaw_secrets
nano ~/.openclaw_secrets
Add this line, then save:
export ANTHROPIC_API_KEY="sk-ant-..."
Load it and confirm (prints only the prefix, never the full key):
source ~/.openclaw_secrets
echo "loaded: ${ANTHROPIC_API_KEY:0:10}..."
Common error: export: '=': not a valid identifier → you put spaces around the =, or used curly “smart quotes.” Use exactly KEY="value" — no spaces, straight ASCII quotes.
2.3 Make the gateway see the key (critical)
This is the single biggest gotcha. On Linux, the OpenClaw gateway usually runs as a systemd user service. A variable you export in your shell lives only in that shell — the background service is started separately and cannot see it. So even if your terminal has the key, the gateway may not.
Give the service its own copy via a drop-in file:
mkdir -p ~/.config/systemd/user/openclaw-gateway.service.d/
nano ~/.config/systemd/user/openclaw-gateway.service.d/anthropic.conf
Contents — note that systemd's Environment= syntax takes a literal KEY=value, no export, and you must write the real key, because a $VAR reference won't resolve here:
[Service]
Environment="ANTHROPIC_API_KEY=sk-ant-..."
Lock it down, reload, restart:
chmod 600 ~/.config/systemd/user/openclaw-gateway.service.d/anthropic.conf
systemctl --user daemon-reload
systemctl --user restart openclaw-gateway
Confirm the service actually loaded it (prints prefix only):
systemctl --user show openclaw-gateway --property=Environment \
| grep -o 'ANTHROPIC_API_KEY=sk-ant-....'
2.4 Configure Fable 5 as the model
Back up your config first (cheap insurance), then check the exact model ref your build exposes:
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak
openclaw models list | grep -i fable
Set it as the default, using the exact ref you saw above (shown here as anthropic/claude-fable-5):
openclaw config set agents.defaults.model.primary "anthropic/claude-fable-5"
openclaw config validate
systemctl --user restart openclaw-gateway
Allow-list note: some setups enforce a model allow-list as a cost/safety guard. If yours does, register anthropic/claude-fable-5 under agents.defaults.models first, or the model switch gets rejected with a “not allowed” error (you'll see the real error text in Path B, §3.4 — it's the same mechanism).
2.5 Test it
openclaw agent --agent main --model "anthropic/claude-fable-5" \
--message "Draft a three-stage plan for migrating a legacy service. Keep it terse."
A planning-style prompt is a good first test — it plays to Fable 5's strength (long-horizon, multi-step reasoning) rather than a one-liner where you'd barely notice the difference from a cheaper model.
Path A — errors you may hit
Symptom
Cause
Fix
401 / authentication_error
Gateway can't see the key
Add it to the systemd drop-in (§2.3), restart
model not found
Wrong Fable 5 ref
Copy the exact ref from models list
not allowed for agent
Model not in the agent allow-list
Register it under agents.defaults.models
Credit / quota error
No balance or cap hit
Top up / raise cap in the Anthropic console
Works in terminal, fails in gateway
Shell var vs. service env
See §2.3 — the service needs its own env
Best for: staying close to the metal — you want the model unmediated, you're already in the Anthropic ecosystem, and you want first-class access to native refusal/fallback handling.
3. Path B — OrcaRouter API key (verified end-to-end)
OrcaRouter is an OpenAI-compatible LLM router: one sk-orca- key reaches Fable 5 plus models from many other vendors, with server-side routing policies. In OpenClaw it ships as a ClawHub plugin, so there's one extra install step versus Path A. Everything below is a real transcript from OpenClaw 2026.5.27.
3.1 Install the plugin

openclaw plugins install clawhub:@continuum-ai-corp/openclaw-orcarouter
openclaw plugins list | grep -i orca
Before trusting any third-party plugin, inspect what it can do:
sailt@savor:~$ openclaw plugins inspect orcarouter
OrcaRouter Provider
id: orcarouter
OrcaRouter - adaptive routing across many LLMs through a single
OpenAI-compatible API.
Status: loaded
Version: 0.1.0
Capability mode: plain
Legacy before_agent_start: no
Capabilities:
text-inference: orcarouter
Install:
Source: clawhub
Spec: clawhub:@continuum-ai-corp/openclaw-orcarouter
ClawHub channel: community
Npm integrity: sha512-Gpu6fC30zZ8iNiEliLEj6Qbr...
Read that capability block before moving on: the plugin declares a single text-inference capability and no before_agent_start hook — it's a model forwarder, nothing more. It doesn't read your files or run shell commands. (Plugin page: ClawHub.)
You may also notice this warning on your next run:
[plugins] plugins.allow is empty; discovered non-bundled plugins may
auto-load: orcarouter (/home/sailt/.openclaw/extensions/orcarouter/
dist/index.js). Set plugins.allow to explicit trusted ids.
That's OpenClaw telling you no plugin allow-list is set, so any discovered plugin may auto-load. Silence it — and make your trust explicit — with:
openclaw config set plugins.allow '["orcarouter"]'
3.2 Get and store the key
Generate an sk-orca- key from the OrcaRouter console, then store it the same way as Path A:
# in ~/.openclaw_secrets
export ORCAROUTER_API_KEY="sk-orca-..."
3.3 Give the gateway the key
Same critical rule as Path A — the systemd service needs its own copy. Keep it in a separate drop-in for tidiness:
# ~/.config/systemd/user/openclaw-gateway.service.d/orcarouter.conf
[Service]
Environment="ORCAROUTER_API_KEY=sk-orca-..."
chmod 600 ~/.config/systemd/user/openclaw-gateway.service.d/orcarouter.conf
systemctl --user daemon-reload
systemctl --user restart openclaw-gateway
Confirm the service actually sees it:
sailt@savor:~$ systemctl --user show openclaw-gateway --property=Environment \
| grep -o 'ORCAROUTER_API_KEY=sk-orca-....'
ORCAROUTER_API_KEY=sk-orca-****
3.4 Register and select Fable 5
OrcaRouter refs follow orcarouter/<vendor>/<model>. Check the exact ref for Fable 5:
sailt@savor:~$ openclaw models list | grep -i fable
orcarouter/anthropic/claude-fable-5 text 195k no yes configured
So the ref is orcarouter/anthropic/claude-fable-5, with a 195k-token context window as exposed through the router. (Model page: orcarouter.ai/models/anthropic/claude-fable-5.)
Here's what happens if you skip registration and just try to use a model — a real transcript:
sailt@savor:~$ openclaw agent --agent main --model "orcarouter/z-ai/glm-5.2" \
--message "tell me a joke"
GatewayClientRequestError: Error: Model override "orcarouter/z-ai/glm-5.2"
is not allowed for agent "main".
OpenClaw enforces a per-agent model allow-list as a cost/safety guard. Register the model first:
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak
openclaw config set agents.defaults.models.'orcarouter/anthropic/claude-fable-5' '{}'
Gotcha — dots in model names. If a ref contains a version dot, config set treats the dot as a path separator and rejects it. Real transcript, using GLM-5.2 as the example:
sailt@savor:~$ openclaw config set \
agents.defaults.models.'orcarouter/z-ai/glm-5.2' '{}'
Error: Config validation failed:
agents.defaults.models.orcarouter/z-ai/glm-5: Invalid input
Note how the ref got truncated at .2. Fable 5's ref has no dot, so it's unaffected — but for dotted refs, edit ~/.openclaw/openclaw.json by hand to add the entry, then run openclaw config validate.
Then set it as default (or just pass --model per run), validate, restart:
openclaw config set agents.defaults.model.primary "orcarouter/anthropic/claude-fable-5"
openclaw config validate
systemctl --user restart openclaw-gateway
3.5 Test it

Real transcript:
sailt@savor:~$ openclaw agent --agent main \
--model "orcarouter/anthropic/claude-fable-5" --message "tell me a joke"
OpenClaw 2026.5.27 (27ae826) — I've seen your commit messages.
We'll work on that together.
A programmer's wife asks him, "Could you go to the store and buy a loaf
of bread? And if they have eggs, get a dozen."
He comes back with 12 loaves of bread.
"Why on earth did you buy 12 loaves?!"
"They had eggs."
Fable 5, answering through OrcaRouter, in one command. (Also: the model has better comedic timing than most of us.)
Path B — errors you may hit
Symptom
Cause
Fix
plugins.allow is empty (warning)
No plugin allow-list set
config set plugins.allow '["orcarouter"]'
No target session selected
Missing --agent
Add --agent main
not allowed for agent "main"
Model not registered
Add to agents.defaults.models (§3.4)
Invalid input on config set
Dot in model name parsed as a path
Edit openclaw.json by hand, then validate
401 unauthorized
Gateway didn't get the key
Check the systemd drop-in (§3.3)
model not found
Wrong ref / not in catalog
Verify the ref on the models page

Best for: one key across many vendors, managing routing and spend policy centrally in the router console rather than per-agent config, or A/B-testing Fable 5 against other vendors' models without juggling separate provider keys.
4. Using Fable 5 day to day
4.1 Three ways to select the model
Goal
Command
Scope
Try it for one call
openclaw agent --model <ref> --message ...
single run
Switch mid-conversation
/model <ref> (inside the TUI)
current session
Make it the default
config set agents.defaults.model.primary <ref>
all new sessions
4.2 Context & cost notes
Fable 5 is expensive per token and token-hungry on long tasks — that's the nature of a model built to work for hours. A few habits keep the bill sane:
• Reserve it for the jobs that justify it. Use a cheaper model as your agent's default and switch to Fable 5 for genuinely hard, long-horizon tasks — with a per-run --model override, or via routing policy if you're on Path B.
• Start fresh sessions between unrelated tasks (/new in the TUI) so you're not re-sending a long history on every turn. Switching models keeps your conversation coherent — OpenClaw resends the text history to the new model — and cost tracks how long the context is, not whether you swapped.
• Watch the token counter. OpenClaw shows per-session token usage; if a trivial exchange burns tens of thousands of tokens, that's usually fixed prompt overhead (your identity file + skill descriptions), not the model — worth trimming separately.
• If a reply ever feels off-style, recall the safeguard section at the top — some queries in gated domains are answered by Opus 4.8 by design, and you aren't billed at Fable prices for those.
5. Final checklist
• Key stored in a chmod 600 secrets file; never pasted into a committed file.
• Key also present in the gateway's systemd drop-in — this is what actually makes it work.
• Fable 5 registered under agents.defaults.models and set as primary.
• openclaw config validate passes; gateway restarted after every config change.
• A monthly spend cap set on whichever account you billed against.
• (Path B) plugins.allow set so no plugin auto-loads silently.
The one thing people miss: your key working in the terminal does not mean the gateway has it. The systemd drop-in step (§2.3 / §3.3) is what makes Fable 5 actually respond. If you hit a 401 with a key you know is valid, that's almost always the reason.
FAQ
Is Claude Fable 5 available through OpenAI-compatible APIs?
Not from Anthropic directly — Anthropic serves it via the Claude API as claude-fable-5. To reach it through an OpenAI-compatible endpoint, use a router such as OrcaRouter, where the ref is orcarouter/anthropic/claude-fable-5 (Path B above).
Why did my Fable 5 request return a different model?
Fable 5 includes safeguards for cybersecurity and biology. Queries flagged in those domains are automatically routed to Claude Opus 4.8, and you are not charged Fable prices for rerouted requests. See Anthropic's explanation.
How much does Claude Fable 5 cost per million tokens?
$10 per million input tokens and $50 per million output tokens, with a 90% input-token discount for prompt caching (Anthropic). Through a router, check the live rate on the model page.
Why does OpenClaw say my model is “not allowed for agent”?
OpenClaw enforces a per-agent model allow-list. Register the ref under agents.defaults.models before selecting it (§3.4) — and watch out for the version-dot parsing gotcha if the ref contains a dot.
🦞 Give your lobster a Mythos-class brain.
