Repository Public
1---2title: Migrating to Claude Mythos 5 and Claude Fable 53url: https://platform.claude.com/docs/en/models/fable-5/migration-guide4description: "Migrate to Claude Mythos 5 and Claude Fable 5 from Claude Mythos Preview, Claude Opus 5, or Claude Opus 4.8: model IDs, API changes, and migration checklists."5---67<Note>8 This guide covers migrating [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) code. If you use [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview), no changes beyond updating the model name are required.9</Note>1011<Tip>12 **Automate your migration with the Claude API skill.** In Claude Code, run `/claude-api migrate` to invoke the bundled [Claude API skill](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/claude-api-skill#migrating-to-a-newer-claude-model). It works for any current Claude model as the target:1314 ```text wrap15 /claude-api migrate this project to claude-fable-516 ```1718 The skill applies the model ID swap and, as needed, breaking parameter changes, prefill replacement, and effort calibration for your target model across your code base, then produces a checklist of items to verify manually. It asks you to confirm the migration scope (entire working directory, a subdirectory, or a specific file list) before editing any files. The skill also detects Amazon Bedrock and Claude Platform on AWS clients and adjusts model ID formats and feature changes for those platforms.19</Tip>2021[Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5/introducing-claude-fable-5-and-claude-mythos-5) is built for demanding reasoning and long-horizon agentic work. [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide) builds on it. Claude Fable 5 is available on the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). [Claude Mythos 5](https://anthropic.com/glasswing) shares the same capabilities and is offered only to approved customers in Project Glasswing.2223The baseline settings shared by `claude-fable-5` and `claude-mythos-5`:2425* **Thinking:** [Adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) is always on. The model determines when and how much to think on each request, and no `thinking` configuration is required. Both `thinking: {type: "disabled"}` and manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) return a 400 error.26* **Prefill:** Prefilling the assistant message returns a 400 error. Use system prompt instructions instead.27* **Context window and output:** A [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default, and up to 128k output tokens per request.28* **Pricing:** $10 USD per million input tokens and $50 USD per million output tokens. See [Claude pricing](https://platform.claude.com/docs/en/about-claude/pricing).29* **Data retention:** Both models require 30-day data retention and are not available under zero data retention (ZDR) arrangements unless expressly authorized by Anthropic. Both are designated Covered Models. On the Claude API, a request to Claude Fable 5 from an organization whose data retention configuration does not meet this requirement returns a 400 `invalid_request_error`. Organizations with a ZDR arrangement should contact their Anthropic account team to discuss data retention configuration, or configure data retention per workspace. See [Model-specific data retention requirements](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements) for per-platform details.3031Where the two models diverge:3233* **Availability:** Claude Fable 5 does not require access approval. Claude Mythos 5 is available only to approved customers in [Project Glasswing](https://anthropic.com/glasswing).34* **Safety classifiers:** Claude Fable 5 runs safety classifiers that can decline requests with `stop_reason: "refusal"`. Claude Mythos 5 does not include these classifiers. See [Refusals and fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback).35* **Priority Tier:** [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models) is supported on Claude Fable 5 but not on Claude Mythos 5.3637## Migrating to Claude Mythos 5 and Claude Fable 5 from Claude Mythos Preview3839[Claude Mythos 5](https://anthropic.com/glasswing) is the access-gated successor to [Claude Mythos Preview](https://anthropic.com/glasswing), the invitation-only research preview. [Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5/introducing-claude-fable-5-and-claude-mythos-5) offers the same capabilities and does not require access approval. The changes in this section apply equally to both targets.4041Migration is mostly drop-in. Claude Mythos 5 and Claude Fable 5 use the same [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) and the same [tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) patterns as Claude Mythos Preview, and token counts are roughly unchanged because all three models use the same tokenizer. The key changes to check are the features that are no longer available (listed in the next section) and thinking output. If you migrate to Claude Fable 5, also plan for safety classifier refusals, which Claude Mythos Preview and Claude Mythos 5 do not have; see [Refusals and fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback).4243For the Claude Mythos Preview retirement timeline, see [Model deprecations](https://platform.claude.com/docs/en/about-claude/model-deprecations).4445### Update your model name4647```python48model = "claude-mythos-preview" # Before49model = "claude-mythos-5" # After5051# Or, for the model with the same capabilities and no access approval requirement:52model = "claude-fable-5" # After53```5455### Features not available on Claude Mythos 5 and Claude Fable 556571. **Extended thinking and thinking token budgets:** Manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) is not supported on `claude-mythos-5` or `claude-fable-5` and returns a 400 error. [Adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) is always on: the model determines when and how much to think on each request, and no `thinking` configuration is required. `thinking: {type: "disabled"}` returns an error. `budget_tokens` has no direct replacement: thinking is adaptive, and the [effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort) is a separate output-level control, not a thinking budget.5859 Before (Claude Mythos Preview):6061 <CodeGroup>62 ```bash cURL63 curl https://api.anthropic.com/v1/messages \64 -H "x-api-key: $ANTHROPIC_API_KEY" \65 -H "anthropic-version: 2023-06-01" \66 -H "content-type: application/json" \67 -d '{68 "model": "claude-mythos-preview",69 "max_tokens": 16000,70 "thinking": {71 "type": "enabled",72 "budget_tokens": 1000073 },74 "messages": [75 {76 "role": "user",77 "content": "..."78 }79 ]80 }'81 ```8283 ```bash CLI84 ant messages create <<'YAML'85 model: claude-mythos-preview86 max_tokens: 1600087 thinking:88 type: enabled89 budget_tokens: 1000090 messages:91 - role: user92 content: "..."93 YAML94 ```9596 ```python Python97 client.messages.create(98 model="claude-mythos-preview",99 max_tokens=16000,100 thinking={"type": "enabled", "budget_tokens": 10000},101 messages=[{"role": "user", "content": "..."}],102 )103 ```104105 ```typescript TypeScript106 await client.messages.create({107 model: "claude-mythos-preview",108 max_tokens: 16000,109 thinking: { type: "enabled", budget_tokens: 10000 },110 messages: [{ role: "user", content: "..." }]111 });112 ```113114 ```csharp C#115 using Anthropic;116 using Anthropic.Models.Messages;117118 AnthropicClient client = new();119120 var parameters = new MessageCreateParams121 {122 Model = "claude-mythos-preview",123 MaxTokens = 16000,124 Thinking = new ThinkingConfigEnabled(budgetTokens: 10000),125 Messages = [new() { Role = Role.User, Content = "..." }]126 };127128 var response = await client.Messages.Create(parameters);129 Console.WriteLine(response);130 ```131132 ```go Go133 client := anthropic.NewClient()134135 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{136 Model: "claude-mythos-preview",137 MaxTokens: 16000,138 Thinking: anthropic.ThinkingConfigParamOfEnabled(10000),139 Messages: []anthropic.MessageParam{140 anthropic.NewUserMessage(anthropic.NewTextBlock("...")),141 },142 })143 if err != nil {144 log.Fatal(err)145 }146 fmt.Println(response)147 ```148149 ```java Java150 AnthropicClient client = AnthropicOkHttpClient.fromEnv();151152 MessageCreateParams params = MessageCreateParams.builder()153 .model("claude-mythos-preview")154 .maxTokens(16000L)155 .enabledThinking(10000L)156 .addUserMessage("...")157 .build();158159 Message response = client.messages().create(params);160 IO.println(response);161 ```162163 ```php PHP164 $client = new Client();165166 $message = $client->messages->create(167 maxTokens: 16000,168 messages: [['role' => 'user', 'content' => '...']],169 model: 'claude-mythos-preview',170 thinking: ['type' => 'enabled', 'budget_tokens' => 10000],171 );172 ```173174 ```ruby Ruby175 client = Anthropic::Client.new176177 message = client.messages.create(178 model: "claude-mythos-preview",179 max_tokens: 16000,180 thinking: {181 type: "enabled",182 budget_tokens: 10000183 },184 messages: [185 { role: "user", content: "..." }186 ]187 )188 ```189 </CodeGroup>190191 After (Claude Mythos 5):192193 <CodeGroup>194 ```bash cURL195 curl https://api.anthropic.com/v1/messages \196 -H "x-api-key: $ANTHROPIC_API_KEY" \197 -H "anthropic-version: 2023-06-01" \198 -H "content-type: application/json" \199 -d '{200 "model": "claude-mythos-5",201 "max_tokens": 16000,202 "messages": [203 {204 "role": "user",205 "content": "..."206 }207 ]208 }'209 ```210211 ```bash CLI212 ant messages create <<'YAML'213 model: claude-mythos-5214 max_tokens: 16000215 messages:216 - role: user217 content: "..."218 YAML219 ```220221 ```python Python222 client.messages.create(223 model="claude-mythos-5",224 max_tokens=16000,225 messages=[{"role": "user", "content": "..."}],226 )227 ```228229 ```typescript TypeScript230 await client.messages.create({231 model: "claude-mythos-5",232 max_tokens: 16000,233 messages: [{ role: "user", content: "..." }]234 });235 ```236237 ```csharp C#238 using Anthropic;239 using Anthropic.Models.Messages;240241 AnthropicClient client = new();242243 var parameters = new MessageCreateParams244 {245 Model = "claude-mythos-5",246 MaxTokens = 16000,247 Messages = [new() { Role = Role.User, Content = "..." }]248 };249250 var response = await client.Messages.Create(parameters);251 Console.WriteLine(response);252 ```253254 ```go Go255 client := anthropic.NewClient()256257 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{258 Model: "claude-mythos-5",259 MaxTokens: 16000,260 Messages: []anthropic.MessageParam{261 anthropic.NewUserMessage(anthropic.NewTextBlock("...")),262 },263 })264 if err != nil {265 log.Fatal(err)266 }267 fmt.Println(response)268 ```269270 ```java Java271 AnthropicClient client = AnthropicOkHttpClient.fromEnv();272273 MessageCreateParams params = MessageCreateParams.builder()274 .model("claude-mythos-5")275 .maxTokens(16000L)276 .addUserMessage("...")277 .build();278279 Message response = client.messages().create(params);280 IO.println(response);281 ```282283 ```php PHP284 $client = new Client();285286 $message = $client->messages->create(287 maxTokens: 16000,288 messages: [['role' => 'user', 'content' => '...']],289 model: 'claude-mythos-5',290 );291 ```292293 ```ruby Ruby294 client = Anthropic::Client.new295296 message = client.messages.create(297 model: "claude-mythos-5",298 max_tokens: 16000,299 messages: [300 { role: "user", content: "..." }301 ]302 )303 ```304 </CodeGroup>305306 The change for Claude Fable 5 is identical, with `claude-fable-5` as the model name.3073082. **Assistant prefill:** Prefilling the assistant message is not supported on `claude-mythos-5` or `claude-fable-5` and returns a 400 error, the same as on Claude Mythos Preview. Use system prompt instructions instead.3093103. **Thinking output:** On `claude-mythos-5` and `claude-fable-5`, the raw chain of thought is never returned, but thinking blocks still carry readable summarized text when `thinking.display` is set to `summarized`. Pass thinking blocks back unchanged when continuing a conversation on the same model. See [Thinking output on Claude Fable and Claude Mythos models](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5).311312### Token counting and billing313314`claude-mythos-5` and `claude-fable-5` use the same tokenizer as `claude-mythos-preview` (the tokenizer introduced with Claude Opus 4.7). Token counts are roughly unchanged when migrating from `claude-mythos-preview`. Compared with models before Claude Opus 4.7, the same content can tokenize to roughly 30% more tokens, varying by content and workload shape.315316[`/v1/messages/count_tokens`](https://platform.claude.com/docs/en/build-with-claude/token-counting) returns roughly unchanged values for `claude-mythos-5` and `claude-fable-5` compared with `claude-mythos-preview`. Re-baseline cost and latency on your own workloads.317318### Migration checklist319320* Update the model name from `claude-mythos-preview` to `claude-mythos-5`, or to `claude-fable-5`, which offers the same capabilities and does not require access approval.321* Remove manual extended thinking configuration (`thinking: {type: "enabled", budget_tokens: N}`). Adaptive thinking is always on, and no `thinking` field is required.322* Remove any `thinking: {type: "disabled"}` configuration. Disabling thinking returns an error on `claude-mythos-5` and `claude-fable-5`.323* Remove `budget_tokens`. It has no direct replacement: thinking is adaptive, and the `effort` parameter is a separate output-level control, not a thinking budget.324* Verify any code that parses the `thinking` field treats it as display text only and passes thinking blocks back unchanged when continuing on the same model. `thinking.display` defaults to `"omitted"` on `claude-mythos-5` and `claude-fable-5`, the same as on Claude Mythos Preview. Set `display: "summarized"` to receive readable summaries. See [Thinking output on Claude Fable and Claude Mythos models](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5).325* If you replay conversation history on an earlier model, strip `thinking` and `redacted_thinking` blocks from prior assistant turns first. Thinking blocks from `claude-fable-5` and `claude-mythos-5` are readable only by the model that produced them or a newer one: earlier models silently ignore them, while Claude Fable 5.1 and Claude Mythos 5.1 read them, so keep them when you move a conversation up to those models (see [Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models)). Stripping keeps requests to earlier models minimal and uniform.326* If you migrate to Claude Fable 5, handle `stop_reason: "refusal"` and read the `stop_details.category` field. Claude Fable 5 runs safety classifiers that Claude Mythos Preview and Claude Mythos 5 do not have. See [Refusals and fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback).327* Re-baseline token counts and costs on your own workloads. Token counts are roughly unchanged when migrating from `claude-mythos-preview`.328329## Migrating to Claude Mythos 5 and Claude Fable 5 from Claude Opus 5330331Claude Fable 5 and Claude Mythos 5 use the same [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) and the same [tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) patterns as Claude Opus 5, with the same [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default and the same [128k max output tokens](https://platform.claude.com/docs/en/models/overview). The prefill and sampling-parameter restrictions, and the thinking display behavior, carry over from Claude Opus 5 unchanged. The changes to check are always-on thinking, pricing, Priority Tier, and data retention.332333### Update your model name334335```python336model = "claude-opus-5" # Before337model = "claude-fable-5" # After338339# Or, for the Project Glasswing model with the same capabilities:340model = "claude-mythos-5" # After341```342343### What changed3443451. **Thinking can no longer be disabled:** On Claude Opus 5, thinking is on by default and can be turned off with `thinking: {type: "disabled"}` at an [effort](https://platform.claude.com/docs/en/build-with-claude/effort) level of `high` or below. On `claude-fable-5` and `claude-mythos-5`, [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) is always on, and `thinking: {type: "disabled"}` returns a 400 error at any effort level. Remove the `thinking: {type: "disabled"}` configuration and use lower effort levels to control token spend instead.346347 If your Claude Opus 5 requests disabled thinking, the response shape changes: a response can begin with one or more `thinking` blocks before the first `text` block, returned with an empty `thinking` field at the default `display: "omitted"` (the same default as Claude Opus 5). Code that reads the reply by position, such as `content[0].text` or a stream handler that treats the first content block as text, must select content blocks by their `type` field instead, and tool-use loops must pass `thinking` blocks back complete and unmodified with their tool results. The API rejects edited, reordered, or partially dropped thinking blocks with a 400 error (see [Preserving thinking blocks](https://platform.claude.com/docs/en/build-with-claude/thinking#preserving-thinking-blocks)). Thinking tokens are billed as output tokens even when the thinking text is not returned.3483492. **Pricing:** Claude Fable 5 and Claude Mythos 5 are priced at $10 USD per million input tokens and $50 USD per million output tokens, compared with $5 USD and $25 USD for Claude Opus 5. See [Claude pricing](https://platform.claude.com/docs/en/about-claude/pricing).3503513. **Priority Tier:** [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models) is not supported on Claude Opus 5, so no existing traffic is affected. If your organization has a Priority Tier commitment, Claude Fable 5 supports it; Claude Mythos 5 does not.3523534. **Data retention:** Claude Fable 5 and Claude Mythos 5 require 30-day data retention and are not available under zero data retention (ZDR) arrangements unless expressly authorized by Anthropic. Both are designated Covered Models. See [Model-specific data retention requirements](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements).354355### Migration checklist356357* Update the model name from `claude-opus-5` to `claude-fable-5` (or `claude-mythos-5`).358* Remove any `thinking: {type: "disabled"}` configuration; it returns a 400 error on `claude-fable-5` and `claude-mythos-5`. Use lower [effort](https://platform.claude.com/docs/en/build-with-claude/effort) levels to control token spend instead, and revisit `max_tokens` for workloads that ran with thinking disabled on Claude Opus 5.359* If those workloads read content by position, such as `content[0].text`, update them to select content blocks by `type`: `thinking` blocks now arrive before `text` blocks. Pass `thinking` blocks back complete and unmodified in tool-use loops; modified blocks return a 400 error.360* If your organization has a zero data retention (ZDR) arrangement, confirm eligibility before migrating: these models are not available under ZDR unless expressly authorized by Anthropic. See [Model-specific data retention requirements](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements).361* Re-baseline cost on your own workloads. Token counts are roughly unchanged; per-token pricing differs, and workloads that ran with thinking disabled now produce thinking tokens, which are billed as output tokens.362363## Migrating to Claude Mythos 5 and Claude Fable 5 from Claude Opus 4.8364365<Note>366 If your code is on Claude Opus 4.7 or earlier, first apply the relevant [Migrating to Claude Opus 5](https://platform.claude.com/docs/en/models/opus-5/migration-guide) from-section for the API-level changes from your current model, then the remaining delta in this section.367</Note>368369Migration is mostly drop-in. Claude Fable 5 and Claude Mythos 5 use the same [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) and the same [tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) patterns as Claude Opus 4.8, with the same [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default and the same [128k max output tokens](https://platform.claude.com/docs/en/models/overview). Token counts are roughly unchanged because the models use the same tokenizer. The key changes to check are always-on [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking), thinking output, safety classifier refusals (Claude Fable 5 only), and pricing.370371### Update your model name372373```python374model = "claude-opus-4-8" # Before375model = "claude-fable-5" # After376377# Or, for the Project Glasswing model with the same capabilities:378model = "claude-mythos-5" # After379```380381### What changed382383The items in this section describe the API and behavior differences worth checking after you swap the model ID. Except where noted, they apply equally to `claude-fable-5` and `claude-mythos-5`.3843851. **Adaptive thinking is always on:** [Adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) is the only thinking mode on `claude-fable-5` and `claude-mythos-5`. The model determines when and how much to think on each request, and no `thinking` configuration is required. `thinking: {type: "disabled"}` returns an error. Use the [effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort) to control thinking depth.386387 The behavior change to check: on Claude Opus 4.8, requests without a `thinking` field run without thinking; on `claude-fable-5` and `claude-mythos-5`, those same requests run with adaptive thinking. `max_tokens` remains a hard limit on total output, thinking plus response text, so revisit it for workloads that ran without thinking on Claude Opus 4.8. See [Cost control](https://platform.claude.com/docs/en/build-with-claude/thinking-steering-and-cost#cost-control). Responses can also begin with one or more `thinking` blocks before the first `text` block, so code that reads the reply by position (for example, `content[0].text`, or a stream handler that treats the first content block as text) must select content blocks by their `type` field instead. Thinking tokens are billed as output tokens even when the thinking text is not returned to you, so a workload that ran without thinking on Claude Opus 4.8 produces more output tokens per request, in addition to the per-token price difference.388389 If you run a tool-use loop, pass the `thinking` blocks from each assistant response back to the API complete and unmodified when you return tool results, including blocks whose `thinking` field is empty. Echo the assistant message as received rather than filtering its content blocks by type or rebuilding it: the API rejects edited, reordered, or partially dropped thinking blocks with a 400 error. See [Preserving thinking blocks](https://platform.claude.com/docs/en/build-with-claude/thinking#preserving-thinking-blocks).390391 Before (Claude Opus 4.8):392393 <CodeGroup>394 ```bash cURL395 curl https://api.anthropic.com/v1/messages \396 -H "x-api-key: $ANTHROPIC_API_KEY" \397 -H "anthropic-version: 2023-06-01" \398 -H "content-type: application/json" \399 -d '{400 "model": "claude-opus-4-8",401 "max_tokens": 16000,402 "thinking": {403 "type": "adaptive"404 },405 "output_config": {406 "effort": "high"407 },408 "messages": [409 {410 "role": "user",411 "content": "..."412 }413 ]414 }'415 ```416417 ```bash CLI418 ant messages create <<'YAML'419 model: claude-opus-4-8420 max_tokens: 16000421 thinking:422 type: adaptive423 output_config:424 effort: high425 messages:426 - role: user427 content: "..."428 YAML429 ```430431 ```python Python432 client.messages.create(433 model="claude-opus-4-8",434 max_tokens=16000,435 thinking={"type": "adaptive"},436 output_config={"effort": "high"},437 messages=[{"role": "user", "content": "..."}],438 )439 ```440441 ```typescript TypeScript442 await client.messages.create({443 model: "claude-opus-4-8",444 max_tokens: 16000,445 thinking: { type: "adaptive" },446 output_config: { effort: "high" },447 messages: [{ role: "user", content: "..." }]448 });449 ```450451 ```csharp C#452 using Anthropic;453 using Anthropic.Models.Messages;454455 AnthropicClient client = new();456457 var parameters = new MessageCreateParams458 {459 Model = "claude-opus-4-8",460 MaxTokens = 16000,461 Thinking = new ThinkingConfigAdaptive(),462 OutputConfig = new OutputConfig { Effort = Effort.High },463 Messages = [new() { Role = Role.User, Content = "..." }]464 };465466 var response = await client.Messages.Create(parameters);467 Console.WriteLine(response);468 ```469470 ```go Go471 client := anthropic.NewClient()472473 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{474 Model: "claude-opus-4-8",475 MaxTokens: 16000,476 Thinking: anthropic.ThinkingConfigParamUnion{477 OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{},478 },479 OutputConfig: anthropic.OutputConfigParam{480 Effort: anthropic.OutputConfigEffortHigh,481 },482 Messages: []anthropic.MessageParam{483 anthropic.NewUserMessage(anthropic.NewTextBlock("...")),484 },485 })486 if err != nil {487 log.Fatal(err)488 }489 fmt.Println(response)490 ```491492 ```java Java493 AnthropicClient client = AnthropicOkHttpClient.fromEnv();494495 MessageCreateParams params = MessageCreateParams.builder()496 .model("claude-opus-4-8")497 .maxTokens(16000L)498 .thinking(ThinkingConfigAdaptive.builder().build())499 .outputConfig(OutputConfig.builder()500 .effort(OutputConfig.Effort.HIGH)501 .build())502 .addUserMessage("...")503 .build();504505 Message response = client.messages().create(params);506 IO.println(response);507 ```508509 ```php PHP510 $client = new Client();511512 $message = $client->messages->create(513 maxTokens: 16000,514 messages: [['role' => 'user', 'content' => '...']],515 model: 'claude-opus-4-8',516 thinking: ['type' => 'adaptive'],517 outputConfig: ['effort' => 'high'],518 );519 ```520521 ```ruby Ruby522 client = Anthropic::Client.new523524 message = client.messages.create(525 model: "claude-opus-4-8",526 max_tokens: 16000,527 thinking: {528 type: "adaptive"529 },530 output_config: {531 effort: "high"532 },533 messages: [534 { role: "user", content: "..." }535 ]536 )537 ```538 </CodeGroup>539540 After (Claude Fable 5):541542 <CodeGroup>543 ```bash cURL544 curl https://api.anthropic.com/v1/messages \545 -H "x-api-key: $ANTHROPIC_API_KEY" \546 -H "anthropic-version: 2023-06-01" \547 -H "content-type: application/json" \548 -d '{549 "model": "claude-fable-5",550 "max_tokens": 16000,551 "output_config": {552 "effort": "high"553 },554 "messages": [555 {556 "role": "user",557 "content": "..."558 }559 ]560 }'561 ```562563 ```bash CLI564 ant messages create <<'YAML'565 model: claude-fable-5566 max_tokens: 16000567 output_config:568 effort: high569 messages:570 - role: user571 content: "..."572 YAML573 ```574575 ```python Python576 client.messages.create(577 model="claude-fable-5",578 max_tokens=16000,579 output_config={"effort": "high"},580 messages=[{"role": "user", "content": "..."}],581 )582 ```583584 ```typescript TypeScript585 await client.messages.create({586 model: "claude-fable-5",587 max_tokens: 16000,588 output_config: { effort: "high" },589 messages: [{ role: "user", content: "..." }]590 });591 ```592593 ```csharp C#594 using Anthropic;595 using Anthropic.Models.Messages;596597 AnthropicClient client = new();598599 var parameters = new MessageCreateParams600 {601 Model = "claude-fable-5",602 MaxTokens = 16000,603 OutputConfig = new OutputConfig { Effort = Effort.High },604 Messages = [new() { Role = Role.User, Content = "..." }]605 };606607 var response = await client.Messages.Create(parameters);608 Console.WriteLine(response);609 ```610611 ```go Go612 client := anthropic.NewClient()613614 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{615 Model: "claude-fable-5",616 MaxTokens: 16000,617 OutputConfig: anthropic.OutputConfigParam{618 Effort: anthropic.OutputConfigEffortHigh,619 },620 Messages: []anthropic.MessageParam{621 anthropic.NewUserMessage(anthropic.NewTextBlock("...")),622 },623 })624 if err != nil {625 log.Fatal(err)626 }627 fmt.Println(response)628 ```629630 ```java Java631 AnthropicClient client = AnthropicOkHttpClient.fromEnv();632633 MessageCreateParams params = MessageCreateParams.builder()634 .model("claude-fable-5")635 .maxTokens(16000L)636 .outputConfig(OutputConfig.builder()637 .effort(OutputConfig.Effort.HIGH)638 .build())639 .addUserMessage("...")640 .build();641642 Message response = client.messages().create(params);643 IO.println(response);644 ```645646 ```php PHP647 $client = new Client();648649 $message = $client->messages->create(650 maxTokens: 16000,651 messages: [['role' => 'user', 'content' => '...']],652 model: 'claude-fable-5',653 outputConfig: ['effort' => 'high'],654 );655 ```656657 ```ruby Ruby658 client = Anthropic::Client.new659660 message = client.messages.create(661 model: "claude-fable-5",662 max_tokens: 16000,663 output_config: {664 effort: "high"665 },666 messages: [667 { role: "user", content: "..." }668 ]669 )670 ```671 </CodeGroup>672673 The change for Claude Mythos 5 is identical, with `claude-mythos-5` as the model name.6746752. **Extended thinking and thinking budgets (unchanged):** Manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) is not supported on `claude-fable-5` or `claude-mythos-5` and returns a 400 error, the same as on Claude Opus 4.8. `budget_tokens` has no direct replacement: thinking is adaptive, and the [effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort) is a separate output-level control, not a thinking budget.6766773. **Assistant prefill (unchanged):** Prefilling the assistant message is not supported on `claude-fable-5` or `claude-mythos-5` and returns a 400 error, the same as on Claude Opus 4.8. Use system prompt instructions instead.6786794. **Thinking output:** On `claude-fable-5` and `claude-mythos-5`, the raw chain of thought is never returned, but thinking blocks still carry readable summarized text when `thinking.display` is set to `summarized`. Pass thinking blocks back unchanged when continuing a conversation on the same model. See [Thinking output on Claude Fable and Claude Mythos models](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5).6806815. **Safety classifiers and the `refusal` stop reason (Claude Fable 5 only):** `claude-fable-5` runs safety classifiers on requests and during response generation. Claude Mythos 5 does not include these classifiers. When a classifier declines a request, the Messages API returns `stop_reason: "refusal"` as a successful HTTP 200 response, not an error. The `stop_details.category` field reports which classifier fired, with categories such as `"cyber"`, `"bio"`, and `"reasoning_extraction"`, or `null` when the refusal maps to no named category. See the [refusal category table](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#refusal-response) for the full set.682683 You are not billed for the input tokens of a request refused before any output is generated. When a classifier fires mid-stream, the input and already-streamed output are billed; discard the partial output.684685 To re-run refused requests on another model automatically, pass the opt-in `fallbacks` parameter, which is in beta on the Claude API. The parameter is not available on the Message Batches API or on Amazon Bedrock, Google Cloud, and Microsoft Foundry; on those three platforms, run the retry client-side or use the SDK refusal-fallback middleware. See [Refusals and fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback).6866876. **Start at `high` effort:** The [effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort) default remains `high`. On Claude Opus 4.8, the recommendation for coding and high-autonomy work is to set `xhigh` explicitly. On `claude-fable-5` and `claude-mythos-5`, use `high` as the default for most tasks and reserve `xhigh` for the most capability-sensitive workloads. Lower effort settings still perform well and often exceed `xhigh` performance on prior models. Reduce effort if a task completes but takes longer than necessary. See [Prompting Claude Fable 5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5#consider-all-effort-levels).6886897. **Lower prompt caching minimum:** The minimum cacheable prompt length on `claude-fable-5` and `claude-mythos-5` is 512 tokens, lower than the 1,024 tokens on Claude Opus 4.8. Prompts that were too short to cache on Claude Opus 4.8 can now create cache entries, with no code changes required. See [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#cache-limitations) for per-model minimums.690691### Migration checklist692693* If your organization has a zero data retention (ZDR) arrangement, confirm eligibility before migrating. `claude-fable-5` and `claude-mythos-5` require 30-day data retention and are not available under ZDR unless expressly authorized by Anthropic. On the Claude API, requests to `claude-fable-5` that don't meet this requirement return a 400 `invalid_request_error`. Claude Opus 4.8 is available under ZDR. See [Model-specific data retention requirements](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements).694* Update the model name from `claude-opus-4-8` to `claude-fable-5` (or `claude-mythos-5`).695* Remove any `thinking: {type: "disabled"}` configuration. Disabling thinking returns an error on `claude-fable-5` and `claude-mythos-5`, and requests without a `thinking` field run with adaptive thinking.696* Update response parsing that reads content by position, such as `content[0].text`: with adaptive thinking always on, `thinking` blocks arrive before `text` blocks. Select content blocks by `type` instead, and pass `thinking` blocks back complete and unmodified in tool-use loops; modified blocks return a 400 error. See [Preserving thinking blocks](https://platform.claude.com/docs/en/build-with-claude/thinking#preserving-thinking-blocks).697* If you removed manual extended thinking and assistant prefills during earlier migrations, no action is needed: both remain unsupported on `claude-fable-5` and `claude-mythos-5`.698* Verify any code that parses the `thinking` field treats it as display text only and passes thinking blocks back unchanged when continuing on the same model. `thinking.display` defaults to `"omitted"` on `claude-fable-5` and `claude-mythos-5`, the same as on Claude Opus 4.8. Set `display: "summarized"` to receive readable summaries. See [Thinking output on Claude Fable and Claude Mythos models](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5).699* If you replay conversation history on an earlier model, strip `thinking` and `redacted_thinking` blocks from prior assistant turns first. Thinking blocks from `claude-fable-5` and `claude-mythos-5` are readable only by the model that produced them or a newer one: earlier models silently ignore them, while Claude Fable 5.1 and Claude Mythos 5.1 read them, so keep them when you move a conversation up to those models (see [Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models)). Stripping keeps requests to earlier models minimal and uniform. The exception is redeeming a [fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit), which requires the request body echoed under that feature's exact rules.700* If you migrate to Claude Fable 5, handle `stop_reason: "refusal"` and read the `stop_details.category` field. To re-run refused requests on another model automatically, consider the opt-in `fallbacks` parameter (beta). See [Refusals and fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback).701* Re-evaluate your `effort` setting. Start at `high` for most tasks, including workloads that ran at `xhigh` on Claude Opus 4.8.702* Re-baseline cost and latency on your own workloads. Token counts are roughly unchanged when migrating from `claude-opus-4-8`; per-token pricing differs, and thinking tokens are billed as output tokens, so workloads that ran without thinking produce more output tokens per request.703