API Keys
All TokenLab 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. Create them on the Settings page in Console. The full token is shown only once when you generate or rotate it.
Management tokens cannot be used for model inference, and standard
sk-... API keys cannot be used for the Management API.Get an API key
- Sign in to TokenLab Console
- Open API Keys
- Create a new key
- Give it a descriptive name
- Copy it immediately because it is shown only once
Use an API key
Set a usage limit
You can set a usage limit on each API key:Key prefix
All TokenLab API keys start withsk-.
Anthropic Compatibility
For the/v1/messages endpoint, the Anthropic-style header works as expected:
Use
Authorization: Bearer ... with OpenAI-compatible APIs such as /v1/responses, /v1/chat/completions, and /v1/models.Error Responses
Example: