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

# API Keys

> Create, manage, revoke, reactivate, and rotate API keys.

# API Keys

API key management endpoints require an authenticated developer session.

## Scopes

```text theme={null}
GET /v1/api-keys/scopes
```

| Scope                    | Access                         |
| ------------------------ | ------------------------------ |
| `chat:*`                 | All chat models.               |
| `image:*`                | All image features.            |
| `image:gen:*`            | Image generation only.         |
| `image:studio:*`         | Image studio only.             |
| `video:*`                | All video features.            |
| `video:gen:*`            | Video generation only.         |
| `video:studio:*`         | Video studio only.             |
| `video:interpretation:*` | Video interpretation only.     |
| `billing:read`           | View balance and transactions. |
| `keys:*`                 | Manage own API keys.           |

Parent wildcards grant all children. For example, `image:*` implies `image:gen:*` and `image:studio:*`.

## Endpoints

| Endpoint                                 | Description                                             |
| ---------------------------------------- | ------------------------------------------------------- |
| `GET /v1/api-keys`                       | List API keys for the authenticated user.               |
| `POST /v1/api-keys`                      | Create a new API key. The secret is returned only once. |
| `DELETE /v1/api-keys/{key_id}`           | Permanently delete an API key.                          |
| `PATCH /v1/api-keys/{key_id}/revoke`     | Revoke an API key.                                      |
| `PATCH /v1/api-keys/{key_id}/reactivate` | Reactivate a revoked API key.                           |
| `POST /v1/api-keys/{key_id}/rotate`      | Generate a replacement key with the same configuration. |

<Warning>
  The `secret_key` is only returned once at creation time. Store it securely.
</Warning>
