Documentation Menu
API Keys
Create and manage API keys for programmatic access to BrainRoad's infrastructure API.
On this page
What API Keys Are For
API keys authenticate requests to BrainRoad’s infrastructure API — the endpoints that control your agent’s lifecycle and billing. They are not the same as your AI provider keys (Anthropic, OpenAI) or your gateway token.
Use API keys when you want to:
- Start or stop your agent from a script or CI/CD pipeline
- Check your agent’s status programmatically
- Subscribe to real-time events via SSE
- Query billing information from external tools
Creating an API Key
- Go to Dashboard → API
- Enter a descriptive name (e.g., “GitHub Actions”, “Monitoring Script”)
- Click Create
- Copy the key immediately — it will not be shown again
Keys use the brk_ prefix followed by 64 hex characters. They are stored as SHA-256 hashes — BrainRoad never stores your raw key.
Managing Keys
- You can create up to 10 active keys per account
- Each key shows its name, prefix (first 12 characters), and last-used timestamp
- Revoke any key instantly from the API page — revoked keys are rejected immediately
- Create separate keys for different systems so you can revoke one without affecting others
Using API Keys
Pass your key as a Bearer token in the Authorization header:
curl https://app.brainroad.com/api/v1/agent/status \
-H "Authorization: Bearer brk_your_key_here"
All /api/v1/ endpoints require an API key. Dashboard endpoints (creating/revoking keys) use your browser session instead.