Skip to content

API keys

API keys are the only credential. Every authenticated request includes Authorization: Bearer <plaintext>.

GET /api_keys
Authorization: Bearer <key>
[
{
"id": "...",
"prefix": "ak_live_abcd",
"label": "Signup default",
"client_kind": "direct",
"last_used_at": "2026-04-28T10:15:00Z",
"created_at": "2026-04-27T20:03:51Z"
}
]

Plaintext is never returned by GET — only prefix. If you’ve lost a key, issue a new one and revoke the old.

POST /api_keys
Authorization: Bearer <key>
Content-Type: application/json
Idempotency-Key: optional-stable-key
{ "label": "Claude Desktop", "client_kind": "mcp" }
FieldRequiredNotes
labelyesHuman-readable identifier.
client_kindnoOne of direct (default), mcp, sdk. Used for traffic attribution in /usage.
{
"id": "...",
"prefix": "ak_live_xxxx",
"label": "Claude Desktop",
"client_kind": "mcp",
"created_at": "...",
"plaintext": "ak_live_xxxx...XYZ"
}

The plaintext field is one-shot — never returned again.

DELETE /api_keys/:id
Authorization: Bearer <key>
{ "id": "...", "status": "revoked" }

The endpoint refuses with 422 cannot_revoke_last_key if it would leave the account with zero active keys (lockout protection). You can revoke yourself via the same key you’re authenticating with — but only if at least one other active key exists.

StatusCodeWhen
401unauthorizedMissing or invalid Bearer token.
404api_key_not_foundDELETE on a key id that doesn’t exist or belongs to another account.
422validation_failedPOST with missing label or unknown client_kind.
422cannot_revoke_last_keyDELETE would leave zero active keys.