Skip to main content
Darkbloom API keys are created and managed through /v1/keys. The older /v1/auth/keys endpoints still work for one key per account. Both families require a Privy session JWT; an API key used on a management route returns 403 forbidden.
API key creation requires browser-based Privy authentication. You cannot use an existing API key to mint or revoke other keys. This prevents a leaked key from creating new long-lived credentials.

Create a key

The recommended path is the console at console.darkbloom.dev, on the API console page (/api-console).

POST /v1/keys

The response is {key, data}: key is the plaintext secret, shown once. New secrets start with sk-db-. Optional settings:
  • name — display name.
  • limit_usd and limit_reset (none, daily, weekly, monthly) — spend cap.
  • rpm_limit, itpm_limit, otpm_limit — request and token limits.
  • allowed_models — the only model IDs this key may use.
  • expires_at — expiry time.
  • self_route_only — restrict the key to the account’s own machines.
  • disabled — turn the key off without deleting it.

POST /v1/auth/keys

The older mint takes no required body and returns {api_key, account_id}. It creates one key for the account.

Inspect and change a key

GET /v1/keys shows usage_usd, limit_usd and remaining_usd per key. A key’s label masks the secret to its prefix, first four and last four characters.

Revoke a key with the older endpoint

DELETE /v1/auth/keys

string
required
The API key to revoke, e.g. "sk-db-...".
The response is {status: "revoked"}. A revoked key stops authenticating after the coordinator’s API-key cache refreshes; in-flight requests that already passed authentication can finish.

Errors

error
An API key was used on a management route. Use the Privy session JWT.
error
The revoke body does not contain a key string.