Skip to content

Authentication

Every request to /v1/* requires a bearer token in the Authorization header.

Authorization: Bearer zk_AbCdEf...

Get a key

Sign inAPI keys → Create new key. The plaintext is shown once. We only store the SHA-256 hash on our side, there is no way to recover the original. If you lose it, revoke and create a new one.

Key format

PartExampleNotes
Prefixzk_Identifies the key type
Body43 chars (URL-safe base64 of 32 random bytes)The secret
Total length46 chars

Rotate a key

  1. Create a new key in the dashboard.
  2. Roll it into your environment.
  3. Confirm traffic on the new key in Usage.
  4. Revoke the old key.

Revocation is immediate, calls using the old key start returning 401 invalid_api_key within seconds.

Errors

StatusCodeCause
401missing_api_keyNo Authorization header
401invalid_api_keyBad format, unknown key, or revoked
403account_suspendedAccount is suspended or closed
402out_of_creditsCredit balance reached 0, top up or upgrade. See Credits & rate limits
429rate_limitedPer-minute rate limit hit, see Credits & rate limits

Storing keys

  • Server-side only. Never embed in browser/mobile code that ships to users.
  • Per-environment. One key for staging, one for production.
  • Per-service. Different microservices = different keys; revoke independently.