Overview
Anannas uses Bearer token authentication via theAuthorization header. All API requests require a valid API key.
API Keys
API keys are generated in the Anannas dashboard. Each key is associated with:- User account and organization
- Credit limits and billing
- Rate limits based on tier
- Usage tracking and analytics
Authentication Header
Include your API key in theAuthorization header:
Example
Security Best Practices
Store Keys Securely
Never commit API keys to version control. Use environment variables:Key Rotation
If a key is compromised:- Immediately revoke the key in the dashboard
- Generate a new key
- Update your application configuration
- Monitor for unauthorized usage
Key Scope
API keys have full access to:- All models available to your account
- Credit balance and billing
- Usage analytics
- Rate limit quotas
Error Responses
401 Unauthorized
Invalid or missing API key:- Missing
Authorizationheader - Invalid key format
- Revoked or expired key
- Key not associated with active account
402 Payment Required
Insufficient credits:Multiple Keys
You can create multiple API keys for:- Different environments (development, staging, production)
- Different applications or services
- Team members with separate usage tracking
Key Management
Manage keys in the dashboard:- Create new keys
- Revoke existing keys
- View key usage and statistics
- Set key-specific rate limits (if supported)