Amazon Bedrock adds structured outputs for all Anthropic Claude models

Amazon Bedrock now supports structured outputs for all Anthropic Claude models, letting developers receive JSON responses that match a defined schema. According to AWS, the feature works on both the bedrock-runtime and bedrock-mantle endpoints, where the model is available, and removes the need for custom parsing, retry logic or post-processing.
- Amazon Bedrock now supports structured outputs for all Anthropic Claude models on the bedrock-runtime and bedrock-mantle endpoints, where the model is available.
- Constrained decoding enforces the JSON schema during token generation, so responses are valid JSON with enforced types and required fields.
- Strict tool use (strict: true) on bedrock-mantle guarantees tool parameters match the input schema exactly.
- Compiled grammars are cached for 24 hours; the first request with a new schema may take slightly longer.
- Works with batch inference, streaming as typed events, and cross-Region inference on bedrock-runtime.
Constrained decoding instead of after-the-fact checks
AWS says structured outputs rely on constrained decoding, which enforces a JSON schema while tokens are being generated, not afterwards. The model does not produce tokens that would violate the schema. In AWS's words, this changes output formatting from probabilistic to deterministic.
Two mechanisms are available on both Bedrock endpoints. The first is a JSON Schema output format, which controls the structure of the model's response and suits data extraction, report generation and API responses. The second is strict tool use, which validates tool parameters against schemas and targets agentic workflows, function calling and multi-step automation.
According to AWS, each response is valid JSON, so developers no longer run into JSON.parse() errors or parsing exceptions. Field types are enforced and required fields are always present. Because outputs always conform to the schema, retries to handle violations are not needed. AWS adds that limiting responses to the fields the schema defines reduces output token count and can lower inference costs for high-volume workloads.
How it works and what to expect on performance
AWS describes four steps behind each request with a JSON schema:
- Schema validation: Bedrock checks the schema against the supported JSON Schema Draft 2020-12 subset.
- Grammar compilation: for new schemas, Bedrock compiles a grammar artifact, so the first request might take slightly longer.
- Caching: compiled grammars are cached for 24 hours, which makes later requests faster.
- Constrained generation: the model generates tokens that produce valid JSON matching the schema.
The cache is scoped to the customer's account and lasts 24 hours from first access. Changing the structure of the schema invalidates the cache and triggers a fresh compilation. Changing only the name or description fields leaves the cached grammar intact.
Structured outputs also work with batch inference, so large volumes of requests can be processed asynchronously with schema-compliant results. On the bedrock-runtime endpoint, the feature works with cross-Region inference without additional setup. For real-time needs, structured responses can be streamed as typed events.
Code examples and strict tool use
For the InvokeModel API on bedrock-runtime, AWS explains that the request body is Anthropic-native, so the schema goes in output_config.format as a JSON object rather than a JSON string. The example in the post extracts lead data from a customer email, returning the name, email address, plan of interest and whether a demo was requested. AWS notes that the response conforms to the schema and needs no additional validation. It also recommends checking the stop reason before parsing, since a response can be truncated if max_tokens is too low.
On the bedrock-mantle endpoint, strict tool use is enabled by setting strict: true in a tool definition. AWS says this guarantees that tool parameters match the input schema exactly. In the weather example, the location field is always a string and the unit field is always either celsius or fahrenheit. The model cannot add fields outside the schema. AWS describes Amazon Bedrock Mantle as designed for agentic applications with server-side tools, background inference and stateful conversations, and says the guarantee is especially valuable where models orchestrate multi-step workflows with tools such as web search and code interpreter.
Use cases and what it means for developers
AWS names three patterns where structured outputs cut error-handling complexity the most. Data extraction pulls fields from invoices, contracts, email and transcripts into JSON ready for databases or CRM systems. Reliable agent tool calls validate arguments at generation time, so multi-step workflows do not fail on malformed input. Classification at scale sorts tickets, leads or content by intent, priority and sentiment for routing, moderation and evaluation.
Other examples from the post include extracting required fields from financial earnings reports and compliance documents, parsing clinical notes into Electronic Health Records, enriching product catalogs, and analyzing contracts for key terms, parties and obligations. AWS also points to Claude Haiku 5.5 for quick and repetitive workloads such as summaries, compactions, database queries and classification requests.
For teams building on Bedrock, the practical effect, according to AWS, is that schema-validation code and retry handling for malformed output can be dropped, which AWS says makes the feature production ready for deployment at scale.
