Authentication
All requests to the Bastyn Public API require an API key passed in the Authorization header.
API Key format
Authorization: Bearer bastyn_sk_your_key_hereCreating an API key
- Log in to app.bastyn.ai
- Go to Settings → Environments
- Enter a name (e.g.
CI/CD Pipeline,Production) - Click Create API Key
- Copy the key immediately — it is shown only once
Revoking a key
Go to Settings → Environments and click the trash icon next to the key. Revocation takes effect immediately.
Security best practices
- Store keys in environment variables or CI/CD secrets — never in source code
- Create one key per environment (local, staging, production)
- Rotate keys periodically and after any suspected exposure