Authentication
How to authenticate with the LEAPERone API.
All API requests must include your API key. LEAPERone supports two authentication methods.
Base URL
https://api.leaper.oneBearer Token (recommended)
Pass your key in the Authorization header:
curl https://api.leaper.one/v1/chat/completions \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"model":"auto","messages":[{"role":"user","content":"Hello"}]}'X-API-Key Header
Alternatively, use the X-API-Key header:
curl https://api.leaper.one/v1/chat/completions \
-H "X-API-Key: sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"model":"auto","messages":[{"role":"user","content":"Hello"}]}'Creating API Keys
You can create and manage keys in two ways:
Dashboard — go to Settings > API Keys and click Create Key.
CLI — list your existing keys from the terminal:
npx @leaperone/cli apikey listAPI keys are shown only once at creation time. Store them securely.
Error Codes
| Code | Meaning |
|---|---|
401 | Invalid or missing API key. |
402 | Insufficient credits. Top up your balance to continue. |
For full error response schemas, see the API Reference.