Skip to navigation

Authentication

Secure every request with a bearer token using your EmpirioLabs API key

All EmpirioLabs API requests must include a bearer token in the Authorization header.

API key format

API keys use the sk-empiriolabs- prefix. You can generate up to 50 API keys per account from the dashboard.

Authorization: Bearer sk-empiriolabs-...

Header format

Include the header on every request:

curl "https://api.empiriolabs.ai/v1/models" \
-H "Authorization: Bearer sk-empiriolabs-your_key_here"

Sign in instead of copying a key

  • Your own coding agents: the EmpirioLabs AI CLI signs in with your browser and starts Claude Code, Codex CLI, Gemini CLI and other agents already connected.
  • Apps you build for other people: with Sign in with EmpirioLabs AI, your users connect their account through OAuth 2.1 and your app receives an access token of its own, which they can disconnect under Settings > Connected applications.
  • MCP clients such as Claude and ChatGPT connect the same way: see MCP Server.

Rate limits

Each account starts with default rate limits:

LimitDefault
Requests per minute50 RPM
Tokens per minute2,000,000 TPM

If you need higher limits, email support@empiriolabs.ai. See Limits and API Keys for full details.

  • Generate separate API keys for production, staging, and development
  • Rotate keys on a regular schedule and immediately after suspected exposure
  • Store keys in a secret manager or deployment platform; never in client-side code, public repos, or logs
  • Delete unused keys from the dashboard promptly

Test your credentials

A quick way to verify your key is working:

curl "https://api.empiriolabs.ai/v1/account/usage?limit=1" \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY"

A 200 response with your balance confirms the key is valid; 401 means it is missing, mistyped or deleted. The model list at /v1/models is public, so it answers without a key and cannot confirm one.

Common authentication responses

Status codeMeaningWhat to do
401 UnauthorizedThe token is missing, malformed, or not foundVerify the Authorization: Bearer sk-empiriolabs-... header format and that the key exists in your dashboard
402 Payment RequiredThe account has insufficient creditsTop up credits on the dashboard Billing page
429 Too Many RequestsRate limit exceeded (50 RPM default)Retry with exponential backoff and review your request volume

For the complete list of status codes across every endpoint, see Errors and Status Codes.