Skip to main content
Route Amazon Bedrock requests through the Inference Catalyst gateway to get cost tracking, latency monitoring, and analytics. Amazon Bedrock exposes OpenAI-compatible Chat Completions endpoints and Anthropic Messages endpoints on Bedrock Mantle, so you can keep using the OpenAI or Anthropic SDKs with the x-inference-provider-url header.
Prefer automatic setup? Run inf instrument to instrument your codebase in seconds. Learn more
This guide covers Bedrock Mantle with a Bedrock bearer/API key. Bedrock Runtime Converse, InvokeModel, and SigV4-only calls use different request formats and are not covered by this Gateway setup.

OpenAI-compatible Chat Completions

Use this path for Bedrock models that support the OpenAI-compatible Chat Completions API.
1

Get your API keys

You need two keys:
  • Inference Catalyst project API key — from your dashboard under API Keys
  • Amazon Bedrock API key — from your AWS account. Bedrock also recognizes this as AWS_BEARER_TOKEN_BEDROCK.
2

Set environment variables

3

Update your code

Point the SDK at the gateway. Your project API key goes in apiKey, and the x-inference-provider-url header tells the gateway to forward requests to Amazon Bedrock.
For the Bedrock Runtime OpenAI-compatible endpoint, set BEDROCK_BASE_URL to https://bedrock-runtime.${AWS_REGION}.amazonaws.com/v1.

Anthropic Messages on Bedrock

Use this path for Claude models on Bedrock that support the Anthropic Messages API. The key detail is x-inference-provider: anthropic: it tells Catalyst to use Anthropic Messages extraction and forward your Bedrock API key as downstream x-api-key.
1

Set environment variables

Reuse the same Catalyst and Bedrock keys from above, then set the Bedrock Anthropic endpoint and model:
2

Update your code

Point the Anthropic SDK at the Catalyst gateway. Keep the Bedrock key in the SDK apiKey for SDK compatibility, and also pass it as x-inference-provider-api-key so Catalyst can forward it to Bedrock as downstream x-api-key.