Authentication
All Bedrock API requests require authentication using an API key. API keys are scoped to a specific Product and grant access to manage agents within that product.Getting an API Key
API keys are created through the Bedrock dashboard or API:- Create or select a Product
- Navigate to the product’s settings
- Create a new API key with a descriptive name
Using Your API Key
Include your API key in theAuthorization header with the Bearer prefix:
Example Request
API Key Scope
Each API key is scoped to a single product. With an API key you can:| Resource | Access |
|---|---|
| Agents | Full CRUD - create, read, update, delete, run |
| Traces | Read - view agent execution traces |
| Memory | Read/Write - log messages, get memory context |
| Adapters | Read - view available adapters and tools |
| Adapter Configs | Full CRUD - configure adapters for your product |
Creating API Keys via API
You can also create API keys programmatically:Managing API Keys
List Keys
Delete a Key
Security Best Practices
Environment Variables
Store API keys in environment variables, never hardcode in source.
Server-Side Only
Never expose API keys in client-side code or public repositories.
Rotate Regularly
Create new keys and delete old ones periodically.
Descriptive Names
Name keys by environment/purpose for easy auditing.
Error Responses
| Status | Meaning |
|---|---|
401 Unauthorized | Missing or invalid API key |
403 Forbidden | Valid key but accessing another product’s resources |