API Keys
All API requests require authentication using an API key. Include your key in theAuthorization header:
Getting Your API Key
- Log in to your LemonData Dashboard
- Navigate to API Keys section
- Click Create New Key
- Give your key a descriptive name
- Copy the key immediately - it’s only shown once
Using API Keys
API Key Features
Usage Limits
You can set a usage limit on each API key to control spending:| Setting | Description |
|---|---|
| No Limit | Key uses your account balance without restrictions |
| Fixed Limit | Key stops working after reaching the specified amount |
Key Prefix
All LemonData API keys start withsk- prefix. The key format is:
Anthropic API Compatibility
For Anthropic-style requests, you can also use thex-api-key header:
Error Responses
| Status Code | Error Type | Description |
|---|---|---|
| 401 | unauthorized | Missing or invalid API key |
| 401 | invalid_api_key | API key format is incorrect |
| 401 | expired_api_key | API key has been revoked or expired |
| 402 | insufficient_balance | Account balance is insufficient |
| 402 | quota_exceeded | API key usage limit reached |