You can proxy requests to Amazon Bedrock AI models through AI Gateway by creating AI Model Provider and AI Model entities. This reference documents all supported AI capabilities, configuration requirements, and provider-specific details needed for proper integration.
Amazon Bedrock provider
Upstream paths
AI Gateway automatically routes requests to the appropriate Amazon Bedrock API endpoints. The following table shows the upstream paths used for each capability.
|
Capability |
Path template |
Description |
Upstream path or API |
|---|---|---|---|
| Generate |
/chat/completions, /completions, or /responses
|
Text generation for chat completions and responses |
Uses the Converse and ConverseStream API
|
| Embeddings |
/embeddings
|
Vector embeddings from text input |
Uses the InvokeModel and InvokeWithResponseStream API
|
| Image |
/images/generations or /images/edits
|
Image generation and editing |
Uses the InvokeModel API
|
| Video |
/videos
|
Video generation |
Uses the StartAsyncInvoke API
|
| Batches |
/batches
|
Batch processing of requests |
Uses the ModelInvocationJob API
|
| Files |
/files
|
File management and storage |
/openai/files
|
Supported capabilities
The following tables show the AI capabilities supported by the Amazon Bedrock provider when configuring AI Models.
By default, AI Gateway uses the path templates shown in the tables below (e.g.,
/chat/completions,/embeddings, etc.). To customize these paths, configure theconfig.pathsfield in your AI Model entity. Custom paths take the form{configured_path}/{template_path}— for example, if you set a custom path of/v2, requests to/embeddingswould be routed to/v2/embeddings.
Text generation
Support for Amazon Bedrock text generation capabilities:
|
Capability |
Streaming |
Model example |
Path template |
Min version |
|---|---|---|---|---|
| generate | Supported | Use the model name for the specific LLM provider |
/chat/completions, /completions, or /responses
|
2.0 |
Embeddings
Support for Amazon Bedrock embeddings generation:
|
Capability |
Model example |
Path template |
Min version |
|---|---|---|---|
| embeddings | Use the model name for the specific LLM provider |
/embeddings
|
2.0 |
Image
Support for Amazon Bedrock image generation and editing capabilities:
|
Capability |
Model example |
Path template |
Min version |
|---|---|---|---|
| image | Use the model name for the specific LLM provider |
/images/generations or /images/edits
|
2.0 |
For requests with large payloads, consider increasing
config.max_request_body_sizeon your AI Model entity to three times the raw binary size.Supported image sizes and formats vary by model. Refer to your provider’s documentation for allowed dimensions and requirements.
Video
Support for Amazon Bedrock video generation capabilities:
|
Capability |
Model example |
Path template |
Min version |
|---|---|---|---|
| video | Use the model name for the specific LLM provider |
/videos
|
2.0 |
For requests with large payloads (video generation), consider increasing
config.max_request_body_sizeon your AI Model entity to three times the raw binary size.
Batches
Support for Amazon Bedrock batch processing capabilities:
|
Capability |
Model example |
Path template |
Min version |
|---|---|---|---|
| batches1 | n/a |
/batches
|
2.0 |
1 Batches processing for Bedrock is supported in the native format from SDK only
Batches are configured on a separate AI Model with
type: "api", distinct from regular models that handle synchronous capabilities like generate and embeddings. Create a dedicated AI Model exclusively for batches and files, as each model must be either a regular model or an API model, not both.
Files
Support for Amazon Bedrock file management capabilities:
|
Capability |
Model example |
Path template |
Min version |
|---|---|---|---|
| files2 | n/a |
/files
|
2.0 |
2 Amazon Bedrock does not have a dedicated files API. File storage uses Google Cloud Storage, similar to AWS S3.
Batches are configured on a separate AI Model with
type: "api", distinct from regular models that handle synchronous capabilities like generate and embeddings. Create a dedicated AI Model exclusively for batches and files, as each model must be either a regular model or an API model, not both.## Amazon Bedrock base URL
The base URL is https://bedrock-runtime.{region}.amazonaws.com.
AI Gateway uses this URL automatically. You only need to configure a URL if you’re using a self-hosted or Amazon Bedrock-compatible endpoint, in which case set the upstream_url option in your AI Model configuration.
Supported native LLM formats for Amazon Bedrock
By default, AI Gateway uses OpenAI-compatible request formats. Configure a native format in your AI Model to use Amazon Bedrock-specific APIs and features.
The following native Amazon Bedrock formats are supported:
|
LLM format |
Supported APIs |
|---|---|
bedrock
|
|
Statistics logging limitations for native formats
- Statistics logging is not available for image generation or editing APIs for Amazon Bedrock
Configure Amazon Bedrock
To use Amazon Bedrock with AI Gateway, configure a new AI Model Provider. You can then access supported AI Models from Amazon Bedrock.
Here’s a minimal configuration for chat completions:
Authentication with AWS
You can also use Amazon Bedrock with AWS credentials by setting auth to aws and specifying:
access_key_id(optional): AWS access key ID for static IAM user credentials. If omitted, the default AWS credentials provider chain is used (EC2 instance profiles, environment variables, etc.).secret_access_key(optional): AWS secret access key paired withaccess_key_id. Required ifaccess_key_idis set.assume_role_arn(optional): IAM role ARN to assume for temporary credentials. Useful for cross-account access.role_session_name(optional): Session name for the assumed role. Required ifassume_role_arnis set.sts_endpoint_url(optional): Custom STS endpoint for role assumption. Defaults tohttps://sts.amazonaws.com.batch_role_arn(optional): Separate role ARN for Bedrock batch API calls.
FAQs
How do I specify model IDs for Amazon Bedrock cross-region inference profiles?
For cross-region inference with Amazon Bedrock, prefix the model ID with a geographic identifier in your AI Model configuration:
{geography-prefix}.{provider}.{model-name}...For example: us.anthropic.claude-sonnet-4-5-20250929-v1:0
|
Prefix |
Geography |
|---|---|
us.
|
United States |
eu.
|
European Union |
apac.
|
Asia-Pacific |
global.
|
All commercial regions |
For a full list of supported cross-region inference profiles, see Supported Regions and models for inference profiles in the AWS documentation.
How do I set the FPS parameter for video generation for Amazon Bedrock?
Use the extra_body feature when sending requests to an AI Model that proxies Amazon Bedrock video generation in OpenAI format:
curl http://localhost:8000 \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "amazon.nova-reel-v1:0",
"prompt": "A large red square that is rotating",
"extra_body": {
"fps": 24
}
}'How do I include guardrail configuration with Amazon Bedrock requests?
Add a guardrailConfig object to your request body when calling an AI Model that proxies Amazon Bedrock:
{
"messages": [
{
"role": "system",
"content": "You are a scientist."
},
{
"role": "user",
"content": "What is the Boltzmann equation?"
}
],
"guardrailConfig": {
"guardrailIdentifier": "$GUARDRAIL-IDENTIFIER",
"guardrailVersion": "1",
"trace": "enabled"
}
}For more details, see Guardrails and content safety and the AWS Bedrock guardrails documentation.
How do I use Amazon Bedrock’s Rerank API to improve RAG retrieval quality?
Configure an AI Model with a Bedrock AI Model Provider and set up AWS authentication using IAM credentials or assumed roles.