API keys

Create an additional API key

Mints a key of the same mode as the calling key (sandbox keys mint sandbox keys, live mint live) — a trial can never self-upgrade. Sandbox rotations inherit the calling key's expiry and usage ledger, so minting keys never extends or resets the trial budget. Max 5 active keys per account. The raw key appears only in this response. Empty body is valid (name is optional).

post/v1/api-keys

Request

  • Base URL: https://serp-agent.com
  • URL: https://serp-agent.com/v1/api-keys
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Any unique string (max 200 chars). Retrying a request with the same key replays the stored response verbatim (with header Idempotent-Replayed: true) instead of re-executing — including one-time secrets in the original body. Keys are scoped per account (per client IP on the unauthenticated signup) and pruned after 24h. Reusing a key on a different endpoint returns 409 idempotency_conflict.

Request body

namestring

Response

Key created. api_key is the full raw key — shown exactly once.

idstring required
namestring nullable required
key_prefix'sk_sandbox_' | 'sk_live_' required
last4string required
mode'sandbox' | 'live' required
created_atstring date-time required
last_used_atstring date-time nullable required
expires_atstring date-time nullable required
revoked_atstring date-time nullable required
api_keystring required

Full raw key — shown exactly once.

Changes

No recorded changes to this operation across all 1 revision of this API.