Skip to main content

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: set model_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 SequentialWorkflow research pipeline
  • A ConcurrentWorkflow fan-out across specialist agents
  • A HierarchicalSwarm with an auto-generated director
  • A GroupChat debate 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.
claude-fable-5 is a premium-only model. A free-tier API key that requests it gets back a 403 with "error": "Premium model access required" and a list of suggested_alternatives (claude-sonnet-5, gpt-5.5, gemini-3.5-flash). Upgrade at https://swarms.world/platform/account, or use claude-sonnet-5 — the free-tier default model — if you don’t have a premium subscription.
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

  1. Visit https://swarms.world/platform/api-keys
  2. Sign in or create an account
  3. Generate a new API key
  4. 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.
What changed from a typical agent call:

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 is MixtureOfAgents 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 same model_name. Drop "model_name": "claude-fable-5" into any agent inside any of these swarm configs:
  • SequentialWorkflow
  • ConcurrentWorkflow
  • AgentRearrange
  • MixtureOfAgents
  • GroupChat
  • MajorityVoting
  • CouncilAsAJudge
  • MultiAgentRouter
  • HeavySwarm
  • LLMCouncil
  • DebateWithJudge
  • RoundRobin
  • PlannerWorkerSwarm

Common Pitfalls

You called claude-fable-5 from a free-tier API key. The response is a 403 with "error": "Premium model access required" and a suggested_alternatives list. Either upgrade at https://swarms.world/platform/account or switch model_name to a free-tier model such as claude-sonnet-5.
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.
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