Skip to content
Apixo
Blog
news· 2 min read· via AWS Machine Learning

Amazon Bedrock Brings Native Structured Outputs to Anthropic Claude

Amazon Bedrock now delivers schema-compliant JSON outputs and strict tool use for Anthropic Claude models across its bedrock-runtime and bedrock-mantle endpoints.

Amazon Bedrock Brings Native Structured Outputs to Anthropic Claude

Amazon Bedrock has introduced native support for structured outputs across all Anthropic Claude models available on its platform. Operating on both the bedrock-runtime and bedrock-mantle endpoints, this update enables developers to receive guaranteed schema-compliant JSON responses directly from the models. By eliminating the need for custom parsing, post-processing, and retry routines, the feature shifts output formatting from probabilistic generation to deterministic certainty.

Constrained Decoding and Performance

The infrastructure relies on constrained decoding to enforce JSON schemas actively during token generation rather than checking them afterward. Two main mechanisms govern this capability: a JSON Schema output format for data extraction and API responses, and strict tool use for agentic workflows and function calling.

When developers submit a request containing a JSON schema, Amazon Bedrock validates it against a supported subset of JSON Schema Draft 2020-12. The system then compiles a grammar artifact for new schemas. To optimize performance, these compiled grammars are cached for 24 hours within the user's account, significantly reducing latency on subsequent requests unless the structure of the schema changes.

What it means for developers

For engineering teams, these updates remove common pain points associated with LLM integrations. Responses are strictly type-safe, and required fields are always present, meaning applications no longer encounter parsing exceptions or JSON.parse() errors. Furthermore, developers can try top AI models cheaply through one API at https://apixoai.online.

Because the output is constrained strictly to the defined schema, token counts drop, which lowers overall inference costs for high-volume workloads. Developers can utilize these features with batch inference, cross-Region inference, and real-time streaming of typed events. For agentic use cases utilizing Amazon Bedrock Mantle, setting strict: true on tools guarantees that inputs match parameter definitions exactly, preventing models from injecting unexpected fields during multi-step executions.

Implementation Guidelines

To ensure optimal performance and avoid rejections, developers must set additionalProperties: false on all objects within their schemas. Best practices also recommend starting with basic schemas, using clear descriptive field names, leveraging enums for constrained values, and monitoring stop reasons in responses to catch token limits or safety refusals. While features like basic types, string formats, and internal references are fully supported, recursive schemas and numerical constraints remain unenforced and must be validated at the application layer.


Source: Structured outputs for Anthropic Claude models on Amazon Bedrock | Amazon Web Services — AWS Machine Learning. Written by the Apixo team from that report.

#ai-news#aws#anthropic#claude#json#ai
Try it with your own tools

One key for Claude, GPT, GLM, DeepSeek and more. Pay per token with crypto.

Get your API key

Keep reading