API Keys
All API requests require authentication using a Bearer token.Getting your API key
- Sign in at classer.ai
- Go to API Keys
- Click “Create API Key”
- Copy and store the key securely
Using your API key
Environment variable (recommended)
Direct configuration
HTTP header
For direct API calls, include the key in theAuthorization header:
Security best practices
Never commit API keys to git
Never commit API keys to git
Use environment variables or a secrets manager. Add
.env to your .gitignore.Use different keys for dev and production
Use different keys for dev and production
Create separate API keys for each environment.
Rotate keys periodically
Rotate keys periodically
Delete old keys and create new ones regularly.
Set key expiration
Set key expiration
When creating a key, set an expiration date for added security.
Error responses
| Status | Description |
|---|---|
401 Unauthorized | Missing or invalid API key |
403 Forbidden | API key doesn’t have permission |
429 Too Many Requests | Rate limit exceeded |