Appearance
Authentication
Pixapi uses API keys with standard Bearer authentication.
http
Authorization: Bearer $PIXAPI_KEYCreate a key
- Sign in to the Pixapi dashboard.
- Open Settings -> API Keys.
- Create a key and copy it immediately.
- Store it in your server environment.
bash
export PIXAPI_KEY="sk_..."Send the header
bash
curl https://api.pixapi.ai/v1/models \
-H "Authorization: Bearer $PIXAPI_KEY"Key safety
- Never put a Pixapi key in client-side JavaScript.
- Rotate keys from API Keys when a teammate leaves or a deployment secret is exposed.
- Use separate API keys for development, staging, and production.
- Add your own per-user limits before forwarding requests from your app to Pixapi.
Invalid credentials
Invalid or missing credentials return 401 Unauthorized.
json
{
"error": {
"code": "unauthorized",
"message": "Invalid API key."
}
}