Getting Your API Key
- Go to CAMB.AI Studio
- Sign in or create an account
- Navigate to your account settings
- Generate or copy your API key
Using Your API Key
Include your API key in thex-api-key header of every request.
Header Format
Example Request
SDK Authentication
When using the official SDKs, pass your API key during client initialization.Error Responses
| Status Code | Meaning |
|---|---|
401 | Invalid or missing API key |
403 | API key doesnβt have permission for this resource |
429 | Rate limit exceeded |
Example Error Response
Best Practices
Never hardcode API keys
Never hardcode API keys
Use environment variables or secure secret management systems.
Rotate keys periodically
Rotate keys periodically
Generate new API keys regularly and revoke old ones.
Use separate keys for environments
Use separate keys for environments
Create different API keys for development, staging, and production.
Monitor usage
Monitor usage
Check your API usage in CAMB.AI Studio to detect unauthorized access.