Getting a key
Keys are created and revoked in the dashboard under/dashboard/keys. A key is shown
once at creation — store it somewhere safe. Keys are always prefixed lx1_.
Treat keys as secrets. Set them through environment variables rather than committing
them, and rotate from the dashboard if one leaks.
How to present the key
The Anthropic endpoint also accepts
Authorization: Bearer lx1_... as an alternative to
x-api-key, which is convenient when a client only lets you set one auth header.
Examples
Anthropic — x-api-key
OpenAI — Authorization: Bearer
Failure modes
- A missing or malformed key returns
401with anerrorbody shaped for the protocol you called. - A valid key naming a model that does not exist in the catalog returns
404— check the id againstGET /v1/models.