Skip to navigation

The console offers two Bedrock providers. Amazon Bedrock calls the Bedrock Runtime API, where clients send Anthropic Messages requests to a model’s invoke endpoint. Amazon Bedrock Mantle calls Bedrock’s OpenAI-compatible API. The gateway forwards each request unchanged and signs it with your AWS credentials. This topic lists what’s specific to Bedrock. For the setup steps, see Connect an LLM provider.

Target URL

ProviderTarget URL
Amazon Bedrockhttps://bedrock-runtime.REGION.amazonaws.com, for example https://bedrock-runtime.us-east-1.amazonaws.com
Amazon Bedrock Mantlehttps://bedrock-mantle.REGION.api.aws

The console reads the AWS region from the target URL and uses it as the default region for the credentials.

Credentials

When you set up credentials, choose one of the following auth types.

Auth typeWhat you enterHow the gateway authenticates
AWS Access KeyAn access key ID, a secret access key, an optional session token, and the region.Signs each request with AWS Signature Version 4.
Bedrock API KeyA Bedrock API key and the region.Sends Authorization: Bearer <key>.
AWS Assumed RoleA role ARN, an optional external ID, and the region.Assumes the role and signs each request with AWS Signature Version 4.
AWS service roleNothing.Signs each request with the data plane’s own AWS identity.

AWS Assumed Role and the service role rely on the AWS identity of the machine that runs the data plane, so they’re offered only on the Enterprise plan, where the data plane runs in your VPC. On the Free plan, use an access key or a Bedrock API key. A Private network connection offers its own assumed-role auth type. See Connect to a provider over a private network.

The gateway signs the request after every other change, so the signature covers the headers it forwards. Any Authorization header that the client sent is replaced.

Supported endpoints

Amazon Bedrock:

MethodPathRequest format
POST/model/MODEL_ID/invokeAnthropic Messages
POST/model/MODEL_ID/invoke-with-response-streamAnthropic Messages, streamed as an AWS event stream
POST/openai/v1/chat/completionsOpenAI chat completions

Amazon Bedrock Mantle:

MethodPathRequest format
POST/v1/chat/completionsOpenAI chat completions
POST/v1/responsesOpenAI Responses
POST/openai/v1/responsesOpenAI Responses
POST/anthropic/v1/messagesAnthropic Messages
GET/v1/models

Model IDs

On the invoke endpoints, the model is part of the URL path, for example /model/anthropic.claude-3-5-haiku-20241022-v1:0/invoke. The gateway reads it from the path, so a model restriction on the connection applies to it the same way as to a model field in the body. Use the Bedrock model ID or inference profile ID that you would send to Bedrock directly, and list the same IDs if you restrict models.

The request body follows Bedrock’s rules for Anthropic models, so it includes anthropic_version and doesn’t include model. The gateway forwards the body unchanged.

On the OpenAI-compatible endpoints, the model is the model field in the body.

Example

curl "BASE_URL/model/anthropic.claude-3-5-haiku-20241022-v1:0/invoke" \
-H "fg-api-key: GATEWAY_KEY" \
-H "Content-Type: application/json" \
-d '{
"anthropic_version": "bedrock-2023-05-31",
"max_tokens": 256,
"messages": [{ "role": "user", "content": "Hello" }]
}'

Replace BASE_URL with the route’s base URL and GATEWAY_KEY with your gateway key. For how to find both, see Authenticate and send a request.

Next steps