Skip to main content
POST
Generate API key
Create a Service API key to authenticate programmatic requests. The raw key is shown once and never returned again.

Authorizations

Authorization
string
header
required

Accepts one of three credential types (detected by format):

  • Session token (sess_...) — O(1) Redis lookup, 24h TTL. Preferred.
  • Google ID Token (JWT — three .-separated base64 segments) — calls Google tokeninfo API per request.
  • Service API Key (sk_live_...) — HMAC-SHA256 constant-time validation, never expires unless revoked.

Note: The web UI authenticates via a session httpOnly cookie (set during login). The cookie is checked first; the Authorization header is the fallback for programmatic clients.

Response

API key created. Store raw_key immediately — it will not be shown again.

key_id
string<uuid>
Example:

"123e4567-e89b-12d3-a456-426614174001"

key_prefix
string

First 12 characters of the raw key (display only, non-sensitive).

Example:

"sk_live_ab12"

raw_key
string

Full Service API Key. Shown ONCE — never returned again. Store this value securely immediately.

Example:

"sk_live_a1b2c3d4e5f6..."

created_at
string<date-time>
Example:

"2025-11-01T00:00:00Z"