Compatibility
- ZDR: eligible (excludes Covered Models)
- Supported models:
claude-fable-5-1,claude-mythos-5-1,claude-fable-5,claude-mythos-5,claude-mythos-preview,claude-opus-5,claude-opus-4-8,claude-opus-4-7,claude-opus-4-6,claude-sonnet-5,claude-sonnet-4-6,claude-sonnet-4-5-20250929,claude-opus-4-5-20251101,claude-haiku-4-5-20251001 - Platforms: Claude API, Claude Platform on AWS, Amazon Bedrock [1], Google Cloud, Microsoft Foundry
- On Amazon Bedrock, structured outputs are available for Claude Opus 4.6, Claude Sonnet 4.6, Claude Sonnet 4.5, Claude Opus 4.5, and Claude Haiku 4.5.
Structured outputs constrain Claude's responses to follow a specific schema, ensuring valid, parseable output for downstream processing. Structured outputs provide two complementary features:
- JSON outputs (
output_config.format): Get Claude's response in a specific JSON format - Strict tool use (
strict: true): Guarantee schema validation on tool names and inputs
You can use these features independently or together in the same request.
Migrating from beta? The output_format parameter has moved to output_config.format, and beta headers are no longer required. The API continues to accept the old beta header (structured-outputs-2025-11-13) and the output_format request field for a transition period, but the Python SDK (v1.0 and later) does not accept output_format=\{...\} on client.beta.messages.create() or count_tokens() and raises a TypeError; use output_config instead. See the following code examples for the updated API shape.