There are 2 ways to add your AWS Bedrock credentials to your requests:

Add it from the UI

1

Go to the Credentials page

2

Add your AWS Bedrock credentials.

Dashboard Page
3

(Optional) Choose models you want to use credits

You can choose the models you want to use your credits with. Just simply type the model ID from the Models page and copy the model id and paste it in the Available models. Press Enter to add the model.

Leave it empty to apply your credentials for all AWS Bedrock models.

Dashboard Page

Add it in code

Add customer_credentials parameter in your request body to use your own AWS Bedrock credits.

{
  // Rest of the request body
  "customer_credentials": {
    "bedrock": {
      "aws_access_key_id": "aws_access_key_id",
      "aws_secret_access_key": "aws_secret_access_key",
      "aws_region_name": "aws_region_name",
    }
  }
}

Override credentials for a particular model. (Optional)

One-off credential overrides. Instead of using what is uploaded for each provider, this targets credentials for individual models.

{
  // Rest of the request body
  "customer_credentials": {
    "bedrock": {
      "aws_access_key_id": "aws_access_key_id",
      "aws_secret_access_key": "aws_secret_access_key",
      "aws_region_name": "aws_region_name",
    }
  },
  "credential_override": {
    "bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0":{ // override for a specific model.
      "aws_access_key_id": "another_aws_access_key_id",
      "aws_secret_access_key": "another_aws_secret_access_key",
      "aws_region_name": "another_aws_region_name",
    }
  }
}

Requirements

  1. Ensure your deployment name matches those listed on our Models page.
  2. Confirm that your models are available in the region specified by your credentials.
    Credentials validation is not supported. Failure to comply with these requirements will result in errors!

How to get your AWS Bedrock credentials

  1. Go to https://aws.amazon.com/ and click on Sign In to the Console.
  2. Choose your region and click on Security credentials in the top right corner.
  3. Click on Access keys and then Create New Access Key.
  4. You will see your Access key ID and Secret access key. Copy these values and use them in the aws_access_key_id and aws_secret_access_key fields in the request body.
  5. You can find your aws_region_name in the URL of the AWS console. For example, if the URL is https://us-west-2.console.aws.amazon.com/, then the aws_region_name is us-west-2.