API Keys
All LemonData API requests require an API key. For OpenAI-compatible endpoints, send it as:/v1/messages requests, you can also use:
Management Tokens
Management API endpoints use a separate token type:/v1/management/* endpoints. They are created from the Settings page in your Dashboard and are shown in full only once when generated or rotated.
Management tokens cannot be used for model inference, and standard
sk-... API keys cannot be used for the Management API.Getting Your API Key
- Log in to your LemonData Dashboard
- Open API Keys
- Create a new key
- Give it a descriptive name
- Copy it immediately because it is shown only once
Using API Keys
API Key Features
Usage Limits
You can set a usage limit on each API key:| 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-.
Anthropic Compatibility
For the/v1/messages endpoint, the Anthropic-style header works as expected:
Use
Authorization: Bearer ... for OpenAI-compatible endpoints such as /v1/responses, /v1/chat/completions, /v1/models, and most other LemonData routes.Error Responses
| Status Code | Type | Code | Description |
|---|---|---|---|
| 401 | invalid_request_error | invalid_api_key | Missing or invalid API key |
| 401 | invalid_request_error | expired_api_key | API key has been revoked |
| 402 | insufficient_quota | insufficient_quota | Account balance is insufficient |
| 402 | insufficient_quota | quota_exceeded | API key usage limit reached |