Structured outputs for Anthropic Claude models on Amazon Bedrock
Amazon Bedrock now returns schema-compliant JSON for all Anthropic Claude models on bedrock-runtime and bedrock-mantle, with grammars cached for 24 hours.
By Dillip Chowdary β’ Oct 20, 2026 β’ Source: AWS Machine Learning Blog
Amazon Bedrock now supports structured outputs for all Anthropic Claude models on both the bedrock-runtime and bedrock-mantle endpoints, where the model is available, according to AWS Machine Learning Blog's report. A caller using Boto3 and the bedrock-runtime APIs, or the Messages API and the bedrock-mantle endpoint, can receive schema-compliant JSON that conforms to a defined structure. Custom parsing, retry logic, and post-processing are no longer required for that conformance.
This piece is for developers who need those fields to match a fixed application record, including financial earnings reports, compliance documents, clinical notes, product catalogs, contracts, and support tickets. It covers both mechanisms, JSON Schema Draft 2020-12 validation, the grammar cache, and the InvokeModel and Mantle samples.
Structured outputs for Anthropic Claude: what actually changed
JSON Schema output format and strict tool use are the two mechanisms on both endpoints. JSON Schema output format controls the model's response structure for data extraction, report generation, and API responses. Strict tool use validates tool parameters against schemas for agentic workflows, function calling, and multi-step automation. Constrained decoding enforces the JSON schema during token generation, not after the fact. The model does not produce tokens that would violate the schema, so output formatting moves from probabilistic to deterministic.
For each available Claude model, structured outputs works with batch inference, so large volumes of requests can be processed asynchronously and still return schema-compliant outputs. On the bedrock-runtime endpoint it also works with cross-Region inference, letting the same feature run across AWS Regions without additional setup. When a response is needed in real time, structured responses can be streamed as typed events. Schema conformance is what Amazon calls production ready, so teams can deploy at scale without additional schema-validation code.
Structured outputs for Anthropic Claude: how it works

Amazon Bedrock validates the JSON schema against the supported JSON Schema Draft 2020-12 subset, then compiles a grammar artifact for a new schema before generation begins. Compiled grammars are cached for 24 hours from first access and scoped to the account, so later requests that reuse the schema run with minimal overhead. Changing the schema structure invalidates the cache and triggers a fresh compilation. Changing only the name or description fields leaves the cached grammar intact. Generation emits tokens that produce valid JSON matching the schema.
InvokeModel takes an Anthropic-native body, and the schema goes in output_config.format as a JSON object rather than a JSON string, with type json_schema. The lead sample reuses the Converse example schema. It uses boto3, service_name bedrock-runtime, region us-east-1, modelId global.anthropic.claude-sonnet-5-5, anthropic_version bedrock-2023-05-31, and max_tokens 512. Required strings are name (Customer name), email (Customer email address), and plan_interest (Product plan of interest). demo_requested (boolean: Whether a demo was requested) is required. additionalProperties is false. The user message is "Paulo Santos (paulo@example.com) is interested in our Enterprise plan and wants to schedule a demo for next Tuesday at 2pm."
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
Structured outputs for Anthropic Claude: why it matters now
Each response is valid JSON, so a caller no longer hits JSON.parse() errors or parsing exceptions. Responses are type safe: field types are enforced, and required fields are always present. Retries that exist only to repair schema violations become unnecessary, and the integration is more reliable. Holding the model to the fields the schema defines reduces output token count and can lower inference costs for high-volume workloads, which is why teams can skip a validation pass after the model returns.
Error-handling falls most in three patterns. Data extraction turns invoices, contracts, email, and transcripts into JSON that matches the schema for databases or customer relationship management (CRM) systems. Tool calls validate arguments at generation time, so multi-step workflows do not fail on malformed input. Classification at scale labels tickets, leads, or content by intent, priority, and sentiment for routing, moderation, and evaluation. Claude Haiku 5.5 handles summaries, compactions, database queries, and classification requests on the Invoke API, via boto3 and bedrock-runtime in us-east-1.
Structured outputs for Anthropic Claude: who is affected
Extraction can take every required field from financial earnings reports and compliance documents. Clinical notes can be parsed into Electronic Health Records (EHR). Product catalogs can be enriched with consistent, validated results. Contract review can capture key terms, parties, and obligations. Support routing can keep intents, sentiments, and entities on the application data model. For the Paulo Santos email, the object is name "Paulo Santos", email "paulo@example.com", plan_interest "Enterprise", and demo_requested true. That object conforms to the schema, and no additional validation is required.
Amazon Bedrock Mantle is designed for agentic applications with server-side tools, background inference, and stateful conversations. Strict tool use on bedrock-mantle guarantees that tool parameters match the input schema exactly. The sample uses AnthropicBedrockMantle, aws_region us-east-1, model anthropic.claude-sonnet-5, and max_tokens 512. The user asks "What's the weather like in San Francisco?" Tool get_weather, described as "Get the current weather for a specified location", sets strict to true. location is a required string for the city and state, e.g., San Francisco, CA. unit is a required string enum of celsius or fahrenheit, described as Temperature unit. additionalProperties is false.
Structured outputs for Anthropic Claude: what to watch
Amazon Bedrock compiles the grammar artifact before generation, so the first request with a new schema might take slightly longer. The account-scoped cache then holds the grammar for 24 hours, and repeat requests run with minimal overhead. A structure change invalidates the cache. A name or description change does not. InvokeModel requires a stop_reason check before parsing. end_turn means parse the content block whose type is text. max_tokens means the response was truncated, and the sample prints "Response truncated: increase max_tokens and retry."
With strict set to true, location is always a string, unit is always celsius or fahrenheit, and the model cannot add fields the schema does not name, so the tool input contains only specified keys. Amazon highlights that rule for multi-step workflows on Amazon Bedrock Mantle that call server-side tools such as web search and code interpreter. Model IDs differ by sample: global.anthropic.claude-sonnet-5-5 on InvokeModel, anthropic.claude-sonnet-5 on the Mantle messages call, and Claude Haiku 5.5 for classify-and-route. The feature applies where the model is available.
Developer Action Items
- β Verify the claim on the official Anthropic / Claude / Amazon page (or AWS Machine Learning Blog), not from this recap alone.
- β Name the surface that moved β API, policy, model, hardware, or commercial terms β before you Slack the thread.
- β Assign one owner a day to read the primary material and decide: this-sprint, this-quarter, or noise.
- β Do not change production on day-one coverage. Watch the vendor changelog and one independent write-up first.
Structured outputs for Anthropic Claude FAQ
Which Amazon Bedrock endpoints support structured outputs for Claude?
Both bedrock-runtime and bedrock-mantle, for every Anthropic Claude model where that model is available. Callers can use Boto3 with the bedrock-runtime APIs or the Messages API with bedrock-mantle.
How does Amazon Bedrock force the JSON to match a schema?
Constrained decoding stops the model from producing tokens that would violate the schema. Amazon Bedrock validates the schema against the JSON Schema Draft 2020-12 subset, compiles a grammar artifact, and caches that grammar for 24 hours from first access, scoped to the account.
What model ID and region does the InvokeModel lead sample use?
It uses modelId global.anthropic.claude-sonnet-5-5 in us-east-1, with anthropic_version bedrock-2023-05-31 and max_tokens 512. The required fields are name, email, plan_interest, and demo_requested, and additionalProperties is false.
What does strict tool use guarantee on Amazon Bedrock Mantle?
With strict set to true, tool parameters match the input schema. In the get_weather sample on anthropic.claude-sonnet-5, location is always a string, unit is always celsius or fahrenheit, and the model cannot add fields outside the schema.
Why can the first request for a schema take longer?
Amazon Bedrock compiles the grammar artifact before generation, so the first request with a new schema might take slightly longer. The account cache then holds it for 24 hours. A structure change compiles it again. A name or description change does not.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement