/v1/keys

Mint, list, and revoke API keys. These endpoints are session-authenticated via your dashboard login — they do not take a bearer token. This avoids the bootstrap problem of needing a key to create your first key.

GET /v1/keys

GET/v1/keys

Response

json
{
  "request_id": "…",
  "keys": [
    {
      "id": "1a2b…",
      "name": "Production server",
      "prefix": "lvk_live_AB",
      "mode": "live",
      "status": "active",
      "created_at": "2026-04-10T11:04:00.000Z",
      "last_used_at": "2026-04-25T08:12:30.000Z",
      "revoked_at": null
    }
  ]
}

The plaintext token is never returned by GET. It's only shown once at creation time.

POST /v1/keys

POST/v1/keys

Request body

FieldTypeDescription
name
required
stringHuman label, 1–80 chars. Shown in the dashboard list.
modeoptional
'live' | 'test'Prefix label. Both modes hit real providers and draw from your credit balance — "test" is not a sandbox.
Default: 'live'

Response

json
{
  "request_id": "…",
  "key": {
    "id": "1a2b…",
    "name": "Production server",
    "prefix": "lvk_live_AB",
    "mode": "live",
    "status": "active",
    "created_at": "2026-04-10T11:04:00.000Z",
    "token": "lvk_live_AB7oMv2Kj9qX…"
  }
}

token is the plaintext bearer token — store it immediately. The server keeps only a SHA-256 hash; we cannot recover a lost token.

DELETE /v1/keys/:id

DELETE/v1/keys/:id

Response

json
{
  "request_id": "…",
  "revoked": true,
  "id": "1a2b…"
}

Errors

FieldTypeDescription
invalid_requestoptional
400Body failed validation (missing name, invalid mode, non-UUID id).
unauthorizedoptional
401No active dashboard session. Log in and retry.
not_foundoptional
404The key id does not belong to your account, or has already been revoked.