Authentication
Fizzly API uses Bearer Token authentication, fully compatible with OpenAI API.
Bearer Token Authentication
Add the Authorization header to your requests:
Authorization: Bearer your-api-keyExample Request
curl https://api.fizzly.com/v1/chat/completions \
-H "Authorization: Bearer sk-xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Hello!"}]
}'API Key Types
| Type | Prefix | Permissions |
|---|---|---|
| Standard Key | sk- | Full API access |
| Restricted Key | rk- | Custom permission scope |
Security Best Practices
🚫
Important Security Notice
- Never hardcode API Keys in client-side code
- Use environment variables to store API Keys
- Rotate API Keys regularly
- Use different API Keys for different environments
Error Responses
Authentication failures return the following error:
{
"error": {
"message": "Invalid API key provided",
"type": "invalid_request_error",
"code": "invalid_api_key"
}
}| HTTP Status | Description |
|---|---|
| 401 | Invalid or expired API Key |
| 403 | API Key lacks required permissions |
| 429 | Rate limit exceeded |