X-API-Key header and you’re ready to go. There are no tokens to refresh or OAuth flows to manage.
Generate an API key
- Sign in to pioneer.ai.
- Go to Settings → API Keys.
- Click Create key, give it a name, and copy the key value.
Pass the key in requests
Include your API key in theX-API-Key header on every request. The examples below show the same inference call in curl, Python, and JavaScript.
Authentication errors
| Status | Meaning |
|---|---|
401 Unauthorized | The X-API-Key header is missing or the key is invalid. Check that you’re sending the header and that the key hasn’t been revoked. |
402 Payment Required | Your account has insufficient credits. Upgrade your plan or add credits in Settings → Billing. |
Manage API keys via the API
You can also create, list, and revoke API keys programmatically using your existing key. Create a new keyRevocation is immediate and permanent. Any requests using the revoked key will receive a
401 error. Create a replacement key before revoking an existing one if you need uninterrupted access.Security recommendations
- Use one key per environment (development, staging, production).
- Revoke keys immediately if you suspect they’ve been exposed.
- Avoid passing keys as query parameters — always use the
X-API-Keyheader. - In production, retrieve keys from a secrets manager rather than from environment variables baked into container images.

