How to create a Bedrock API key to use in Ozeki AI Gateway
This guide demonstrates how to create an Amazon Bedrock API key and configure it in Ozeki AI Gateway. You'll learn how to access the AWS console, generate a new API key for Bedrock, and set up Amazon Bedrock as a provider in your gateway. By following these steps, you can connect your Ozeki AI Gateway to Amazon's Bedrock AI models and services.
API URL: https://bedrock-mantle.{region}.api.aws/v1
Example API Key: abc123...
Default model: openai.gpt-oss-120b
What is an Amazon Bedrock API key?
An Amazon Bedrock API key is a unique authentication credential provided by AWS that allows applications to access foundation models from various AI providers through Amazon's Bedrock service. The API key serves as a secure token that identifies your AWS account and authorizes API requests. When configuring Amazon Bedrock as a provider in Ozeki AI Gateway, you need this API key to establish the connection between your gateway and Bedrock's services.
Steps to follow
- Open AWS console
- Search Amazon Bedrock
- Open API keys
- Generate Long-term API key
- Set expiry date
- Copy API key
- Open Providers page in Ozeki AI Gateway
- Create provider
How to Create a Bedrock API key video
The following video shows how to create an Amazon Bedrock API key and configure it in Ozeki AI Gateway step-by-step. The video covers accessing the AWS console, generating a new API key, and setting up Bedrock as a provider in your gateway.
Step 0 - Install Ozeki AI Gateway
Before configuring Amazon Bedrock as a provider, you need to have Ozeki AI Gateway installed and running on your system. If you haven't installed Ozeki AI Gateway yet, follow our Installation on Linux guide or Installation on Windows guide to complete the initial setup. You also need an active AWS account, if you don't have one, visit aws.amazon.com to create an account before proceeding.
Step 1 - Open AWS console
Open your web browser and navigate to the AWS console. Sign in with your AWS account credentials. If you don't have an account, you'll need to create one before proceeding. The AWS console is where you'll manage all your Amazon Web Services resources, including Bedrock API keys (Figure 1).
Step 2 - Search Amazon Bedrock
Use the search bar at the top of the AWS console to search for "Amazon Bedrock" and click on it to access the service page. Amazon Bedrock provides access to foundation models from leading AI companies through a unified API (Figure 2).
Step 3 - Open API keys
In the Amazon Bedrock service page, locate and click on "API keys" in the left sidebar navigation menu. This section allows you to create and manage authentication credentials for accessing Bedrock models through API requests (Figure 3).
Step 4 - Choose Long-term API key
On the API keys page, select "Long-term API key" as the key type. Long-term keys are suitable for production applications and gateway integrations like Ozeki AI Gateway. These keys remain valid until their expiration date, making them ideal for continuous service access (Figure 4).
Click the Generate button to begin the API key creation process. This initiates the key generation workflow where you'll configure the key's expiration date and retrieve the generated credentials (Figure 5).
Step 5 - Set expiry date
Select an expiration date for your API key. Choose a date that balances security with operational convenience - shorter expiration periods are more secure but require more frequent key rotation. For production environments, consider setting a reasonable expiration date and establishing a key rotation schedule (Figure 6).
Step 6 - Copy API key
After the API key is generated, AWS displays the complete key value. Click the copy button to copy the API key to your clipboard. Store this key securely as it provides access to your AWS Bedrock resources. Note the region-specific endpoint URL as you'll need it for the gateway configuration (Figure 7).
The API key is shown only once during creation. Make sure to copy and securely store the key before closing this window.
Step 7 - Open Providers page in Ozeki AI Gateway
Open the Ozeki AI Gateway web interface and navigate to the Providers page. This is where you'll configure Amazon Bedrock as a new provider using the API key you just created (Figure 8).
Step 8 - Create provider
Click the "New" button to begin the provider creation process. This opens a form where you'll enter the connection details for Amazon Bedrock (Figure 9).
Fill in the provider configuration form with your Amazon Bedrock details. Enter the provider name, select "OpenAI compatible" as the provider type, paste the region-specific Bedrock endpoint URL (replace {region} with your AWS region, such as eu-north-1), and paste your API key. Select your preferred Bedrock model from the dropdown list, then click "Create" to save the configuration (Figure 10).
https://bedrock-mantle.{region}.api.aws/v1
After clicking "Create", the Amazon Bedrock provider is added to Ozeki AI Gateway. The provider now appears in the providers list, confirming that your gateway can route requests to Amazon Bedrock services. You can now create routes that allow users to access Bedrock models through your gateway (Figure 11).
To sum it up
You have successfully created an Amazon Bedrock API key and configured it as a provider in Ozeki AI Gateway. Your gateway can now communicate with Amazon Bedrock services and access foundation models from various AI providers including Anthropic Claude, Amazon Titan, and others. This setup allows you to manage Bedrock access for multiple users and applications from a single point.