AI Gateway can send requests to either of the two Amazon Bedrock inference endpoints, Runtime (the default) or Mantle, depending on the endpoint_type in the target config of an AI Model.
Use mantle when your clients already send OpenAI or Anthropic API requests and you want Bedrock Mantle to handle them natively, for example, to run the OpenAI Codex CLI against models on Bedrock.
Keep runtime for Bedrock-native clients, for the Bedrock-specific APIs such as Rerank, async invoke, and batch, and for any model that doesn’t support Mantle.
Mantle only supports chat, Responses, and files requests, in the openai or anthropic format. For embeddings, the bedrock format, and Bedrock-specific APIs such as Rerank, async invoke, and batch, use runtime.
The format and capability of the AI Model determine which Mantle API receives the request:
| Format |
Capability |
Request type |
openai |
generate |
Chat Completions |
openai |
agentic |
Responses |
openai |
files |
Files |
anthropic |
generate |
Messages |
The files capability is available only on an AI Model with type: api. The other capabilities are set on an AI Model with type: model.
For Anthropic requests, AI Gateway sets the anthropic-version header to 2023-06-01 unless the client sends one.
If you set upstream_url on a Mantle target, AI Gateway keeps that URL’s path.
The following AI Model sends OpenAI Chat Completions requests to Bedrock Mantle:
curl -X POST https://{region}.api.konghq.com/v1/ai-gateways/{AIGatewayId}/models \
--header "accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $KONNECT_TOKEN" \
--data '
{
"name": "my-mantle-model",
"display_name": "My Mantle model",
"type": "model",
"formats": [
{
"type": "openai"
}
],
"capabilities": [
"generate"
],
"config": {
"route": {
"paths": [
"/v1"
],
"model": {
"body_param": "model",
"values": [
"my-mantle-model"
]
}
}
},
"targets": [
{
"name": "'$MANTLE_MODEL_ID'",
"provider": "my-aws-account",
"config": {
"type": "bedrock",
"region": "us-east-1",
"endpoint_type": "mantle"
}
}
]
}
'
ai_gateway_models:
- ref: my-mantle-model
ai_gateway: !lookup {id: !env AI_GATEWAY_ID}
name: my-mantle-model
display_name: My Mantle model
type: model
formats:
- type: openai
capabilities:
- generate
config:
route:
paths:
- "/v1"
model:
body_param: model
values:
- my-mantle-model
targets:
- name: !env MANTLE_MODEL_ID
provider: my-aws-account
config:
type: bedrock
region: us-east-1
endpoint_type: mantle
Make sure to replace the following placeholders with your own values:
For a complete walkthrough, see Route OpenAI traffic to Amazon Bedrock Mantle.