OpenAI models in Amazon Bedrock
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

OpenAI models in Amazon Bedrock

Understand availability, feature coverage, and deployment differences for OpenAI models served through AWS.

Amazon Bedrock runs supported OpenAI models on AWS-managed infrastructure. Use this guide to compare OpenAI API feature support and connect with the OpenAI SDK. For deployment configuration, use the AWS documentation linked from this page.

Model capabilities and API compatibility determine what your application can do. AWS manages model access, regional availability, routing, billing, and operational controls for your Bedrock deployment.

How Bedrock availability works

OpenAI models are available through two Amazon Bedrock endpoints: bedrock-runtime and bedrock-mantle. Both support the OpenAI-compatible Responses and Chat Completions APIs for supported models, but their feature coverage differs.

Choose your endpoint based on the capabilities your application needs. For example, hosted web search currently requires Mantle. See the endpoint differences on this page and the AWS endpoint comparison for Bedrock-specific capabilities and endpoint selection.

GPT-6 Astra is available through Bedrock Runtime and through Mantle in us-west-2 (Oregon). The examples in this guide use GPT-5.6 Sol in us-east-2; select Astra’s supported Region before changing the model.

For access and setup, see the AWS GPT-6 Astra announcement and Runtime endpoint instructions.

Make Responses API requests

These examples use the OpenAI SDK with the Mantle endpoint. Select the AWS Region and model ID for your deployment:

  • Client libraries with a Bedrock provider derive a regional Mantle base URL from the AWS Region. The JavaScript, Python, Go, and Java providers use https://bedrock-mantle.us-east-2.api.aws/openai/v1 for this guide’s us-east-2 examples. The Ruby examples configure this /openai/v1 endpoint directly because the provider’s default /v1 route doesn’t support this model.
  • Use a Bedrock model ID with the openai. prefix, such as openai.gpt-5.6-sol.

The examples use openai.gpt-5.6-sol in us-east-2. For Runtime, follow the AWS Responses API endpoint instructions to select the base URL and inference profile. Do not reuse a Mantle model ID without checking the Runtime requirements.

The following example uses a Bedrock API key stored as AWS_BEARER_TOKEN_BEDROCK. See Amazon Bedrock API keys for information about generating and using a Bedrock API key.

Install the optional Java Bedrock provider before using either Java example:

<dependency>
  <groupId>com.openai</groupId>
  <artifactId>openai-java-bedrock</artifactId>
  <version>4.57.0</version>
</dependency>
Send a Responses API request through Amazon Bedrock
import OpenAI from "openai";
import { bedrock } from "openai/providers/bedrock";

const client = new OpenAI({
  provider: bedrock({
    region: "us-east-2",
    apiKey: process.env.AWS_BEARER_TOKEN_BEDROCK,
  }),
});

const response = await client.responses.create({
  model: "openai.gpt-5.6-sol",
  input: "Write a haiku about cloud infrastructure.",
});

console.log(response.output_text);

For long-running applications, prefer the standard AWS credential chain instead of a static bearer token. The JavaScript, Python, Go, Java, and Ruby SDK providers resolve fresh AWS credentials and sign each request attempt with SigV4. The chain can include credentials configured with aws login, shared profiles, workload roles, and instance or container credentials.

Install optional dependencies for AWS credential-chain examples before using this path:

npm install @aws-sdk/credential-provider-node @smithy/hash-node @smithy/signature-v4
pip install 'openai[bedrock]'
go get github.com/openai/openai-go/v3/bedrock
bundle add aws-sdk-core

The .NET SDK doesn’t currently expose an equivalent Bedrock provider or AWS SigV4 authentication policy. Use a Bedrock API key with .NET, or send a signed HTTP request through an AWS-supported client when your application requires the AWS credential chain.

Send a request with AWS-managed Bedrock credentials
import OpenAI from "openai";
import { defaultProvider } from "@aws-sdk/credential-provider-node";
import { bedrock } from "openai/providers/bedrock/aws";

const client = new OpenAI({
  provider: bedrock({
    region: "us-east-2",
    endpoint: "mantle",
    credentialProvider: defaultProvider(),
  }),
});

const response = await client.responses.create({
  model: "openai.gpt-5.6-sol",
  input: "Write a haiku about cloud infrastructure.",
});

console.log(response.output_text);

Responses API feature availability

Use this matrix to identify differences from the OpenAI API. Availability is specific to the model and endpoint; a supported API does not imply support for every tool or response mode.

CapabilityOpenAI APIAmazon Bedrock
Text generationAvailableAvailable
Image inputAvailableAvailable
File inputAvailableAvailable
Structured outputsAvailableAvailable
Function callingAvailableAvailable
Asynchronous tool callingAvailable on supported modelsNot available
Streaming responsesAvailableAvailable
WebSocket connectionsAvailableNot available
Mid-turn steeringAvailable on supported modelsNot available
Context windowModel-dependentModel-dependent
Reasoning effortAvailableAvailable
Reasoning updatesAvailable on supported modelsNot available
Pro modeAvailable on supported modelsNot available
Persisted reasoningAvailable on supported modelsAvailable on supported models
Prompt cachingAvailableAvailable
Programmatic Tool CallingAvailable on supported modelsNot available
Multi-agentBeta on supported modelsNot available
Custom toolsAvailableAvailable
Client-side tool_searchAvailableAvailable
Hosted web searchAvailableMantle only
Hosted file searchAvailableNot available
Computer useAvailableAvailable
Shell toolAvailableNot available
Image generation toolAvailableNot available
Remote MCP serversAvailableNot available

Asynchronous tool calling (async: true) and reasoning updates (configuration_update input items) are not supported on Amazon Bedrock. Mid-turn steering requires WebSockets and is not available through either Bedrock endpoint.

Client-side tool_search is distinct from hosted tools and remote MCP server support. Hosted web search is available through Mantle; hosted file search and remote MCP servers are unavailable.

Computer use is available on Runtime and Mantle for supported models. Your application executes computer actions and returns results to the model; this capability does not require a Bedrock-hosted execution environment.

On Amazon Bedrock, GPT-5.4 and GPT-5.5 support a 1-million-token context window; GPT-5.6 Sol, Terra, Luna, and GPT-6 Astra support 1,050,000 tokens. Check the AWS OpenAI model cards for model-specific limits.

Endpoint differences

These Responses API differences apply when choosing between Runtime and Mantle:

CapabilityBedrock RuntimeMantle
GPT-6 AstraAvailableAvailable in us-west-2 (Oregon)
Computer useAvailable on supported modelsAvailable on supported models
Streaming responsesAvailableAvailable
Background mode (background: true)Not availableAvailable, subject to data retention settings
Hosted web searchNot availableAvailable on supported models
Continuing with previous_response_idInclude model on every requestThe model can be inherited from the previous response

Runtime requires model even when you supply previous_response_id. Background mode is separate from streaming and does not describe asynchronous function calling. Use the AWS Responses API documentation for the complete endpoint contract. For web search permissions and configuration, see the AWS web search guide.

Availability and operations

AWS maintains the deployment options and availability for Amazon Bedrock. Use these references to select and configure your deployment:

AWS-managed concernAWS documentation
Model IDs and supported APIsOpenAI model cards
Model and endpoint availability by AWS RegionModel availability and endpoint availability
Geographic and global request routingCross-Region inference
Account quotas and increase requestsAmazon Bedrock quotas

An AWS Region is not an OpenAI data residency jurisdiction. If your workload has location requirements, review the destination Regions of your inference profile and the applicable AWS terms, not only the Region in your endpoint URL.

Data access and retention

Amazon Bedrock uses separate controls for operator access and data retention:

  • Zero operator access (ZOA) means AWS operators have no technical mechanism to sign in to Mantle’s underlying compute systems or access customer data there. See the AWS ZOA design.
  • Zero data retention (ZDR) means AWS does not write request or response data to durable storage when the effective retention mode is none.

Setting store: false does not guarantee ZDR. For Responses API requests with an effective retention mode of none, AWS rejects store: true, and background mode is unavailable.

For OpenAI models in Amazon Bedrock, AWS does not share request or response content with OpenAI when the effective retention mode is default or none. Use the AWS data retention documentation for available modes, eligibility, and account or project configuration. See Amazon Bedrock abuse detection for model-specific retention requirements and exceptions.

If AWS detects apparent CSAM in an image input, AWS may move the flagged input or output outside the ZOA environment and store and review it only to determine whether it is CSAM. AWS may also file a report with national authorities.

Authentication and operations

Your AWS administrator controls account, model, and feature access. Use the AWS API key documentation for credential creation and lifecycle, and the IAM documentation for identities and permissions. The OpenAI SDK examples on this page show how to supply those credentials; they do not configure AWS permissions.

Pricing

Amazon Bedrock usage is billed through AWS. Bedrock pricing in commercial regions matches OpenAI direct pricing for equivalent services. Note that using a region-specific service in Bedrock will be priced at the same rate as Regional processing in the OpenAI API. Amazon commercial terms apply to Bedrock usage.

See API pricing for direct OpenAI API pricing. For Bedrock rates, supported service tiers, and billing options, use Amazon Bedrock pricing and the applicable model card.

Next steps

For setup in ChatGPT Work and Codex, see Use ChatGPT Work and Codex with Amazon Bedrock.