Claude refusals and fallback: How to handle an HTTP 200 decline
Read Claude’s refusal JSON, choose a fallback, and track which model answered and what you owe, even when the stream changes models mid-response.
Published

An HTTP 200 from Claude can mean the user got no answer. As of November 2026, Anthropic reports a classifier decline in the message itself, with stop_reason: "refusal". An app that checks only the HTTP status can show a blank answer, mark the job complete and keep a perfectly green error dashboard.
Where a refusal shows up
Read stop_reason before consuming the answer. On a refusal, stop_details.type is "refusal" and stop_details.category identifies the policy area when one is available. Show the user stop_details.explanation if present. Its wording can change. Both the category and explanation can legitimately be null, so have a plain message ready for that case. For every other stop reason, stop_details itself is null. Empty content alone is ambiguous, since even end_turn can have an empty response. Anthropic’s stop reasons reference
A request and its two possible outcomes
These are excerpts from Anthropic’s published samples. “Hello, Claude” is the placeholder in the request example. The refusal and fallback are separate response examples, not a claim that sending that greeting triggers either outcome. The scene follows the fields a handler reads. Anthropic’s request and response examples
model="claude-fable-5", messages=[{"role": "user", "content": "Hello, Claude"}]
{"content": [], "stop_reason": "refusal", "stop_details": {"type": "refusal", "category": "cyber", "explanation": "This request was declined because it could enable cyber harm."}}
{"type": "fallback", "from": {"model": "claude-fable-5"}, "to": {"model": "claude-opus-4-8"}, "trigger": {"type": "refusal", "category": "cyber"}}
{"model": "claude-opus-4-8", "stop_reason": "end_turn", "stop_details": null}
fallback_ran = any(i.type == "fallback_message" for i in response.usage.iterations or [])
served_by_fallback = fallback_ran and response.stop_reason != "refusal"
The top-level model names whoever produced the returned message. Each fallback block marks a change of model inside content. The original refusal category lives on that boundary under trigger.category, even when the final message has stop_details: null. This is where a chat UI can tell the user that another model took over.
Read usage.iterations when accounting for the work. In the fallback sample, the first message entry records 535 input tokens and zero output tokens for Fable. The fallback_message entry records 412 input tokens and 264 output tokens for Opus. Top-level usage reports 412 and 264, the counts for the returned message alone. If the whole chain declines, the last attempt still has type fallback_message, but the returned message is a refusal. A dashboard that counts every such entry as a recovered request overstates recovery.
Which refusals are billed?
Before any output, content is empty and usage reports tokens whether or not a charge applies. The rule is the same across platforms. Anthropic’s category and billing rules
Anthropic says it charges for pre-output refusals in the three billed categories to disrupt attempts to circumvent safeguards at scale. Those are the categories where it measured a low volume of false positives as of September 2026. It says the list can change. Every attempt that runs counts against that model’s rate limits, including an unbilled refusal.
Once output has started, the declined attempt incurs its normal input charge and the charge for output already streamed. A fallback attempt is accounted for separately at its own model’s rates. This matters even for a non-streaming app whose user never sees those discarded tokens.
If you train models
Anthropic defines frontier_llm this way: “The request could help with the development of competing AI models,” an activity it says its commercial terms restrict. Its next sentence matters just as much: “Benign machine learning work can also trigger this category.” If a training assistant stops, preserve the category with the job outcome and show the explanation. That record tells you a classifier intervened. It cannot establish why a different session produced poor code. Anthropic’s category definitions · Evidence behind the Claude sabotage claims
Who should handle the retry?
For the server-side beta, the SDK spelling in Anthropic’s Python example is:
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)Default routing follows Anthropic’s recommendations as they change. An app that must use qualified models can instead name up to three distinct permitted targets. The beta Models API exposes allowed_fallback_models. A primary rate limit, overload or server error goes to your normal error handler. Only a safety classifier decline triggers this handoff. If a fallback is rate limited or overloaded, the API returns the preceding refusal and skips later entries. On requests that set fallbacks, stop_details.recommended_model can name a model when the fallback attempt was skipped. Otherwise the field is null. Anthropic’s server-side routing guide
For reasoning_extraction, Anthropic gives no recommended fallback. If the product needs a justification, ask for supporting evidence or a short explanation of the answer. Claude Haiku 5.5 has neither server-side fallback nor fallback credit. Use SDK middleware or a manual retry for eligible work and budget for the full cache write. SDK middleware · Anthropic’s refusal guide
What fallback credit actually pays for
Prompt caches belong to individual models. A long conversation may be cheap to read on the first model and expensive to write afresh on the second. Credit reprices the eligible cache work. It leaves the ordinary cost of answering on the fallback model in place. Server-side fallback and SDK middleware apply available credit automatically.
For a manual retry, send anthropic-beta: fallback-credit-2026-07-01 on the original request and the retry. Take fallback_credit_token from stop_details and send it at the top level on the retry. Preserve prompt-shaping fields, including earlier thinking blocks. When fallback_has_prefill_claim is true, append the assistant content using Anthropic’s echo rules so the model can continue. When false, use the retry body without that appended message. The token expires five minutes after the refusal. Look for cache-write tokens shifting to cache-read tokens in the retry’s usage. A warm cache can mean there is nothing to reprice. Fallback credit and exact request-matching rules
What a streaming user sees
If the final outcome is a refusal, discard any partial output as incomplete. When server-side fallback succeeds, the handoff has different semantics. The timing matters most in a chat UI that shows tokens as they arrive. Anthropic’s streaming and non-streaming behavior
After a mid-stream handoff, message_start still names the primary. Update the displayed model from to.model on the boundary. The final message_delta includes the fallback_message usage entry.
For the next turn after a server-side handoff, preserve the boundary block in position. Keep text and everything after the final boundary. Before that boundary, drop thinking, redacted_thinking, connector_text and client-side tool_use. Keep an earlier server_tool_use only with its matching result. Moving the boundary can invalidate the thinking history. The SDK fallback middleware manages its own boundary blocks on later requests. Continuing the conversation
Why the next turn can have no handoff block
As of Nov 29, 2026 · Source: Anthropic, Refusals and fallback
The route is scoped to the organization and retained for about an hour. The routing record contains no message content. It works for both request modes and is best effort, so the primary can be tried again at any time. Identify a sticky turn by the returned model, a fallback_message iteration and no message iteration for the requested model. A streaming client already sees the serving model in message_start. This is also why a fallback-served turn does not necessarily represent a new refusal. Anthropic’s sticky routing rules
When a batch succeeds with a refusal
A batch worker that accepts every result.type: "succeeded" item as finished will quietly count refusals as completed work. Inspect each succeeded item’s message for stop_reason: "refusal" or stop_details.type. Collect the declined items separately. Batch refusals carry the same policy details but never a fallback_credit_token.
Adding fallbacks to a batch request produces a per-item error. Resubmit eligible refused items in a new batch or as direct requests on a fallback model. If the item sent thinking: {"type": "between_tools"}, omit that setting or use one the fallback accepts. Only Claude Sonnet 5.5 accepts that value. Refusals in Message Batches
What to check before shipping
An HTTP error-rate alert never sees a classifier refusal. Emit a refusal event for each decline and a separate event for each fallback-served response. Alert on the gap, as Anthropic recommends. Keep enough context to distinguish a new decline, a final refusal and a later sticky turn when investigating that gap. Anthropic’s common pitfalls
- Branch on
stop_reasonorstop_details.type. A null category, changing explanation or empty content makes a poor control signal. - Reissuing the identical request to the same model usually produces another refusal. Use the documented fallback policy and handle a final decline visibly.
- Budget retries per request. An agent and its subagents can each encounter a refusal within one user turn.
- Configure fallback on every request path, including background workers, recovery code and retry handlers.
- Configure calls made inside tools separately. Subagents do not inherit their parent’s
fallbacks. - Make fallback explicit on the outgoing request. A global flag can disagree with what a recovery handler actually sent.
For deployment decisions, see Enterprise frontier safeguards, what changes with Claude Fable 5.2 and how Mythos and Fable compare.
Compare LLM API costs
Put the cost of your primary and fallback calls alongside other API options.
- Published
- Category
- Build







