Amazon Bedrock adds schema-compliant JSON outputs for Claude models
Developers who call Anthropic's Claude models through Amazon Bedrock can now receive JSON responses that follow a defined structure, according to an AWS post. The capability covers all Claude models on the bedrock-runtime and bedrock-mantle endpoints.
What developers receive
The output can be constrained to a defined structure, either through a JSON Schema output format or through strict tool use. The post says this works both when Claude is called via Boto3 and the bedrock-runtime APIs and when the Messages API is used on the bedrock-mantle endpoint.
According to the post, the approach removes the need for custom parsing, retry logic and post-processing to reach the intended structure.
How the schema is enforced
AWS describes the mechanism as constrained decoding, in which the schema is applied during token generation rather than checked after the output is produced. The model therefore does not produce tokens that would violate the schema, which keeps field types consistent and ensures required fields are present.
Because responses follow the schema, AWS argues that integrations no longer need retries to handle schema violations. The post also states that responses are limited to the fields the schema defines, which can reduce output token count and lower inference costs for high-volume workloads.
Use cases named by AWS
The post cites extracting required fields from financial earnings reports and compliance documents, parsing clinical notes into Electronic Health Records, and enriching product catalogs with consistent, validated results. It also lists contract analysis for key terms, parties and obligations, and support ticket routing based on intents, sentiments and entities.
Batch and cross-Region support
Structured outputs work with batch inference for asynchronous processing of large request volumes. On the bedrock-runtime endpoint they also work with cross-Region inference, and responses can be streamed as typed events when real-time output is needed. Availability depends on whether a model is offered in a given Region.
Open questions
- How much do reduced output token counts lower costs in practice?
- Which Claude models are available in each AWS Region?