Claude Fable 5 Token Counter: Count Tokens Before You Send
At $10 per million input tokens, Claude Fable 5 is Anthropic's most expensive API model.
Fable 5 is the first publicly available model from Anthropic's Mythos class, a tier introduced above Opus for tasks that demand the highest level of reasoning and sustained coherence Anthropic currently offers. Like all Claude models, it uses Anthropic's published tokenizer, so the count this tool produces is exact rather than estimated. Fable 5 supports a 1M-token context window at $10.00 per million input tokens and $50.00 per million output tokens, with a maximum output length of 128,000 tokens per response.1
Context window and limits
Fable 5 processes up to 1 million tokens per request, matching the context ceiling of Claude Opus 4.8 and Sonnet 4.6. What sets Fable 5 apart at the context level is its output capacity: up to 128,000 tokens per response. Few competing models reach this ceiling. For tasks that require very long generated documents, detailed step-by-step technical analyses, or extended code outputs in a single call, the 128K output limit is a practical differentiator rather than a theoretical maximum.
When the context bar in this tool turns amber at 75% (750,000 tokens), you have 250,000 tokens of headroom remaining for the model's response and any additional dynamic content. For workloads that may produce responses approaching the 128K output ceiling, treat 700,000 input tokens as your operational threshold. The remaining 300,000 tokens of context accommodates the full output range without risking a context overflow error during response generation.
Pricing breakdown
Input tokens cost $10.00 per million and output tokens cost $50.00 per million, a five-to-one output-to-input ratio identical to Opus 4.8. Every token costs more on Fable 5; none count differently. For the same prompt at the same length, the INPUT $ column in this tool shows precisely twice the Opus 4.8 figure, because Fable 5 is exactly 2x the price of Opus 4.8 on both input and output.
For workloads that generate long outputs, the output premium grows quickly. A 10,000-token response at $50/M costs $0.50 in output alone; the equivalent response on Opus 4.8 costs $0.25. On tasks that routinely produce extended responses such as large code files, technical reports, or multi-chapter analyses, the two-to-one cost difference between models compounds significantly at production volume.2
How Fable 5 prompt caching reduces effective input cost
Fable 5 supports prompt caching at $1.00 per million tokens for cache hits, a 90% reduction from the standard $10/M input rate. For workflows where a large system prompt, reference document, or research context block is reused across many requests, caching dramatically reduces the per-request cost of that repeated content. At $1/M for cache hits, a 100,000-token cached context costs $0.10 per request rather than $1.00. Across 1,000 requests that reuse the same context block, caching saves $900 on that one component alone.3
Tokenizer and accuracy
All Claude models share one tokenizer. Across Fable 5, Opus 4.8, Sonnet 4.6, and Haiku 4.5, Anthropic uses the same published vocabulary, so the token count for any given text is identical regardless of which Claude model you deploy. Running the @anthropic-ai/tokenizer library in your browser, this tool produces the same count the Fable 5 API applies when billing your request, which means you can prototype prompts locally with full confidence that the cost projection will match the actual invoice.
For English prose, plan on approximately 250 tokens per 200 words. Code tokenizes less efficiently than prose: a Python function with type annotations and docstrings typically produces 30 to 50 percent more tokens than prose at an equivalent word count, and dense JSON with nested structures pushes the ratio even higher once indentation and bracket nesting compound. At Fable 5's $10/M input rate, a 20% estimation error on a 100,000-token prompt represents a $0.20 per-request cost variance, and across a production workload processing thousands of requests per day, that variance compounds into a material budget line item that exceeds the cost of implementing exact counting.
For production applications, install the @anthropic-ai/tokenizer npm package and call countTokens(text) from your request handler before each API call. Your pre-call count matches the billing count exactly, giving you accurate cost projections and a reliable context window gate. Wrapping this check in a middleware function that logs the count and rejects requests exceeding your threshold keeps the validation logic centralized and prevents any single service from accidentally shipping an unbounded prompt to the API.
Planning inputs for the 128K output ceiling
At 128,000 output tokens, Fable 5 can deliver the equivalent of a full book chapter, a complete codebase migration plan, or a detailed multi-stage analysis in a single API response. Exploiting this capacity requires that your input leaves enough context headroom for the response. This constraint is stricter with Fable 5 than with models whose output caps at 4,000 or 8,000 tokens.
The ceiling is a capability, not a cost. Output cost on Fable 5 depends on actual response length, not on the maximum allowed. Explicit length constraints in your prompt reduce output token count and therefore output cost, even on a model capable of far longer responses. When your task does not need a 50,000-token output, instruct the model to respond concisely and pay only for the tokens generated.
Setting input token ceilings when output may reach 128K
For workflows that target long Fable 5 outputs, your input budget requires a tighter ceiling than for models with shorter output limits. If a response may reach 80,000 tokens, your input must leave at least 80,000 tokens of context window available after assembly. Set your application's pre-call validation threshold at 700,000 input tokens when targeting extended responses. In this tool, the 70% mark on Fable 5's context bar corresponds to 700,000 input tokens and is a practical visual checkpoint for long-form generation workloads.
When Fable 5 justifies the cost over Opus 4.8
Paste your typical system prompt and a representative user message into this Fable 5 versus Opus 4.8 cost readout, where the Fable 5 INPUT $ figure lands at exactly double the Opus 4.8 figure, the fixed cost of choosing Fable 5 over its cheaper sibling. That difference is consistent across every prompt regardless of content type or length, because the two models use identical tokenization.
For workloads where Opus 4.8 meets your quality bar consistently, such as document summarization, structured extraction, or standard code review, routing to Opus saves 50% on every request without changing anything else in your pipeline. The same prompt structure, the same context layout, the same API call format: only the model identifier and the price change.
Reserve Fable 5 for tasks where evaluation testing reveals a quality gap worth paying for: long-horizon agentic workflows spanning dozens of steps, complex technical migrations across large codebases, deep reasoning over contradictory evidence, or generation workloads that benefit from the 128K output ceiling. For production applications handling heterogeneous task complexity, a routing layer that escalates to Fable 5 only for genuinely hard requests captures the quality benefit at a blended cost well below the full Fable 5 rate.
US government export controls and API access
On June 12, 2026, the US Commerce Department issued an export control directive ordering Anthropic to suspend all access to Fable 5 and Mythos 5 for any foreign national. Because the scope extends to foreign nationals physically inside the United States, including Anthropic's own non-citizen employees, the company disabled Fable 5 and Mythos 5 for all users worldwide to ensure compliance. Access to Claude Opus 4.8, Sonnet 4.6, Haiku 4.5, and all other Claude models was not affected.4
Who the directive affects
The restriction applies to any foreign national, a scope broader than geography alone. US-resident developers without US citizenship fall within the directive's definition, as do non-citizen employees at Anthropic enterprise customers. The government cited a reported jailbreak technique that could unlock Mythos's cybersecurity capabilities through Fable 5's safeguards as the basis for the order. Anthropic disputed the severity of the finding, stating that it had reviewed the specific technique and that comparable capabilities were demonstrably available from other publicly deployed models not subject to similar controls.5
Which Claude models remain available and what to use in the meantime
For developers and organizations that had integrated Fable 5, the nearest unrestricted alternative on the Anthropic platform is Claude Opus 4.8. It shares the same tokenizer and the same 1M-token context window, and costs $5/M input and $25/M output, exactly half the Fable 5 rate. The model string changes from claude-fable-5 to claude-opus-4-8; no other integration changes are required. Anthropic has stated it is working to restore access and believes the directive reflects a misunderstanding, but has not provided a specific timeline for restoration.
Because both models share an identical tokenizer and the same 1M-token context window, the context-bar percentages this tool displays for Fable 5 apply unchanged to Opus 4.8, so you can reuse the same token-budget guardrails without recalculation. Cost projections for Opus 4.8 are simply half the Fable 5 figures, which makes it straightforward to model the savings from routing a workload to the cheaper model before the access directive is lifted.
When to use this
Use this when building prompts for Fable 5 and you need to verify your token count fits within the 1M context window with adequate headroom for extended responses. Paste your prompt and check the Fable 5 row directly; the same view shows Opus 4.8 right beside it so you can confirm the two-to-one cost gap on your own text. You should also use it to compare Fable 5 and Opus 4.8 input costs for the same prompt before committing to a model choice for a complex task.
Examples
Large codebase migration with full repository context
System instructions: 2,000 tokens. Repository context (Python, 3,000 files): 500,000 tokens. Migration task description: 1,500 tokens. Total: ~503,500 tokens.
Context usage: ~50% of the 1M window. Input cost: ~$5.04 at $10/M. Compare to Opus 4.8 for the same prompt: ~$2.52 at $5/M.
Research synthesis across multiple long documents
System prompt: 1,200 tokens. 15 research papers (average 10,000 tokens each): 150,000 tokens. Synthesis instructions: 800 tokens. Total: ~152,000 tokens.
Input cost: ~$1.52. Output (comprehensive analysis, 30,000 tokens): ~$1.50 in output cost. Total: ~$3.02 per request.
- 1.
Anthropic, "Models overview," platform.claude.com, accessed June 2026. https://platform.claude.com/docs/en/about-claude/models/overview
- 2.
Anthropic, "Claude Fable 5," anthropic.com, June 2026. https://www.anthropic.com/claude/fable
- 3.
Anthropic, "Pricing," platform.claude.com, accessed June 2026. https://platform.claude.com/docs/en/about-claude/pricing
- 4.
Anthropic, "Statement on the US government directive to suspend access to Fable 5 and Mythos 5," anthropic.com, June 2026. https://www.anthropic.com/news/fable-mythos-access
- 5.
Jeremy Kahn, "Anthropic disables Fable and Mythos AI models after U.S. government bars it from giving foreigners access," fortune.com, June 13, 2026. https://fortune.com/2026/06/13/anthropic-disables-fable-mythos-export-controls-national-security-threat/