Skip to main content

Authentication

Bedrock supports two authentication schemes. Most programmatic callers use an API key; the Bedrock portal and a handful of user-scoped endpoints use token auth.

API Key (Bearer)

API keys are scoped to your organization and grant access to every resource your organization owns — templates, agents, adapters, tracing, and default adapter state.

Getting an API Key

  1. Sign in to the Bedrock portal
  2. Navigate to API Keys
  3. Click Create API Key, give it a name (e.g., “Production”), and copy the value immediately
Save your API key immediately after creation. The full value is only displayed once and cannot be retrieved later.

Using Your API Key

Include your API key in the Authorization header with the Bearer prefix:

API Key Scope

An API key’s access follows the organization it belongs to:

Creating API Keys via API

You can also create API keys programmatically against /api/organizations/api-keys/:
Response:

Managing API Keys

List keys:
Delete a key:

Token Auth (portal / user-scoped)

The portal and the /api/organizations/auth/* endpoints use DRF’s TokenAuthentication:
Tokens are returned by:
  • POST /api/organizations/auth/signup/ — creates org + user + membership + token
  • POST /api/organizations/auth/login/ — returns a token for an existing user
  • POST /api/organizations/invites/{id}/accept/ — returns a token for the invitee
Tokens are user-scoped. They’re most useful for the portal itself; prefer an org API key for backend-to-backend traffic. Endpoints that commonly accept both (both TokenAuthentication and APIKeyAuthentication are installed): /api/organizations/organizations/, /api/organizations/api-keys/, /api/templates/.

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