LEAPERone Docs

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.one

Pass your key in the Authorization header:

Bearer Token
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:

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 list

API keys are shown only once at creation time. Store them securely.

Error Codes

CodeMeaning
401Invalid or missing API key.
402Insufficient credits. Top up your balance to continue.

For full error response schemas, see the API Reference.