from line 2
22title: Handle streaming refusals
33url: https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/handle-streaming-refusals
44description: Detect and handle refusal stop reasons in streaming responses, and retry refused requests on a fallback model.
5featureMetadata:
6 supportedModels:
7 - claude-fable-5-1
8 - claude-mythos-5-1
9 - claude-fable-5
10 - claude-mythos-5
11 - claude-mythos-preview
12 - claude-opus-5-5
13 - claude-opus-5
14 - claude-sonnet-5-5
15 - claude-sonnet-5
16 - claude-haiku-5-5
17 - claude-haiku-4-5-20251001
18 - claude-opus-4-8
19 - claude-opus-4-7
20 - claude-opus-4-6
21 - claude-sonnet-4-6
22 - claude-opus-4-5-20251101
23 - claude-sonnet-4-5-20250929
24 supportedPlatforms:
25 Claude API: ga
26 Claude Platform on AWS: ga
27 Amazon Bedrock: ga
28 Amazon Bedrock (InvokeModel): ga
29 Claude Models on Google Cloud (Google managed): ga
30 Microsoft Foundry: ga
531---
632
33**API support**: Usage differs by product.
34
35* **Messages API**: Always on. The stream ends with `stop_reason` `"refusal"`, and `stop_details` (`category` and `explanation`) arrives on the `message_delta` event.
36* **Managed Agents**: Always on. A refused turn ends, and the session goes idle with `stop_reason.type` `"refusal"`.
37
738Starting with Claude 4 models, streaming responses from Claude’s API return **`stop_reason`: `"refusal"`** when streaming classifiers intervene to handle potential policy violations. This safety feature helps maintain content compliance during real-time streaming.
839
940<Tip>
from line 369
338369 Serve users across languages with Claude’s cross-lingual capabilities.
339370 </Card>
340371</CardGroup>
372
373## Availability
374
375Streaming refusals are available or in beta, depending on the API.
376
377### API support
378
379#### [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages)
380
381* Availability: Always on
382* Usage: The stream ends with `stop_reason` `"refusal"`, and `stop_details` (`category` and `explanation`) arrives on the `message_delta` event.
383
384| Status | Cloud platforms |
385| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
386| Available | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) |
387
388#### [Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview)
389
390* Availability: Always on
391* Usage: A refused turn ends, and the session goes idle with `stop_reason.type` `"refusal"` and `stop_details` (`category` and `explanation`) on the `session.status_idle` event.
392
393| Status | Cloud platforms |
394| ------ | ------------------------------------------------------------------------------------------------------------------ |
395| Beta | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) |
341396