Authentication
Every request to the Chowder API requires an API key passed as a Bearer token:Organization keys
Prefix:chd_org_*
Organization keys are the master keys. They have full, unrestricted access to everything in your organization: instances, channels, skills, files, billing, other keys — everything.
You get one automatically when you sign up:
- Backend services that manage instances
- Admin dashboards
- CI/CD pipelines
- Anything that needs full control
- Client-side code
- User-facing frontends
- Anything where the key could be exposed
Scoped keys
Prefix:chd_sk_*
Scoped keys are restricted keys. They only work with specific instances and only have specific permissions. This is what you hand out when you don’t want to give away the kingdom.
Permissions
Each scoped key gets a set of permissions that control what it can do:- Chat-only key
- Admin key
- File manager key
For a frontend that just needs to send and receive messages:
Expiration
Scoped keys can optionally expire:403.
How keys are stored
Chowder never stores raw API keys. Here’s what happens:1
Key generation
A cryptographically random key is generated with the appropriate prefix (
chd_org_ or chd_sk_).2
Hash storage
The key is hashed with SHA-256. Only the hash is stored in the database.
3
Key returned once
The raw key is returned in the creation response. This is the only time you’ll see it.
4
Authentication
On each request, Chowder hashes the key from the
Authorization header and looks up the hash in the database.This means Chowder cannot recover your key. If you lose it, revoke it and create a new one. This is by design — it protects you even if the database is compromised.
Managing keys
Which key should I use?
Use an org key when...
You’re building backend services, admin tools, or anything that runs on infrastructure you control. The key never leaves your server.
Use a scoped key when...
You’re building user-facing apps, chat widgets, or anything where the key might be visible in network requests. Lock it down to specific instances and minimum permissions.