Authentication
API keys, organizations, and projects in Cerebe.
Authentication
All Cerebe API requests require an API key sent via the X-API-Key header.
API Key Format
ck_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ1234567890abc
│ │ └── 43 characters of randomness (258-bit entropy)
│ └── environment: live, test, admin
└── cerebe key prefixck_live_— Production keysck_test_— Development/testing keysck_admin_— Organization management keys
Making Requests
from cerebe import AsyncCerebe
# API key from environment variable (recommended)
client = AsyncCerebe() # reads CEREBE_API_KEY
# Or pass explicitly
client = AsyncCerebe(api_key="ck_live_...")curl https://api.cerebe.ai/api/v1/memory/search \
-H "X-API-Key: ck_live_..." \
-H "Content-Type: application/json" \
-d '{"query": "hello", "session_id": "test"}'Organizations & Projects
Cerebe uses an Org > Project > Key hierarchy:
Organization (org_xxx)
└── Project (proj_xxx) # development, staging, production
└── API Key (ck_live_xxx)- Organizations — Your team or company
- Projects — Isolated environments (dev, staging, prod)
- API Keys — Scoped to a project with specific permissions
Scopes
API keys have permission scopes that control access:
| Scope | Description |
|---|---|
memory:read | Read/search memories |
memory:write | Store/update/delete memories |
knowledge:read | Query knowledge graph |
knowledge:write | Ingest into knowledge graph |
storage:read | Download files |
storage:write | Upload files |
admin:* | Full admin access |
Rate Limiting
Every response includes rate limit headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 847
X-RateLimit-Reset: 1709827200When you hit the limit, you'll receive a 429 response with a Retry-After header.
Environment Variables
The SDKs automatically read these environment variables:
| Variable | Description |
|---|---|
CEREBE_API_KEY | Your API key |
CEREBE_PROJECT | Project ID (optional) |
CEREBE_BASE_URL | API base URL (default: https://api.cerebe.ai) |