> ## Documentation Index
> Fetch the complete documentation index at: https://docs.darkbloom.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# API key management — POST and DELETE /v1/auth/keys

> POST /v1/auth/keys creates a new API key; DELETE /v1/auth/keys revokes one. Both require an interactive Privy browser session — API key auth is not accepted.

These endpoints create and revoke Darkbloom API keys. Both operations require an interactive Privy session, which means they must be performed through a browser-based login flow. You cannot use an existing API key to create or revoke other keys.

<Warning>
  API key creation requires browser-based authentication via Privy. You cannot create API keys programmatically using an existing API key — this restriction prevents a leaked key from minting new long-lived credentials.
</Warning>

## Creating API keys

The recommended way to create an API key is through the Darkbloom web console at [darkbloom.dev](https://darkbloom.dev). Log in with your Privy account, navigate to Settings, and generate a new key there.

### POST /v1/auth/keys

Creates a new API key linked to the authenticated Privy account. All inference requests made with the returned key are billed to the same account.

**Authentication:** Privy session token (browser login). API key auth is rejected.

#### Response

<ResponseField name="api_key" type="string">
  The new API key. Keys always start with `eigeninference-`. Store it securely — it is not shown again.
</ResponseField>

<ResponseField name="account_id" type="string">
  The account ID the key is linked to.
</ResponseField>

## Revoking API keys

### DELETE /v1/auth/keys

Revokes an existing API key. You can only revoke keys that belong to your own account. A revoked key is immediately invalidated — in-flight requests using it will fail.

**Authentication:** Privy session token (browser login). API key auth is rejected.

#### Request body

<ParamField body="key" type="string" required>
  The API key to revoke, e.g. `"eigeninference-..."`.
</ParamField>

#### Response

<ResponseField name="status" type="string">
  Always `"revoked"` on success.
</ResponseField>

## Example (web console)

Sign in at [darkbloom.dev](https://darkbloom.dev) and navigate to **Settings → API Keys** to create or revoke keys interactively.
