Getting Your API Key
- Sign in to your genui.sh dashboard
- Navigate to Settings > API Keys
- Click Create New Key
- Copy and securely store your API key
Using Your API Key
Include your API key in theAuthorization header of all requests:
Best Practices
Use environment variables
Use environment variables
Never hardcode API keys in your source code. Use environment variables instead:
Rotate keys regularly
Rotate keys regularly
Generate new API keys periodically and revoke old ones from the dashboard.
Use separate keys for different environments
Use separate keys for different environments
Create separate API keys for development, staging, and production environments.
Monitor usage
Monitor usage
Check your dashboard regularly to monitor API usage and detect any anomalies.
Error Responses
If authentication fails, you’ll receive one of these responses:| Status Code | Error | Description |
|---|---|---|
| 401 | unauthorized | Missing or invalid API key |
| 403 | forbidden | API key doesn’t have permission for this resource |
| 429 | rate_limited | Too many requests, slow down |
Rate Limits
API requests are rate limited based on your plan:| Plan | Requests per minute |
|---|---|
| Free | 60 |
| Pro | 600 |
| Enterprise | Custom |