A label for the key, for example the project that uses it.
Create an API key
/keysCreates the account's one API key and returns it once. While a key is active the answer is 409 key.limit_reached: revoke it first. Only an OAuth session may call it; a request signed with an API key answers 403 auth.oauth_required. Free.
FreeFree.Creates the account's one API key and returns it once. While a key is active the answer is 409 key.limit_reached: revoke it first. Only an OAuth session may call it; a request signed with an API key answers 403 auth.oauth_required. Free.
Request body
namestringrequired
Response
The fields inside data.
idstringrequired
The id of the key. It is not a secret.
namestringrequired
The label of the key.
created_atstringrequired
When the key was created, RFC 3339 UTC.
keystringrequired
The key, with the prefix lm_live_. Send it as Authorization: Bearer <key>. It cannot be shown again.
instructionsstringrequired
What to do with the key now.
Failures
| Status | Meaning |
|---|---|
| 400 | The request shape, a filter key, a value, a cursor or the enrichment mode was rejected. |
| 401 | The credential is missing, unknown or revoked. |
| 403 | The request is signed with an API key. |
| 409 | The account already has its one active API key. |
| 429 | The key passed 300 requests a minute or 2 concurrent requests. |
| 503 | The data is unavailable for a short time. |
Docs for agents: llms.txt