Overview
This tutorial shows how to run Claude Fable 5 — Anthropic’s most capable model, positioned above the Opus family — on the Swarms API. Fable 5 is built for the hardest reasoning and long-horizon agentic work: multi-step analysis, deep synthesis, and debates where agents must genuinely engage with each other’s arguments. Using it requires one thing in your agent config: setmodel_name to claude-fable-5. Everything else about your existing agents and swarms stays the same. The examples below walk through the full range of agent types — a standalone single agent, a sequential pipeline, a concurrent specialist fan-out, a director-led hierarchical swarm, a multi-agent group chat, and a cost-efficient mixed-model pattern that reserves Fable 5 for the synthesis step.
What This Example Shows
- The correct model name to use (
claude-fable-5) - Why this is a premium-only model, and the free-tier alternative
- A single agent on Claude Fable 5
- A
SequentialWorkflowresearch pipeline - A
ConcurrentWorkflowfan-out across specialist agents - A
HierarchicalSwarmwith an auto-generated director - A
GroupChatdebate between opposing analysts - A mixed-model pattern: Fable 5 as the aggregator, cheaper models as workers
Claude Fable 5 is one of the Swarms API’s premium frontier models. It is built for the hardest reasoning and long-horizon agentic work, and it is wired into every multi-agent primitive on the Swarms platform. Switching an existing agent to Fable 5 is a one-line change in your agent config.
The examples below set
"temperature": None, which is always safe: the Swarms API only forwards a temperature value upstream when you set one, and the provider applies its own default otherwise. Leaving the field out entirely has the same effect.Step 1: Get Your API Key
- Visit https://swarms.world/platform/api-keys
- Sign in or create an account
- Generate a new API key
- Set it as an environment variable:
Step 2: Install the Swarms Python Client
Step 3: Create the Client
Every example below reuses this client:Fable 5 reasons deeply before answering, so individual calls can take noticeably longer than smaller models — especially on hard tasks. Keep the client
timeout generous.Single Agent on Claude Fable 5
The minimal case.SequentialWorkflow: Research → Analysis → Report
Agents run one after another; each receives the previous agent’s output. Fable 5’s long-horizon reasoning makes it a strong fit for every stage of a pipeline like this.ConcurrentWorkflow: Specialist Fan-Out
All agents receive the same task in parallel and answer independently — ideal when you want several expert perspectives at once.HierarchicalSwarm: Director + Workers
You define only the workers — the framework auto-generates a director that decomposes the task, routes subtasks to each worker, and synthesizes the final answer.GroupChat: Opposing Analysts Debate
Agents discuss the task together and can respond to each other’s arguments. Fable 5 is notably strong at pushing back on weak reasoning, which makes debates substantive rather than agreeable.Cost Pattern: Fable 5 Aggregator, Cheaper Workers
Fable 5 reasons at length and spends more tokens than smaller models, so a common production pattern isMixtureOfAgents with lighter workers doing the breadth work and Fable 5 doing the final synthesis, where its reasoning matters most.
Using Fable 5 in Other Swarm Types
Every other swarm architecture takes the samemodel_name. Drop "model_name": "claude-fable-5" into any agent inside any of these swarm configs:
SequentialWorkflowConcurrentWorkflowAgentRearrangeMixtureOfAgentsGroupChatMajorityVotingCouncilAsAJudgeMultiAgentRouterHeavySwarmLLMCouncilDebateWithJudgeRoundRobinPlannerWorkerSwarm
Common Pitfalls
Requests take longer than with other models
Requests take longer than with other models
Reasoning-heavy models generally take longer on hard tasks than smaller, non-reasoning models. Raise your client
timeout, and prefer swarm architectures that parallelize independent work (ConcurrentWorkflow, MixtureOfAgents) over long sequential chains when latency matters.Where do I find pricing?
Where do I find pricing?
The Swarms API bills each model’s tokens at that model’s price plus a 15% service fee. At the time of writing,
claude-fable-5 costs $11.50 per million input tokens and $57.50 per million output tokens, fee included, which is more per token than lighter models — one more reason to keep it on the synthesis step as in the mixed-model pattern above. Look up the current price with GET /v1/models/pricing?model_name=claude-fable-5, and see the pricing page for how billing works.Next Steps
- Browse the Multi-Agent Architectures catalog for more swarm types
- Read the Single Agent Overview for the full agent config surface
- See the Claude Opus 4.8 example for the other premium Anthropic frontier model on the Swarms API
- See Streaming to stream Fable 5 tokens to your client in real time