Skip to main content

Overview

API keys authenticate your requests to the a21e API. Each key is scoped to your user account and optionally bound to a specific workspace.

Creating a key

  1. Go to Settings > API Keys in the dashboard
  2. Click Create API key
  3. Optionally bind the key to a workspace (for automatic preference and repo context)
  4. Copy the key — it’s only shown once
Or via API:

Key format

a21e API keys use the prefix a21e_ followed by a random string:

Authentication

Include your API key in the Authorization header:

Workspace-bound keys

When you bind a key to a workspace, all requests with that key automatically inherit:
  • Repository context (if a repo is connected)
  • Workspace preferences (model tier, verbosity, etc.)
  • Persona directives
  • Org-level policies
This is useful for CI/CD integrations or team-shared keys where you want consistent behavior.

Revoking a key

Revoked keys immediately stop working. Active sessions using the key will fail on their next request.

Security best practices

  • Never commit API keys to source control
  • Use workspace-bound keys for production services
  • Rotate keys periodically
  • Use separate keys for development and production