# Refusals and Fallback of Anthropic Models

> Source: <https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback>
> Published: 2026-11-28 09:07:04+00:00

**Key takeaway:** Set fallbacks to "default" with the server-side-fallback-2026-07-01 beta to have the Claude API retry a stop_reason "refusal" response on Anthropic's recommended model for that category, but handle Claude Haiku 5.5 client-side since it has no server-side fallback.

[Messages](https://platform.claude.com/docs/en/intro)Building with Claude

# Refusals and fallback

How Claude Fable models, Claude Opus models, Claude Sonnet 5.5, and Claude Haiku 5.5 return classifier refusals and how to retry refused requests on a fallback model.

Claude Fable 5.2, Claude Fable 5.1, Claude Fable 5, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, and Claude Haiku 5.5 include safety classifiers that can decline a request. When that happens, you receive a normal response, not an error, with `stop_reason: "refusal"`. Its `stop_details.category` names the policy area (see [What a refusal looks like](#refusal-response)). You can usually still get an answer by sending the same request to another Claude model. This page shows you how to recognize a refusal and how to set up that retry.

Read this page when you build on any of these models and want declined requests to fall through to another model automatically. It also applies when you have seen `"refusal"` in a response and want to know what to do next.

Related pages:

- [Stop reasons and fallback](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons) : the full list of`stop_reason` values
- [Fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit) : how to avoid paying the prompt-cache cost twice when you build the retry yourself
- [SDK middleware](https://platform.claude.com/docs/en/cli-sdks-libraries/middleware) : the SDK helper that wraps all of this
- [Fallback and billing recipe](https://platform.claude.com/cookbook/fable-5-fallback-billing-guide) : a worked end-to-end example

The simplest setup, in beta on the Claude API and on [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed): set `fallbacks` to `"default"`, and the API retries a declined request on the fallback model Anthropic recommends for its refusal category. For categories with no recommended fallback, the refusal stands. Claude Haiku 5.5 has no server-side fallback, so for it use [client-side fallback with the SDK middleware](#client-side-fallback) or [write the retry yourself](#manual-retry).

```
client = Anthropic()

response = client.beta.messages.create(
    model="claude-fable-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello, Claude"}],
    fallbacks="default",
    betas=["server-side-fallback-2026-07-01"],
)
print(response.model)
```

The following sections cover what a refusal response contains, when to use server-side or client-side fallback, and how each is billed.

## What a refusal looks like

A refusal is a successful HTTP 200 response with `stop_reason: "refusal"`:

```
{
  "id": "msg_01XFUDYJgAACzvnptvVoYEL",
  "type": "message",
  "role": "assistant",
  "model": "claude-fable-5",
  "content": [],
  "stop_reason": "refusal",
  "stop_details": {
    "type": "refusal",
    "category": "cyber",
    "explanation": "This request was declined because it could enable cyber harm."
  },
  "usage": {
    "input_tokens": 412,
    "output_tokens": 0
  }
}
```

The `stop_details` object explains the decline:

- **`category`:** names the policy area that triggered the classifier.
- **`explanation`:** a human-readable description. The text is not stable, so display it rather than parse it.
- **`recommended_model`:** present only on requests that set` fallbacks` ([server-side fallback](#server-side-fallback) , beta). It names a model to retry directly when the API skipped the fallback attempt (for example, the fallback model was rate limited), and is`null` otherwise. It’s a hint, not a guarantee.
- `category` and`explanation` are both`null` when the refusal does not map to a named category. That`null` is a normal, permanent value, not a placeholder.
- `stop_details` itself is`null` for every stop reason other than`refusal` .

| `category` | What it means | Billed before any output | 
|---|---|---|
| `"cyber"` | The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. | No | 
| `"bio"` | The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. | Yes | 
| `"frontier_llm"` | The request could help with the development of competing AI models, which is restricted under [Anthropic’s commercial terms](https://www.anthropic.com/legal/commercial-terms) . Benign machine learning work can also trigger this category. | Yes | 
| `"reasoning_extraction"` | The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) . See[Keep reasoning in thinking blocks](#keep-reasoning-in-thinking-blocks) . | Yes | 
| `"general_harms"` | The request falls under a usage-policy area outside the four named categories. Benign work can also trigger this category. | No | 

A refusal can arrive before any output, or mid-stream after partial output. In either case, treat any partial output as incomplete and discard it.

### Keep reasoning in thinking blocks

A `reasoning_extraction` refusal usually comes from a prompt that asks the model to put its thinking or reasoning in the output, either verbatim or in a fixed format. Common examples:

- A `<thinking>` ,`<reasoning>` , or scratchpad section that the model fills in before it answers
- A `reasoning` ,`thinking` , or`trace` field in JSON output or in a tool input
- The model’s private notes, or a running log of its reasoning
- Reasoning asked for verbatim or in full

The wording can sit in a system prompt, a skill, or a tool description, so check those too. Earlier assistant turns and examples in the prompt that show reasoning in tags, such as `<thinking>`, might also trigger this refusal.

These models might return this category:

- Claude Fable 5.2, Claude Fable 5.1, and Claude Fable 5
- Claude Mythos 5.2, Claude Mythos 5.1, and Claude Mythos 5
- Claude Opus 5.5 and Claude Opus 5
- Claude Sonnet 5.5
- Claude Haiku 5.5

You can still ask Claude to explain its answer. Ask for a short explanation, the evidence behind a result, or a summary of the actions it took. To see a summary of the model’s reasoning, set `thinking: {"type": "adaptive", "display": "summarized"}` and read the [`thinking` blocks](https://platform.claude.com/docs/en/build-with-claude/thinking#summarized-thinking). This category has no recommended fallback model, so change the prompt rather than retry the request. If a reworded request is still declined, [contact support](https://support.claude.com/en/articles/9015913-how-to-get-support) and include the [request ID](https://platform.claude.com/docs/en/api/errors#request-id).

## How refusals are billed

These billing rules apply on every platform.

**Refusals before any output:** To disrupt attempts to circumvent Anthropic’s safeguards at scale, a refusal that arrives before any output is billed when its `stop_details.category` is `"bio"`, `"frontier_llm"`, or `"reasoning_extraction"`. These are the categories where Anthropic measures low volumes of false positives, as of September 2026. These refusals are billed like any other request, at the rates of the model that ran it. A refusal before any output in any other category, or with a `null` category, is not billed. Either way, `content` is empty and token counts appear in `usage`. The request still counts against your rate limits.

**Mid-stream refusals:** A mid-stream refusal bills the input tokens and the output already streamed at normal rates.

**Fallback:** When you use fallback, the refusal that triggered it is billed, in addition to the fallback request, when it arrived mid-stream or is in one of the billed categories. [Fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit) compensates for the fallback request’s prompt-cache miss, so you don’t pay to cache the conversation twice. A Claude Haiku 5.5 refusal carries no fallback credit, so a fallback after one pays the full cost of writing the fallback model’s prompt cache. For how server-side fallback reports each attempt, see [Billing and rate limits](#billing-and-rate-limits).

The billed categories may change as Anthropic keeps measuring and refining its safeguards’ false positive rates. The **Billed before any output** column in the [refusal category table](#refusal-response) lists the billed categories.

## Picking a fallback approach

There are three ways to retry a refused request on another model. The right one depends on where you are running and how much control you need.

| Your situation | Use | Why | 
|---|---|---|
| Claude API or Claude Models on Google Cloud (Anthropic managed), simplest setup | [Server-side fallback](#server-side-fallback) | One request, one response. The API handles the retry. | 
| Any platform, using an Anthropic SDK | [Client-side fallback with the SDK middleware](#client-side-fallback) | Configure once on the client. Retries occur automatically. | 
| Raw HTTP or custom retry logic | [A manual retry](#manual-retry) with[fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit) | Full control. Fallback credit keeps the cost down. | 

Server-side fallback and the SDK middleware apply fallback credit for you. You only need the [Fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit) page when you build the retry yourself. Claude Haiku 5.5 has neither server-side fallback nor fallback credit, so use the SDK middleware or a manual retry.

## Server-side fallback

Server-side fallback retries a refused request inside a single API call. In the default mode, when the primary model declines and the refusal category has a recommended fallback, the API runs the same request on the model Anthropic recommends for that category. You can instead [name up to three fallback models of your own](#naming-your-own-fallback-models). Either way, you get back one response that names the model that answered, so your user gets an answer in one round trip.

### Making the request

Set the `fallbacks` parameter to the string `"default"` and send the `server-side-fallback-2026-07-01` beta header. The API then applies the requested model’s server-defined default routing, which selects a recommended fallback model based on the refusal category the classifier reports, so refused requests are served without you maintaining a model list as recommendations change.

Default routing never draws the up-front [oversized-image rejection](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#oversized-image-error) for models you did not choose: a routed model that would resize an image marked `"oversized_image": "error"` is dropped from the routing instead, so a marked image is never served resized.

```
client = Anthropic()

response = client.beta.messages.create(
    model="claude-fable-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello, Claude"}],
    fallbacks="default",
    betas=["server-side-fallback-2026-07-01"],
)

# A fallback_message entry in usage.iterations means a fallback model ran;
# pair it with stop_reason to confirm the fallback served the response.
fallback_ran = any(
    iteration.type == "fallback_message"
    for iteration in response.usage.iterations or []
)
served_by_fallback = fallback_ran and response.stop_reason != "refusal"

print(
    json.dumps(
        {
            "stop_reason": response.stop_reason,
            "model": response.model,
            "served_by_fallback": served_by_fallback,
        }
    )
)
```

Anthropic sets safeguards for each model individually and for each policy category, in line with the model’s capability: depending on the category, a flagged request might fall back to a less capable model or be declined. The `"default"` mode encodes these per-model, per-category recommendations for you, so a refused request is retried on the model Anthropic recommends for that category. Fallbacks are visible either way: the response names the model that served it, and the `fallback` content block marks the handoff.

The routing is applied server-side and is not published for each model on the [Models API](https://platform.claude.com/docs/en/api/models/list)Preview with links to the API reference available — press Tab until focus enters the card, Escape to return.. To see which model served a refused request, check the response’s top-level `model` field and look for a `fallback_message` entry in `usage.iterations`, as this page’s samples do.

Only a safety classifier decline triggers the fallback. A rate limit, overload, or server error on the requested model is returned to you as-is.

### Naming your own fallback models

Instead of default routing, you can set `fallbacks` to a list of up to three models. When the requested model declines, the API runs the next model in the chain on the same request. Use this form when you want to control exactly which models serve refused requests, such as pinning a model your application has qualified.

Named fallback models count toward the [oversized-image check](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#oversized-image-error). A request whose image block sets `"oversized_image": "error"` is checked up front against the requested model and every named fallback. The request is rejected if any of them would resize that image, and the rejection’s reported rescale target fits them all.

The highlighted lines are the only difference from the default-routing request.

```
client = Anthropic()

response = client.beta.messages.create(
    model="claude-fable-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello, Claude"}],
    fallbacks=[{"model": "claude-opus-4-8"}],
    betas=["server-side-fallback-2026-07-01"],
)
print(response.model)
```

A few rules apply to the `fallbacks` list:

- Entries are tried in order. Each must be distinct from the other entries and from the requested model.
- Each entry must be one of the requested model’s permitted targets. With the beta header set, that list is published as `allowed_fallback_models` on the[model’s entry in the Models API](https://platform.claude.com/docs/en/api/beta/models/list) Preview with links to the API reference available — press Tab until focus enters the card, Escape to return..
- Each entry names a `model` and can override`max_tokens` ,`thinking` ,`output_config` , and`speed` for that attempt only.
- The request must be valid as a direct request to every model named, or the API rejects it up front. Under the `server-side-fallback-2026-07-01` header, the request’s`speed` ,`output_config.effort` ,`output_config.task_budget` , and`thinking` type are the exceptions. Where a fallback model doesn’t support one of those values, its attempt uses the model’s default.
- When a Claude Sonnet 5.5 request with [`thinking: {"type": "between_tools"}`](https://platform.claude.com/docs/en/build-with-claude/thinking#turning-thinking-off) falls back to Claude Sonnet 5 under that header, the attempt runs with`thinking: {"type": "disabled"}` and`display: "omitted"` instead.
- Under the `server-side-fallback-2026-06-01` header, a fallback model that doesn’t support the request’s`speed: "fast"` runs at standard speed. For an unsupported`thinking` or`output_config` value, set that whole field on the model’s entry.
- As with the default mode, only a safety classifier decline triggers the fallback. A rate limit, overload, or server error on the requested model is returned to you as-is.
- If a fallback model is rate limited or overloaded, the API returns the preceding refusal and tries no later entries. At a fast mode limit, the attempt can [run at standard speed](#with-server-side-fallback) instead. The refusal’s`stop_details.recommended_model` names a model to retry directly. Size the fallback model’s rate limits for the refusals you expect.

The response has the same shape in both modes: the model that served the turn appears in the top-level `model` field, a `fallback` content block marks the handoff, and `usage.iterations` records each attempt.

### What the response contains

The response looks like any other message, with two additions:

- The top-level `model` field reports the model that produced the returned message, whether that is the requested model or a fallback.
- A `fallback` content block marks each point in`content` where one model’s output gives way to the next:`{"type": "fallback", "from": {"model": ...}, "to": {"model": ...}, "trigger": {"type": "refusal", "category": ...}}` .
  - `from.model` echoes the model string you sent when the declining hop is the requested model.
  - `to.model` is always the resolved ID of the model that continues.
  - `trigger` records why`from.model` declined:`type` is`"refusal"` , and`category` is that refusal’s[`stop_details.category`](#refusal-response) , which can be` null` .

On a refusal before any output, the `fallback` block is the first content block. For example, when Claude Fable 5 declines a request whose `fallbacks` list names Claude Opus 4.8:

```
{
  "id": "msg_01XFUDYJgAACzvnptvVoYEL",
  "type": "message",
  "role": "assistant",
  "model": "claude-opus-4-8",
  "content": [
    {
      "type": "fallback",
      "from": { "model": "claude-fable-5" },
      "to": { "model": "claude-opus-4-8" },
      "trigger": { "type": "refusal", "category": "cyber" }
    },
    { "type": "text", "text": "Hi! How can I help you today?" }
  ],
  "stop_reason": "end_turn",
  "stop_details": null,
  "usage": {
    "input_tokens": 412,
    "output_tokens": 264,
    "cache_read_input_tokens": 0,
    "cache_creation_input_tokens": 0,
    "iterations": [
      {
        "type": "message",
        "model": "claude-fable-5",
        "input_tokens": 535,
        "output_tokens": 0,
        "cache_read_input_tokens": 0,
        "cache_creation_input_tokens": 0
      },
      {
        "type": "fallback_message",
        "model": "claude-opus-4-8",
        "input_tokens": 412,
        "output_tokens": 264,
        "cache_read_input_tokens": 0,
        "cache_creation_input_tokens": 0
      }
    ]
  }
}
```

The `usage.iterations` array records every attempt. A model that declined appears as an ordinary `message` entry, and the model that served the turn appears as a `fallback_message` entry. If every model in the chain declines, the response is the last model’s refusal, with a `message` entry for each earlier hop and a `fallback_message` entry for the last.

[Sticky routing](#sticky-routing) can send a later turn straight to the fallback model. Such a turn carries no `fallback` content block, because no model declined that turn. Identify it by the `fallback_message` entry in `usage.iterations`, the absence of a `message` entry for the requested model, and the response’s `model` field.

### Continuing the conversation

On the next turn, send the assistant content back as you received it. After a mid-output fallback, `content` can include block types the declining model produced before the handoff. The following table covers which to keep and which to drop when you echo the turn.

| Block type | On the next turn | 
|---|---|
| `fallback` | Keep it exactly where it appeared. The API uses its position to validate the thinking blocks around it, so a request that echoes thinking blocks from both sides of the boundary is rejected if the block is omitted or moved. | 
| `text` | Keep. | 
| Any block after the final `fallback` block | Keep. | 
| `thinking` ,`redacted_thinking` , or`connector_text` before the final`fallback` block | Drop. | 
| Client-side `tool_use` before the final`fallback` block | Drop. | 
| `server_tool_use` before the final`fallback` block | Keep when paired with its result. Drop when it has no matching result. | 

### Streaming

On a streaming request, the retry occurs on the same stream, and nothing you have already received is invalidated. What you see depends on when the decline occurs.

**When the decline occurs before any output:**

- `message_start` names the fallback model, and the`fallback` block is the first content block.
- Because `message_start` waits for the fallback attempt to start, time to first byte includes the declined attempt.

**When the decline occurs mid-output:**

- The open content block closes, and the `fallback` block (an ordinary`content_block_start` and`content_block_stop` pair with no deltas) marks the boundary.
- The fallback model continues from the partial output. Only the partial output’s `text` blocks are passed to the fallback model as context. Other block types remain in`content` .
- `message_start` already named the requested model, so read the serving model from the`fallback` block’s`to.model` and from the`fallback_message` entry in the final`message_delta` ’s`usage.iterations` .

### Non-streaming responses

On a non-streaming request, a mid-output decline behaves differently: the response omits the declined model’s partial output, and the fallback model answers without that output as context. The result looks like a decline before any output, with the `fallback` block first. The declined attempt and its output tokens still appear in `usage.iterations`.

### Billing and rate limits

Each attempt follows the rules in [How refusals are billed](#how-refusals-are-billed), at the rates of the model that ran it. An attempt that declined before producing any output is billed only when its refusal category is billed, and its tokens are reported on its `usage.iterations` entry either way. Every attempt that produced output, including one that declined partway through its response, is billed separately. The `usage.iterations` array is the per-attempt record of what you’re billed. The top-level `usage` counts describe only the attempt that produced the returned message. Tokens from different models are never summed into one field.

Every attempt that runs, including one that declined, counts against its own model’s rate limits.

### Sticky routing

After a conversation falls back, the API records which model served it. Later requests for that conversation that include `fallbacks` go directly to that fallback model, without running the requested model. This avoids paying for an attempt that would predictably be declined again on every turn.

A few properties of the routing decision:

- It is retained for approximately 1 hour and is scoped to your organization.
- It is stored as a content hash of the conversation prefix plus the model that served it. The message content itself is not stored.
- It is best-effort, so your code must handle the requested model being tried again at any time.

Sticky routing applies to both streaming and non-streaming requests. On a streaming request, the routing decision is made before the stream opens, so the `message_start` event’s `model` field already carries the fallback model’s ID.

## Client-side fallback with the SDK middleware

The SDK includes a refusal-fallback middleware. You configure it once on the client with your list of fallback models. Calls through `client.beta.messages` then retry refused requests automatically, on any platform. The middleware also sends the `fallback-credit-2026-07-01` beta header on every request it handles, so retries are repriced without per-request setup. A Claude Haiku 5.5 refusal carries no fallback credit, so a retry after one pays the full cost of writing the fallback model’s prompt cache.

### Setting it up

Pass `BetaRefusalFallbackMiddleware` to the client constructor, and share one `BetaFallbackState` instance across the requests of a conversation.

``` python
from anthropic import Anthropic, BetaFallbackState, BetaRefusalFallbackMiddleware

# On a refusal, the middleware retries on the listed fallback model and
# automatically sends the fallback-credit beta header on every request it handles.
client = Anthropic(
    middleware=[BetaRefusalFallbackMiddleware([{"model": "claude-opus-4-8"}])],
)

state = BetaFallbackState()  # pins follow-ups to the model that accepted

# Streaming: on a refusal the middleware retries on the fallback model and
# splices its events onto the open stream.
with (
    state,
    client.beta.messages.stream(
        max_tokens=1024,
        model="claude-fable-5",
        messages=[{"role": "user", "content": "Hello, Claude"}],
    ) as stream,
):
    for text in stream.text_stream:
        print(text, end="", flush=True)
    final_message = stream.get_final_message()
print(f"\nserved by: {final_message.model}")

# Non-streaming: reusing the state keeps the conversation pinned.
with state:
    message = client.beta.messages.create(
        max_tokens=1024,
        model="claude-fable-5",
        messages=[{"role": "user", "content": "Hello, Claude"}],
    )
print(f"served by: {message.model}")
```

For fast mode requests, use `None` for `speed` on each fallback entry, as [Fallback for fast mode requests](#falling-back-from-fast-mode) shows.

### How it behaves

- Retries walk your fallback list in order. A fallback model that itself refuses passes the request to the next entry.
- When every model in the list has declined, the middleware returns the final refusal (the last model’s refusal response) rather than raising an error.
- Thinking blocks from Claude Fable 5.2, Claude Fable 5.1, Claude Opus 5.5, Claude Sonnet 5.5, Claude Haiku 5.5, or Claude Fable 5 pass through unchanged. Each retry re-sends your original request body, and the only blocks the middleware removes from conversation history on later requests are the `fallback` boundary blocks it added itself. Apart from Claude Mythos 5.2, no other model reads Claude Fable 5.2 blocks. Claude Fable 5.1 and Claude Mythos 5.1[read Claude Fable 5.1 blocks](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models) , and so do Claude Fable 5.2 and Claude Mythos 5.2 on the Claude API and Claude Models on Google Cloud (Google managed). No other model reads them. The API drops any Claude Fable 5.2 or Claude Fable 5.1 block that the fallback model can’t read. The API also drops any Claude Opus 5.5 or Claude Sonnet 5.5 block that the fallback model can’t read (see[Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models) ). On the Claude API and Claude Models on Google Cloud (Google managed), Claude Opus 5.5, Claude Sonnet 5.5, Claude Fable 5.2, and Claude Mythos 5.2 read Claude Haiku 5.5 blocks. The API drops them for a fallback model that can’t read them.
- Responses served through the middleware include a `fallback` content block at each model boundary, the same as server-side fallback responses. The middleware manages those blocks for you on later requests.
- The model that accepted is recorded in `BetaFallbackState` , so follow-up requests that share the state stay pinned to it rather than re-asking a model that refused.

## Writing the retry yourself

Over raw HTTP or with custom retry logic, implement the pattern the middleware wraps:

1. ### Detect the refusalCheck the response for `stop_reason: "refusal"` .
2. ### Re-send on a fallback modelSend the same request with `model` set to a fallback model, such as Claude Opus 4.8. If the refused request sent`thinking: {"type": "between_tools"}` , change`thinking` first: only Claude Sonnet 5.5 accepts that value, so omit`thinking` or set a value the fallback model accepts.[Server-side fallback](#server-side-fallback) under the`2026-07-01` header makes this change for you when it falls back to Claude Sonnet 5. Another model can normally serve a request that Claude Fable 5.2, Claude Fable 5.1, or Claude Fable 5 declines. How you handle the conversation history depends on whether you redeem a[fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit) :
  - **Not redeeming a credit:** you can leave the earlier`thinking` and`redacted_thinking` blocks in place or strip them to save input tokens. The fallback model normally can’t use them either way. Apart from Claude Mythos 5.2, no other model reads Claude Fable 5.2 blocks. Claude Fable 5.1 and Claude Mythos 5.1[read Claude Fable 5.1 blocks](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models) , and so do Claude Fable 5.2 and Claude Mythos 5.2 on the Claude API and Claude Models on Google Cloud (Google managed). No other model reads them. Only those four models, Claude Fable 5, and Claude Mythos 5 read Claude Fable 5 blocks. The API drops any of these blocks that the fallback model can’t read. It also drops any Claude Opus 5.5 or Claude Sonnet 5.5 block that the fallback model can’t read (see[Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models) ). A retry after a Claude Haiku 5.5 refusal is always in this case. On the Claude API and Claude Models on Google Cloud (Google managed), Claude Opus 5.5, Claude Sonnet 5.5, Claude Fable 5.2, and Claude Mythos 5.2 read Claude Haiku 5.5 blocks, so leave those blocks in place when you fall back to one of those models there. For a fallback model that can’t read them, the API drops them without billing them.
  - **Redeeming a credit:** change only what[Fields that must match the refused request](https://platform.claude.com/docs/en/build-with-claude/fallback-credit#reference) allows, because redemption compares the two requests. Deleting`speed` keeps the credit. The server handles the earlier model’s thinking blocks on a redemption, so do not strip them.
 Delete `speed` if it’s`"fast"` , as[With a manual retry](#with-a-manual-retry) explains.
3. ### Stay on the fallback modelFor multi-turn conversations, keep using the fallback model for subsequent turns rather than switching back.

A manual retry writes the fallback model’s prompt cache in full, which costs more than reading an existing cache. [Fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit) refunds that cost; redeem it on every retry you build yourself. A Claude Haiku 5.5 refusal carries no fallback credit, so a retry after one pays the full cost of writing the fallback model’s prompt cache.

## Fallback for fast mode requests

Which speed a fallback runs at, and what you set for [`speed`](https://platform.claude.com/docs/en/api/beta/messages/create#create.speed)Preview with links to the API reference available — press Tab until focus enters the card, Escape to return., depend on how you fall back.

### With server-side fallback

When fast mode requests fall back, each attempt runs, and is billed, at fast speed if you have [fast mode on its model](https://platform.claude.com/docs/en/build-with-claude/fast-mode#feature-availability). Otherwise, or if its fast mode rate limit is reached, it’s tried at standard speed.

A `speed` on the attempt’s `fallbacks` entry overrides this, so you know its speed in advance:

- `None` runs that attempt at standard speed if the request sends the`server-side-fallback-2026-07-01` header.
- `"fast"` runs that attempt at fast speed only. Where the model has no fast mode, the API rejects the whole request up front. If your fast mode limit on that model is 0, or you have reached it, you get the previous attempt’s refusal.

With `fallbacks: "default"`, no entry can set `speed`, so name your models to control it.

### With the SDK middleware

Use `None`, not `"standard"`, for `speed` on each entry in your fallback list. An entry that leaves `speed` out retries at `"fast"`, which can fail with a 400 error.

With this client, a fast mode request on Claude Opus 5.5 that is refused goes to Claude Opus 4.8 at standard speed:

``` python
from anthropic import Anthropic, BetaFallbackState, BetaRefusalFallbackMiddleware

client = Anthropic(
    middleware=[
        # None removes speed from the retry, which then runs at standard speed.
        BetaRefusalFallbackMiddleware([{"model": "claude-opus-4-8", "speed": None}]),
    ],
)
```

### With a manual retry

Delete `speed` to retry at standard speed. Keep it only where the fallback model’s fast mode is available to you, with any beta header it needs.

### Claude Models on Google Cloud (Google managed) and Microsoft Foundry

For the SDK middleware and a manual retry:

- On Claude Models on Google Cloud (Google managed), a standard-speed request with the `fast-mode-2026-02-01` beta header returns a 400 error. Don’t send it on the original request either: fast mode doesn’t need it there, and the middleware’s retry would send it again.
- On Microsoft Foundry, [fast mode has its own model IDs](https://platform.claude.com/docs/en/build-with-claude/fast-mode#basic-usage) . For each fallback, name a deployment of a model other than the refusing one, without`-fast` .

### Which speed ran

Read `usage.speed`. On a stream, it keeps the value from the first event. No field shows the speed of a fallback model that takes over later.

## Refusals in Message Batches

A refused request in a [Message Batch](https://platform.claude.com/docs/en/build-with-claude/batch-processing) comes back as `result.type: "succeeded"` with `stop_reason: "refusal"`. Batch results carry the same `stop_details` object as synchronous responses, so you can detect refusals through either `stop_reason` or `stop_details.type`. One difference: batch refusals don’t mint fallback credits, so `stop_details` on a batch result never includes a `fallback_credit_token`.

Server-side fallback is not available for batches (a batch request that includes `fallbacks` produces a per-item errored result). To retry refused batch items:

1. Collect the refused items from the results.
2. Leave the thinking blocks in multi-turn histories in place, or strip them to save input tokens. For a fallback model that can’t read them, the API drops them without billing them, as in [a manual retry](#manual-retry) .
3. If a refused item sent `thinking: {"type": "between_tools"}` , omit`thinking` or set a value the fallback model accepts. Only Claude Sonnet 5.5 accepts`between_tools` .
4. Resubmit them on a fallback model as a new batch or as direct requests.

## Common pitfalls

- **Retry on a different model.** Re-sending a refused request to the same model usually earns another refusal. Point the retry at the fallback model.
- **Budget retries for each request, not for each turn or session.** A single turn can produce several refusals, for example an agent plus its subagents.
- **Configure fallback on every request path.** Retry handlers, error-recovery branches, and background workers all need it. A handler that re-issues a request without fallback loses the protection on exactly the requests most likely to need it.
- **Give subagent calls their own fallback.** The`fallbacks` parameter does not carry over to model calls made from inside tool execution.
- **Make fallback a property of the request, not of ambient state.** A shared flag, cached config value, or global toggle can drift out of sync and silently leave a request unprotected. When you cannot confirm fallback is active, configure it rather than assume it is on.
- **Instrument refusals as their own signal.** A refusal is an HTTP 200, so monitoring built on error rates or 5xx responses never sees it. Emit one event for each refusal and one for each fallback-served response (the`fallback_message` entry in`usage.iterations` marks the latter), then alert on the gap between the two counts.
- **Branch on `stop_reason` or `stop_details.type`, not on `content` or the inner `stop_details` fields.** The`stop_details` object is always present on a refusal, but its`category` and`explanation` fields can be`null` . Check for`stop_reason` equal to`"refusal"` directly.

## Next steps

Avoid paying the prompt-cache cost twice when you build the retry yourself.

Every `stop_reason` value and how to handle it.

How SDK middleware works, including the refusal-fallback helper.

Move an existing application to Claude Fable 5.2.

## Availability

Claude API

- APIs
  - Messages API
  - Managed Agents BetaOnly with Claude Fable 5.2, Claude Fable 5.1, Claude Fable 5, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, Claude Haiku 5.5
- Models
  - Claude Fable 5.2, Fable 5.1, Fable 5
  - Claude Mythos 5.2, Mythos 5.1, Mythos 5
  - Claude Opus 5.5, Opus 5
  - Claude Sonnet 5.5
  - Claude Haiku 5.5

Amazon Bedrock

- API
  - Messages API
- Models
  - Claude Fable 5.1, Fable 5
  - Claude Mythos 5.1, Mythos 5
  - Claude Opus 5.5, Opus 5
  - Claude Sonnet 5.5
  - Claude Haiku 5.5

Amazon Bedrock (bedrock-runtime)

- API
  - Messages API
- Models
  - Claude Fable 5.2
  - Claude Mythos 5.2

Claude Platform on AWS

- APIs
  - Messages API
  - Managed Agents Beta
- Models
  - Claude Fable 5.2, Fable 5.1, Fable 5
  - Claude Opus 5.5, Opus 5
  - Claude Sonnet 5.5
  - Claude Haiku 5.5

Claude Models on Google Cloud (Anthropic managed)

- API
  - Messages API
- Models
  - Claude Fable 5.2, Fable 5.1, Fable 5
  - Claude Mythos 5.2, Mythos 5.1, Mythos 5
  - Claude Opus 5.5, Opus 5
  - Claude Sonnet 5.5
  - Claude Haiku 5.5

Claude Models on Google Cloud (Google managed)

- API
  - Messages API
- Models
  - Claude Fable 5.2, Fable 5.1, Fable 5
  - Claude Mythos 5.2, Mythos 5.1, Mythos 5
  - Claude Opus 5.5, Opus 5
  - Claude Sonnet 5.5
  - Claude Haiku 5.5

Microsoft Foundry (hosted on Azure)

- API
  - Messages API
- Models
  - Claude Opus 5.5, Opus 5
  - Claude Sonnet 5.5
  - Claude Haiku 5.5

Microsoft Foundry (hosted on Anthropic)

- API
  - Messages API
- Models
  - Claude Fable 5.2, Fable 5.1, Fable 5
  - Claude Mythos 5.2, Mythos 5.1, Mythos 5
  - Claude Opus 5.5, Opus 5
  - Claude Sonnet 5.5
  - Claude Haiku 5.5

Was this page helpful?
