docsAPI ReferenceAuthentication

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-key

Example 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

TypePrefixPermissions
Standard Keysk-Full API access
Restricted Keyrk-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 StatusDescription
401Invalid or expired API Key
403API Key lacks required permissions
429Rate limit exceeded