[Update] Amazon Bedrock now supports OpenAI's Responses API #AWSreInvent
This page has been translated by machine translation. View original
Hello! Cloud Business Division Consulting Department, this is Takakuni (@takakuni_).
At re:Invent 2025, Amazon Bedrock added support for OpenAI's Responses API.
Even though the year is coming to an end, I'd like to discuss this update.
Responses API
The Responses API is provided through the OpenAI SDK.
When working with text generation models in the OpenAI SDK, there are both the Chat Completions API and the Responses API, with the Responses API being the newer offering.
There are even migration guides from Completions API to Responses API, as shown below. (Nostalgic)
Update Details
This update means that "Amazon Bedrock now supports OpenAI's Responses API."
I wasn't aware of this, but apparently it was already possible to run OpenAI's open-weight models (on Amazon Bedrock) using the OpenAI SDK with an Amazon Bedrock API Key.
However, until now, only the Chat Completions API mentioned earlier was available.
from openai import OpenAI
client = OpenAI(
base_url="https://bedrock-runtime.us-west-2.amazonaws.com/openai/v2",
api_key="$AWS_BEARER_TOKEN_BEDROCK" # Replace with actual API key
)
completion = client.chat.completions.create(
model="gpt-oss-20b",
messages=[
{
"role": "developer",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
)
print(completion.choices[0].message)
With this update, the Responses API is now also supported.
As of today, the models gpt-oss-20b and gpt-oss-120b are supported, with support for additional models coming soon.
Responses API support is available today starting with OpenAI's GPT OSS 20B/120B models, with support for other models coming soon.
Amazon Bedrock now supports Responses API from OpenAI
Project Mantle
The method of executing Completions API with the Bedrock API key that I introduced earlier was using the Amazon Bedrock Runtime endpoint.
- Make an HTTP request with an Amazon Bedrock Runtime endpoint.
- Use an OpenAI SDK request with an Amazon Bedrock Runtime endpoint.
Though there isn't much public information available, a new distributed inference engine called Mantle has been announced for Amazon Bedrock.
With this update, OpenAI-compatible API endpoints are being provided through this Mantle system.
Amazon Bedrock provides OpenAI compatible API endpoints for model inference, powered by Mantle, a distributed inference engine for large-scale machine learning model serving.
Generate responses using OpenAI APIs
By the way, endpoints provided by Project Mantle support both Completions and Responses APIs. That's great.
Overview
Let me briefly summarize the following documentation:
Authentication Methods
First, the Responses API can be accessed either via HTTP requests or through the OpenAI SDK.
Next, Amazon Bedrock can be used with either Amazon Bedrock API Keys or AWS IAM.
When using Amazon Bedrock API keys, the OpenAI SDK is required; when using AWS IAM, HTTP requests are also supported.
Environment Variables
You can avoid hardcoding by using specific environment variables. Let's actively use them.
- OPENAI_API_KEY
- Set to your Amazon Bedrock API key
- OPENAI_BASE_URL
- Set to the Amazon Bedrock endpoint for your region (for example, https://bedrock-mantle.us-east-1.api.aws)
Trying It Out
Let's give it a try right away.
Since gpt-oss-20b and gpt-oss-120b are available in Northern Virginia, Ohio, and Oregon regions, I've chosen Oregon for this test.
I'll try the following three access methods:
- Amazon Bedrock API key (short-term API key)
- Amazon Bedrock API key (long-term API key)
- AWS IAM
Via OpenAI SDK
Registering the Endpoint
To use models through Mantle, you need to update the request URL. Set the environment variable OPENAI_BASE_URL.
Since I'm using the Oregon region, I set the following environment variable. Don't forget to add /v1 at the end.
export OPENAI_BASE_URL=https://bedrock-mantle.us-west-2.api.aws/v1
Check Supported Regions and Endpoints for available regions and endpoint names.
Models API
Before diving into model inference, let's use the Models API to get a list of models available through Mantle.
# List all available models using the OpenAI SDK
# Requires OPENAI_API_KEY and OPENAI_BASE_URL environment variables
from openai import OpenAI
client = OpenAI()
models = client.models.list()
for model in models.data:
print(model.id)
Amazon Bedrock API key (short-term API key)
Let's start with the short-term API key.
In addition to OPENAI_BASE_URL, register AWS_REGION and OPENAI_API_KEY.
export AWS_REGION=us-west-2
export OPENAI_API_KEY=bedrock-api-key-hoge # Get this from the Amazon Bedrock console
export OPENAI_BASE_URL=https://bedrock-mantle.us-west-2.api.aws/v1
It executed without any issues!
takakuni@ short-term % uv run models.py
mistral.magistral-small-2509
deepseek.v3.1
google.gemma-3-27b-it
moonshotai.kimi-k2-thinking
openai.gpt-oss-safeguard-120b
nvidia.nemotron-nano-3-30b
qwen.qwen3-coder-30b-a3b-instruct
openai.gpt-oss-120b
qwen.qwen3-next-80b-a3b-instruct
mistral.ministral-3-14b-instruct
openai.gpt-oss-20b
minimax.minimax-m2
nvidia.nemotron-nano-9b-v2
google.gemma-3-4b-it
openai.gpt-oss-safeguard-20b
nvidia.nemotron-nano-12b-v2
mistral.mistral-large-3-675b-instruct
qwen.qwen3-32b
qwen.qwen3-vl-235b-a22b-instruct
google.gemma-3-12b-it
zai.glm-4.6
mistral.voxtral-small-24b-2507
qwen.qwen3-coder-480b-a35b-instruct
mistral.ministral-3-3b-instruct
mistral.voxtral-mini-3b-2507
qwen.qwen3-235b-a22b-2507
mistral.ministral-3-8b-instruct
Amazon Bedrock API key (long-term API key)
Now for the long-term API key.
export AWS_REGION=us-west-2
+ export OPENAI_API_KEY=bedrock-api-key-hoge # Get this from the Amazon Bedrock console
- export OPENAI_API_KEY=bedrock-api-key-hoge # Get this from the Amazon Bedrock console
export OPENAI_BASE_URL=https://bedrock-mantle.us-west-2.api.aws/v1
I got an error.
takakuni@ openai-api % uv run models.py
Traceback (most recent call last):
File "/Users/takakuni/Documents/openai-api/models.py", line 8, in <module>
models = client.models.list()
^^^^^^^^^^^^^^^^^^^^
File "/Users/takakuni/Documents/openai-api/.venv/lib/python3.12/site-packages/openai/resources/models.py", line 91, in list
return self._get_api_list(
^^^^^^^^^^^^^^^^^^^
File "/Users/takakuni/Documents/openai-api/.venv/lib/python3.12/site-packages/openai/_base_client.py", line 1308, in get_api_list
return self._request_api_list(model, page, opts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/takakuni/Documents/openai-api/.venv/lib/python3.12/site-packages/openai/_base_client.py", line 1159, in _request_api_list
return self.request(page, options, stream=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/takakuni/Documents/openai-api/.venv/lib/python3.12/site-packages/openai/_base_client.py", line 1047, in request
raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: Error code: 404
After investigating, it seems that a new API schema starting with bedrock-mantle has appeared.
For example, in this case, it's an API like bedrock-mantle:ListModels.
Long-term Amazon Bedrock API keys are assigned the AmazonBedrockLimitedAccess policy by default, and this policy doesn't include permissions for bedrock-mantle.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "BedrockAPIs",
"Effect": "Allow",
"Action": [
"bedrock:Get*",
"bedrock:List*",
"bedrock:CallWithBearerToken",
"bedrock:BatchDeleteEvaluationJob",
"bedrock:CreateEvaluationJob",
"bedrock:CreateGuardrail",
"bedrock:CreateGuardrailVersion",
"bedrock:CreateInferenceProfile",
"bedrock:CreateModelCopyJob",
"bedrock:CreateModelCustomizationJob",
"bedrock:CreateModelImportJob",
"bedrock:CreateModelInvocationJob",
"bedrock:CreatePromptRouter",
"bedrock:CreateProvisionedModelThroughput",
"bedrock:DeleteCustomModel",
"bedrock:DeleteGuardrail",
"bedrock:DeleteImportedModel",
"bedrock:DeleteInferenceProfile",
"bedrock:DeletePromptRouter",
"bedrock:DeleteProvisionedModelThroughput",
"bedrock:StopEvaluationJob",
"bedrock:StopModelCustomizationJob",
"bedrock:StopModelInvocationJob",
"bedrock:TagResource",
"bedrock:UntagResource",
"bedrock:UpdateGuardrail",
"bedrock:UpdateProvisionedModelThroughput",
"bedrock:ApplyGuardrail",
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream"
],
"Resource": "*"
},
{
"Sid": "DescribeKey",
"Effect": "Allow",
"Action": ["kms:DescribeKey"],
"Resource": "arn:*:kms:*:::*"
},
{
"Sid": "APIsWithAllResourceAccess",
"Effect": "Allow",
"Action": [
"iam:ListRoles",
"ec2:DescribeVpcs",
"ec2:DescribeSubnets",
"ec2:DescribeSecurityGroups"
],
"Resource": "*"
},
{
"Sid": "MarketplaceOperationsFromBedrockFor3pModels",
"Effect": "Allow",
"Action": [
"aws-marketplace:Subscribe",
"aws-marketplace:ViewSubscriptions",
"aws-marketplace:Unsubscribe"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"aws:CalledViaLast": "bedrock.amazonaws.com"
}
}
}
]
}
With this update, AWS has added new managed policies: AmazonBedrockMantleFullAccess, AmazonBedrockMantleReadOnly, and AmazonBedrockMantleInferenceAccess.
Let's try using AmazonBedrockMantleInferenceAccess.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "BedrockMantleInference",
"Effect": "Allow",
"Action": [
"bedrock-mantle:Get*",
"bedrock-mantle:List*",
"bedrock-mantle:CreateInference"
],
"Resource": "arn:aws:bedrock-mantle:*:*:project/*"
},
{
"Sid": "BedrockMantleCallWithBearerToken",
"Effect": "Allow",
"Action": ["bedrock-mantle:CallWithBearerToken"],
"Resource": "*"
}
]
}
After adding this permission, it works properly.
takakuni@ long-term % uv run models.py
qwen.qwen3-vl-235b-a22b-instruct
openai.gpt-oss-safeguard-120b
qwen.qwen3-32b
mistral.ministral-3-8b-instruct
openai.gpt-oss-safeguard-20b
mistral.voxtral-mini-3b-2507
mistral.magistral-small-2509
nvidia.nemotron-nano-3-30b
mistral.ministral-3-3b-instruct
openai.gpt-oss-20b
zai.glm-4.6
google.gemma-3-4b-it
nvidia.nemotron-nano-12b-v2
mistral.ministral-3-14b-instruct
deepseek.v3.1
google.gemma-3-27b-it
openai.gpt-oss-120b
qwen.qwen3-coder-480b-a35b-instruct
nvidia.nemotron-nano-9b-v2
google.gemma-3-12b-it
moonshotai.kimi-k2-thinking
qwen.qwen3-next-80b-a3b-instruct
qwen.qwen3-coder-30b-a3b-instruct
minimax.minimax-m2
mistral.voxtral-small-24b-2507
qwen.qwen3-235b-a22b-2507
mistral.mistral-large-3-675b-instruct
AWS IAM
According to the documentation prerequisites, Amazon Bedrock API key is required when using the OpenAI SDK:
Amazon Bedrock API key (required for OpenAI SDK)
While AWS IAM is supported for HTTP requests:
AWS credentials (supported for HTTP requests)
However, as shown in the article below, you can use IAM authentication with OpenAI SDK by including IAM credentials in the http_client when creating the Client.
Let's generate an http_client and send a request:
import boto3
import httpx
from openai import OpenAI
from botocore.auth import SigV4Auth
from botocore.awsrequest import AWSRequest
class AWSBedrockMantleAuth(httpx.Auth):
def __init__(self, service: str, region: str, credentials):
self.service = service
self.region = region
self.credentials = credentials
def auth_flow(self, request: httpx.Request):
# 1. Carefully select headers for signing
# Include only essential headers to avoid signature errors when httpx modifies them
headers_to_sign = {
'host': request.url.host,
'x-amz-date': None, # SigV4Auth will add this later
}
# Extract headers
aws_request = AWSRequest(
method=request.method,
url=str(request.url),
data=request.content,
headers=headers_to_sign
)
# Signing process
signer = SigV4Auth(self.credentials, self.service, self.region)
signer.add_auth(aws_request)
# Apply headers generated by the signature (Authorization, X-Amz-Date, X-Amz-Security-Token) to the original httpx request
for key, value in aws_request.headers.items():
request.headers[key] = value
yield request
# --- Configuration ---
region = "us-west-2"
session = boto3.Session()
credentials = session.get_credentials().get_frozen_credentials()
client = OpenAI(
api_key="dummy",
http_client=httpx.Client(
auth=AWSBedrockMantleAuth("bedrock-mantle", region, credentials)
)
)
models = client.models.list()
for model in models.data:
print(model.id)
This is also working well:
takakuni@ iam % uv run models.py
openai.gpt-oss-20b
google.gemma-3-27b-it
mistral.voxtral-mini-3b-2507
moonshotai.kimi-k2-thinking
qwen.qwen3-coder-30b-a3b-instruct
mistral.magistral-small-2509
google.gemma-3-4b-it
mistral.ministral-3-8b-instruct
mistral.mistral-large-3-675b-instruct
zai.glm-4.6
nvidia.nemotron-nano-9b-v2
qwen.qwen3-next-80b-a3b-instruct
qwen.qwen3-235b-a22b-2507
qwen.qwen3-coder-480b-a35b-instruct
openai.gpt-oss-120b
nvidia.nemotron-nano-12b-v2
mistral.ministral-3-3b-instruct
openai.gpt-oss-safeguard-20b
deepseek.v3.1
nvidia.nemotron-nano-3-30b
google.gemma-3-12b-it
openai.gpt-oss-safeguard-120b
minimax.minimax-m2
mistral.ministral-3-14b-instruct
qwen.qwen3-vl-235b-a22b-instruct
mistral.voxtral-small-24b-2507
qwen.qwen3-32b
Responses API
Let's use the Responses API for model inference.
# Create a basic response using the OpenAI SDK
# Requires OPENAI_API_KEY and OPENAI_BASE_URL environment variables
from openai import OpenAI
client = OpenAI()
response = client.responses.create(
model="openai.gpt-oss-120b",
input=[
{"role": "user", "content": "Hello! How can you help me today?"}
]
)
# Extract text from message in response.output
messages = [
item for item in getattr(response, "output", [])
if getattr(item, "type", None) == "message"
]
texts = []
for msg in messages:
for content in getattr(msg, "content", []) or []:
text = getattr(content, "text", None)
if text:
texts.append(text)
text = "\n".join(texts) if texts else None
if text:
print(text)
else:
# Also print the entire response for verification
print(response)
While there are differences in the output, it's running successfully.
Amazon Bedrock API key (short-term API key)
takakuni@ short-term % uv run responses.py
Hello! 👋 I'm here to help with almost anything you need. Some of the things I can do include:
- **Answering questions** – from quick facts to deep‑dive explanations on science, history, tech, art, and more.
- **Writing & editing** – essays, blog posts, emails, stories, poems, jokes, resumes, cover letters, etc.
- **Brainstorming & planning** – ideas for projects, gifts, events, business strategies, study schedules, travel itineraries, and so on.
- **Learning & tutoring** – step‑by‑step help with math, programming, language learning, exam prep, or any subject you're curious about.
- **Coding assistance** – writing, debugging, or explaining code in many languages (Python, JavaScript, Java, C++, SQL, …).
- **Data & analysis guidance** – tips on working with spreadsheets, statistics, visualizations, or interpreting results.
- **Creative fun** – role‑playing, world‑building, character creation, puzzles, riddles, or just a friendly chat.
Just let me know what you'd like to work on or learn about, and we'll dive right in! 🚀
Amazon Bedrock API key (long-term API key)
takakuni@ long-term % uv run responses.py
Hey there! 👋 I'm here to assist with a wide range of tasks, such as:
- **Answering questions** – from quick facts to deeper explanations on science, history, tech, and more.
- **Writing & editing** – blog posts, essays, reports, creative stories, emails, resumes, cover letters, social‑media copy, etc.
- **Problem‑solving** – math, programming, logic puzzles, data‑analysis guidance, troubleshooting tech issues.
- **Learning & tutoring** – breaking down concepts, creating study guides, designing practice problems, language practice.
- **Planning & organization** – itineraries, project outlines, meeting agendas, goal‑setting frameworks, habit trackers.
- **Brainstorming** – ideas for products, marketing campaigns, gifts, events, scripts, game mechanics, etc.
- **Research assistance** – finding reliable sources, summarizing articles, comparing options.
- **Conversational support** – practicing interview answers, role‑playing scenarios, offering motivation or a friendly chat.
…and pretty much anything else that can be expressed in text.
What's on your mind today? Let me know how I can help!
AWS IAM
import boto3
import httpx
from openai import OpenAI
from botocore.auth import SigV4Auth
from botocore.awsrequest import AWSRequest
class AWSBedrockMantleAuth(httpx.Auth):
def __init__(self, service: str, region: str, credentials):
self.service = service
self.region = region
self.credentials = credentials
def auth_flow(self, request: httpx.Request):
# 1. Carefully select headers to sign
# We need to limit headers since httpx might modify them later causing signature errors
# Focus only on essential ones with consistent capitalization
headers_to_sign = {
'host': request.url.host,
'x-amz-date': None, # SigV4Auth will add this later
}
# Extract headers
aws_request = AWSRequest(
method=request.method,
url=str(request.url),
data=request.content,
headers=headers_to_sign
)
# Sign the request
signer = SigV4Auth(self.credentials, self.service, self.region)
signer.add_auth(aws_request)
# Apply signature-generated headers (Authorization, X-Amz-Date, X-Amz-Security-Token) to the original httpx request
for key, value in aws_request.headers.items():
request.headers[key] = value
yield request
# --- Configuration ---
region = "us-west-2"
session = boto3.Session()
credentials = session.get_credentials().get_frozen_credentials()
client = OpenAI(
api_key="dummy",
http_client=httpx.Client(
auth=AWSBedrockMantleAuth("bedrock-mantle", region, credentials)
)
)
response = client.responses.create(
model="openai.gpt-oss-120b",
input=[
{"role": "user", "content": "Hello! How can you help me today?"}
]
)
# Extract message text from response.output
messages = [
item for item in getattr(response, "output", [])
if getattr(item, "type", None) == "message"
]
texts = []
for msg in messages:
for content in getattr(msg, "content", []) or []:
text = getattr(content, "text", None)
if text:
texts.append(text)
text = "\n".join(texts) if texts else None
if text:
print(text)
else:
# Also print full response for verification if needed
print(response)
takakuni@ iam % uv run responses.py
Hello! 👋 I'm here to help with almost anything you might need—whether that's answering a question, brainstorming ideas, polishing a piece of writing, tackling a bit of code, learning a new concept, planning a trip, drafting an email, solving a puzzle, or just having a friendly chat.
**A quick snapshot of what I can do:**
| Category | Examples of what I can help with |
|----------|-----------------------------------|
| **Information & Research** | Summarize articles, explain complex topics, fact‑check, provide up‑to‑date statistics (as of 2024‑06) |
| **Writing & Editing** | Draft essays, blog posts, letters, resumes, cover letters, poetry, scripts; improve style, grammar, tone, structure |
| **Creative Projects** | Brainstorm story ideas, characters, plot twists, world‑building, jokes, marketing copy, slogans |
| **Programming & Tech** | Explain algorithms, debug code snippets (Python, JavaScript, Java, C++, etc.), write small programs, suggest libraries, help with Git |
| **Learning & Tutoring** | Walk through math problems, science concepts, language practice, test‑prep tips |
| **Productivity & Planning** | Create to‑do lists, project plans, meeting agendas, time‑management strategies |
| **Personal & Lifestyle** | Meal planning, fitness routines, travel itineraries, gift ideas, hobby recommendations |
| **Conversation & Support** | Offer a listening ear, role‑play scenarios, practice interviews, discuss philosophy, explore hobbies |
Just let me know what you're working on or curious about, and we'll dive in together! 🌟
Chat Completions API
The Chat Completions API can now also be executed through Mantle.
As mentioned previously, the old method required executing through the Amazon Bedrock Runtime endpoint as follows:
from openai import OpenAI
client = OpenAI(
base_url="https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1",
api_key="$AWS_BEARER_TOKEN_BEDROCK" # Replace with actual API key
)
completion = client.chat.completions.create(
model="openai.gpt-oss-20b:0",
messages=[
{
"role": "developer",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
)
print(completion.choices[0].message)
HTTP Requests
Next, let's try using HTTP requests. I'll demonstrate with cURL by adding an API Key to the Authorization header.
# Create a basic response
# Requires OPENAI_API_KEY and OPENAI_BASE_URL environment variables
curl -X POST $OPENAI_BASE_URL/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "openai.gpt-oss-120b",
"input": [
{"role": "user", "content": "Hello! How can you help me today?"}
]
}'
Models API
# List all available models
# Requires OPENAI_API_KEY and OPENAI_BASE_URL environment variables
curl -X GET $OPENAI_BASE_URL/models \
-H "Authorization: Bearer $OPENAI_API_KEY"
Amazon Bedrock API key (short-term)
takakuni@ short-term % curl -X GET $OPENAI_BASE_URL/models \
-H "Authorization: Bearer $OPENAI_API_KEY"
{"data":[{"created":1764460800,"id":"qwen.qwen3-32b","object":"model","owned_by":"system"},{"created":1764460800,"id":"moonshotai.kimi-k2-thinking","object":"model","owned_by":"system"},{"created":1763923750,"id":"mistral.ministral-3-8b-instruct","object":"model","owned_by":"system"},{"created":1763769600,"id":"nvidia.nemotron-nano-12b-v2","object":"model","owned_by":"system"},{"created":1764460800,"id":"google.gemma-3-12b-it","object":"model","owned_by":"system"},{"created":1764460800,"id":"mistral.magistral-small-2509","object":"model","owned_by":"system"},{"created":1765065600,"id":"nvidia.nemotron-nano-3-30b","object":"model","owned_by":"system"},{"created":1764460800,"id":"openai.gpt-oss-120b","object":"model","owned_by":"system"},{"created":1763923654,"id":"mistral.ministral-3-3b-instruct","object":"model","owned_by":"system"},{"created":1764460800,"id":"qwen.qwen3-235b-a22b-2507","object":"model","owned_by":"system"},{"created":1764460800,"id":"qwen.qwen3-next-80b-a3b-instruct","object":"model","owned_by":"system"},{"created":1763769600,"id":"nvidia.nemotron-nano-9b-v2","object":"model","owned_by":"system"},{"created":1764460800,"id":"deepseek.v3.1","object":"model","owned_by":"system"},{"created":1763923896,"id":"mistral.mistral-large-3-675b-instruct","object":"model","owned_by":"system"},{"created":1763923865,"id":"mistral.ministral-3-14b-instruct","object":"model","owned_by":"system"},{"created":1764460800,"id":"openai.gpt-oss-safeguard-120b","object":"model","owned_by":"system"},{"created":1764460800,"id":"qwen.qwen3-coder-30b-a3b-instruct","object":"model","owned_by":"system"},{"created":1764460800,"id":"mistral.voxtral-mini-3b-2507","object":"model","owned_by":"system"},{"created":1764460800,"id":"openai.gpt-oss-safeguard-20b","object":"model","owned_by":"system"},{"created":1764460800,"id":"qwen.qwen3-vl-235b-a22b-instruct","object":"model","owned_by":"system"},{"created":1764460800,"id":"google.gemma-3-27b-it","object":"model","owned_by":"system"},{"created":1764460800,"id":"mistral.voxtral-small-24b-2507","object":"model","owned_by":"system"},{"created":1764460800,"id":"qwen.qwen3-coder-480b-a35b-instruct","object":"model","owned_by":"system"},{"created":1764460800,"id":"minimax.minimax-m2","object":"model","owned_by":"system"},{"created":1764460800,"id":"openai.gpt-oss-20b","object":"model","owned_by":"system"},{"created":1764460800,"id":"google.gemma-3-4b-it","object":"model","owned_by":"system"},{"created":1764460800,"id":"zai.glm-4.6","object":"model","owned_by":"system"}],"object":"list"}%
Amazon Bedrock API key (long-term)
takakuni@ long-term % curl -X GET $OPENAI_BASE_URL/models \
-H "Authorization: Bearer $OPENAI_API_KEY"
{"data":[{"created":1763923654,"id":"mistral.ministral-3-3b-instruct","object":"model","owned_by":"system"},{"created":1763923750,"id":"mistral.ministral-3-8b-instruct","object":"model","owned_by":"system"},{"created":1763769600,"id":"nvidia.nemotron-nano-12b-v2","object":"model","owned_by":"system"},{"created":1765065600,"id":"nvidia.nemotron-nano-3-30b","object":"model","owned_by":"system"},{"created":1764460800,"id":"openai.gpt-oss-120b","object":"model","owned_by":"system"},{"created":1764460800,"id":"openai.gpt-oss-20b","object":"model","owned_by":"system"},{"created":1763923896,"id":"mistral.mistral-large-3-675b-instruct","object":"model","owned_by":"system"},{"created":1764460800,"id":"mistral.voxtral-small-24b-2507","object":"model","owned_by":"system"},{"created":1764460800,"id":"qwen.qwen3-next-80b-a3b-instruct","object":"model","owned_by":"system"},{"created":1764460800,"id":"qwen.qwen3-235b-a22b-2507","object":"model","owned_by":"system"},{"created":1764460800,"id":"openai.gpt-oss-safeguard-20b","object":"model","owned_by":"system"},{"created":1764460800,"id":"mistral.magistral-small-2509","object":"model","owned_by":"system"},{"created":1764460800,"id":"qwen.qwen3-coder-30b-a3b-instruct","object":"model","owned_by":"system"},{"created":1764460800,"id":"google.gemma-3-27b-it","object":"model","owned_by":"system"},{"created":1764460800,"id":"openai.gpt-oss-safeguard-120b","object":"model","owned_by":"system"},{"created":1763769600,"id":"nvidia.nemotron-nano-9b-v2","object":"model","owned_by":"system"},{"created":1764460800,"id":"qwen.qwen3-vl-235b-a22b-instruct","object":"model","owned_by":"system"},{"created":1763923865,"id":"mistral.ministral-3-14b-instruct","object":"model","owned_by":"system"},{"created":1764460800,"id":"mistral.voxtral-mini-3b-2507","object":"model","owned_by":"system"},{"created":1764460800,"id":"qwen.qwen3-32b","object":"model","owned_by":"system"},{"created":1764460800,"id":"qwen.qwen3-coder-480b-a35b-instruct","object":"model","owned_by":"system"},{"created":1764460800,"id":"deepseek.v3.1","object":"model","owned_by":"system"},{"created":1764460800,"id":"minimax.minimax-m2","object":"model","owned_by":"system"},{"created":1764460800,"id":"google.gemma-3-12b-it","object":"model","owned_by":"system"},{"created":1764460800,"id":"moonshotai.kimi-k2-thinking","object":"model","owned_by":"system"},{"created":1764460800,"id":"zai.glm-4.6","object":"model","owned_by":"system"},{"created":1764460800,"id":"google.gemma-3-4b-it","object":"model","owned_by":"system"}],"object":"list"}%
AWS IAM
For IAM, we need SigV4 signed requests, so I'll use awscurl for simplicity:
awscurl --service bedrock-mantle \
--region us-west-2 \
"https://bedrock-mantle.us-west-2.api.aws/v1/models"
This also works correctly:
takakuni@ iam % awscurl --service bedrock-mantle \
--region us-west-2 \
"https://bedrock-mantle.us-west-2.api.aws/v1/models"
{"data":[{"created":1764460800,"id":"mistral.voxtral-small-24b-2507","object":"model","owned_by":"system"},{"created":1764460800,"id":"google.gemma-3-12b-it","object":"model","owned_by":"system"},{"created":1765065600,"id":"nvidia.nemotron-nano-3-30b","object":"model","owned_by":"system"},{"created":1763769600,"id":"nvidia.nemotron-nano-9b-v2","object":"model","owned_by":"system"},{"created":1764460800,"id":"zai.glm-4.6","object":"model","owned_by":"system"},{"created":1763923896,"id":"mistral.mistral-large-3-675b-instruct","object":"model","owned_by":"system"},{"created":1764460800,"id":"qwen.qwen3-coder-30b-a3b-instruct","object":"model","owned_by":"system"},{"created":1763769600,"id":"nvidia.nemotron-nano-12b-v2","object":"model","owned_by":"system"},{"created":1764460800,"id":"mistral.magistral-small-2509","object":"model","owned_by":"system"},{"created":1764460800,"id":"qwen.qwen3-32b","object":"model","owned_by":"system"},{"created":1764460800,"id":"openai.gpt-oss-safeguard-120b","object":"model","owned_by":"system"},{"created":1764460800,"id":"openai.gpt-oss-120b","object":"model","owned_by":"system"},{"created":1763923654,"id":"mistral.ministral-3-3b-instruct","object":"model","owned_by":"system"},{"created":1764460800,"id":"moonshotai.kimi-k2-thinking","object":"model","owned_by":"system"},{"created":1764460800,"id":"mistral.voxtral-mini-3b-2507","object":"model","owned_by":"system"},{"created":1764460800,"id":"google.gemma-3-27b-it","object":"model","owned_by":"system"},{"created":1764460800,"id":"openai.gpt-oss-safeguard-20b","object":"model","owned_by":"system"},{"created":1764460800,"id":"minimax.minimax-m2","object":"model","owned_by":"system"},{"created":1764460800,"id":"qwen.qwen3-235b-a22b-2507","object":"model","owned_by":"system"},{"created":1763923865,"id":"mistral.ministral-3-14b-instruct","object":"model","owned_by":"system"},{"created":1764460800,"id":"qwen.qwen3-next-80b-a3b-instruct","object":"model","owned_by":"system"},{"created":1764460800,"id":"qwen.qwen3-vl-235b-a22b-instruct","object":"model","owned_by":"system"},{"created":1764460800,"id":"deepseek.v3.1","object":"model","owned_by":"system"},{"created":1763923750,"id":"mistral.ministral-3-8b-instruct","object":"model","owned_by":"system"},{"created":1764460800,"id":"openai.gpt-oss-20b","object":"model","owned_by":"system"},{"created":1764460800,"id":"qwen.qwen3-coder-480b-a35b-instruct","object":"model","owned_by":"system"},{"created":1764460800,"id":"google.gemma-3-4b-it","object":"model","owned_by":"system"}],"object":"list"}
Responses API
Let's also test the Responses API. The main difference is the endpoint is now /responses.
# Create a basic response
# Requires OPENAI_API_KEY and OPENAI_BASE_URL environment variables
curl -X POST $OPENAI_BASE_URL/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "openai.gpt-oss-120b",
"input": [
{"role": "user", "content": "Hello! How can you help me today?"}
]
}'
Amazon Bedrock API key (short-term)
takakuni@ short-term % curl -X POST $OPENAI_BASE_URL/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "openai.gpt-oss-120b",
"input": [
{"role": "user", "content": "Hello! How can you help me today?"}
]
}'
{"background":false,"created_at":1766909534.0,"error":null,"id":"resp_JXQHGDL3F37PJMKIZRMNRZK6GGOUMONYLMD36E5ENUQMFQNLB77Q","incomplete_details":null,"instructions":null,"metadata":{},"model":"openai.gpt-oss-120b","object":"response","output":[{"content":[{"text":"The user asks \"Hello! How can you help me today?\" This is a casual greeting and question. We should respond friendly, explain capabilities. Follow policies: don't mention policies. Provide a brief overview of what we can do: answering questions, summarizing, tutoring, creative writing, etc. Ask if they have a specific request.","type":"reasoning_text"}],"id":"msg_8015ade90331c021","status":"completed","summary":[],"type":"reasoning"},{"content":[{"annotations":[],"text":"Hey there! 👋 I'm here to help with a wide range of things, such as:\n\n- **Answering questions** – factual info, explanations, or advice on everyday topics. \n- **Research & summarizing** – pulling together and condensing information from multiple sources. \n- **Writing & editing** – essays, reports, emails, stories, poems, code snippets, you name it. \n- **Learning & tutoring** – walking through concepts, solving problems, or providing study tips. \n- **Creative brainstorming** – ideas for projects, recipes, travel plans, marketing copy, etc. \n- **Technical support** – debugging code, explaining algorithms, helping with software tools.\n\nAnything specific on your mind today? Let me know how I can assist you!","type":"output_text"}],"id":"msg_b02edcdf73954830","role":"assistant","status":"completed","type":"message"}],"parallel_tool_calls":true,"service_tier":"default","status":"completed","temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled"}%
Amazon Bedrock API key (long-term)
takakuni@ long-term % curl -X POST $OPENAI_BASE_URL/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "openai.gpt-oss-120b",
"input": [
{"role": "user", "content": "Hello! How can you help me today?"}
]
}'
{"background":false,"created_at":1766909552.0,"error":null,"id":"resp_IYXJEOQGDA3TFZOYC6PXJY3HYZ4MGRTYPU5CRCJQXT35GIADROYA","incomplete_details":null,"instructions":null,"metadata":{},"model":"openai.gpt-oss-120b","object":"response","output":[{"content":[{"text":"User greeted and asked \"How can you help me today?\" We need to respond as AI assistant. It's general greeting and question. Should introduce capabilities and ask follow-up. Keep friendly tone.","type":"reasoning_text"}],"id":"msg_8f283b5d077e772f","status":"completed","summary":[],"type":"reasoning"},{"content":[{"annotations":[],"text":"Hey there! 👋\n\nI'm here to help with a wide range of things, including:\n\n- **Answering questions** – facts, explanations, how‑tos, or deep‑dive research on almost any topic. \n- **Writing & editing** – essays, reports, blog posts, creative stories, emails, cover letters, social‑media copy, scripts, poetry, you name it. \n- **Learning & tutoring** – break down complex concepts, walk through problems step‑by‑step, generate practice questions, or create study guides. \n- **Planning & organizing** – itineraries, project outlines, to‑do lists, meal plans, budgeting spreadsheets, event schedules, etc. \n- **Technical assistance** – code snippets, debugging help, algorithm explanations, data‑analysis ideas, workflow automation, and more. \n- **Creative brainstorming** – product names, marketing slogans, game mechanics, plot twists, character backstories, design concepts. \n- **Personal guidance** – productivity tips, habit‑building strategies, career advice, interview prep, communication skills, etc. \n\nIf you have something specific in mind—or just want to explore ideas—let me know and we'll dive in together! 🚀","type":"output_text"}],"id":"msg_a24ec82c3c372942","role":"assistant","status":"completed","type":"message"}],"parallel_tool_calls":true,"service_tier":"default","status":"completed","temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled"}%
IAM
awscurl --service bedrock-mantle \
--region us-west-2 \
-X POST \
-H "Content-Type: application/json" \
-d '{
"model": "openai.gpt-oss-120b",
"input": [
{
"role": "user",
"content": "Hello! How can you help me today?"
}
]
}' \
"https://bedrock-mantle.us-west-2.api.aws/v1/responses"
takakuni@ iam % awscurl --service bedrock-mantle \
--region us-west-2 \
-X POST \
-H "Content-Type: application/json" \
-d '{
"model": "openai.gpt-oss-120b",
"input": [
{
"role": "user",
"content": "Hello! How can you help me today?"
}
]
}' \
"https://bedrock-mantle.us-west-2.api.aws/v1/responses"
{"background":false,"created_at":1766909761.0,"error":null,"id":"resp_7IKB4GCGBKJGINLHOLPIP2M2IL2IQYMRP2SMIN6K5PMCVDS37UTQ","incomplete_details":null,"instructions":null,"metadata":{},"model":"openai.gpt-oss-120b","object":"response","output":[{"content":[{"text":"The user says \"Hello! How can you help me today?\" It's a general greeting. We need to respond with a friendly greeting and explain capabilities. Use the style guidelines. Probably ask how can assist. Provide short overview.","type":"reasoning_text"}],"id":"msg_aa80debcdef3f7c3","status":"completed","summary":[],"type":"reasoning"},{"content":[{"annotations":[],"text":"Hi there! 👋 \n\nI'm here to help with a wide range of tasks, such as:\n\n* **Answering questions** – facts, explanations, troubleshooting, or quick look‑ups. \n* **Writing & editing** – drafts, emails, essays, reports, creative pieces, or polishing existing text. \n* **Learning & tutoring** – breaking down concepts, generating practice problems, or guiding you through step‑by‑step solutions. \n* **Planning & organization** – to‑do lists, schedules, project outlines, travel itineraries, recipes, etc. \n* **Coding assistance** – explaining code, debugging, writing snippets, or teaching programming concepts. \n* **Fun & brainstorming** – ideas for stories, games, gifts, hobbies, or just a friendly chat.\n\nWhat would you like to work on or discuss today?","type":"output_text"}],"id":"msg_8c819d9e7b34b057","role":"assistant","status":"completed","type":"message"}],"parallel_tool_calls":true,"service_tier":"default","status":"completed","temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled"}
Summary
That's all for "Amazon Bedrock now supports OpenAI's Responses API."
I'm very curious about Project Mantle.
I wonder if Bedrock will continue to support native SDKs provided by LLM providers like this in the future.
Looking forward to it. This was Takakuni (@takakuni_) from the Cloud Business Division Consulting Department!



