API Key Authentication
All requests to the Rose API require an API key passed in thex-api-key header.
Getting Your API Key
- Sign up at roselabs.ai
- Subscribe to any plan
- Go to Settings > API Keys
- Your first key is auto-generated when you subscribe
- Click Generate New Key to create additional keys
Managing API Keys
From the Settings page, you can:- View keys: Keys are masked for security (only last 4 characters shown)
- Generate new keys: Create additional keys with optional names
- Delete keys: Remove keys you no longer need
Subscription Requirements
API access requires an active Rose Labs subscription. Without a subscription:- Requests will return a
401 Unauthorizederror - You’ll need to subscribe at roselabs.ai
Security Best Practices
Never expose keys in client-side code
Never expose keys in client-side code
API keys should only be used in server-side code. Never include them in frontend JavaScript, mobile apps, or public repositories.
Use environment variables
Use environment variables
Store API keys in environment variables, not in source code:
Rotate keys periodically
Rotate keys periodically
Generate new keys and delete old ones regularly. If you suspect a key is compromised, delete it immediately.
Use separate keys per environment
Use separate keys per environment
Create different keys for development, staging, and production. This limits blast radius if one is compromised.