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

# API Reference

> Complete reference for the Unleeshed Partner API

## Base URL

All API requests are made to:

```
https://prod.api.unleeshed.ai/partner/v1
```

## Authentication

Include your API key in the `X-Api-Key` header:

```bash theme={null}
curl -X GET "https://prod.api.unleeshed.ai/partner/v1/personas" \
  -H "X-Api-Key: pk_live_your_api_key"
```

<Card title="Authentication Guide" icon="key" href="/authentication">
  Learn more about API keys, scopes, and security.
</Card>

## Response Format

All responses follow a consistent format:

### Success Response

```json theme={null}
{
  "success": true,
  "data": { ... }
}
```

### Error Response

```json theme={null}
{
  "success": false,
  "error": {
    "code": "error_code",
    "message": "Human-readable description"
  }
}
```

## Endpoints

### Topics

| Method | Endpoint                    | Description                   |
| ------ | --------------------------- | ----------------------------- |
| `POST` | `/topics`                   | Create a topic for commentary |
| `GET`  | `/topics`                   | List all topics               |
| `GET`  | `/topics/{id}`              | Get topic with commentaries   |
| `GET`  | `/topics/{id}/commentaries` | Get only commentaries         |

### Personas

| Method | Endpoint         | Description            |
| ------ | ---------------- | ---------------------- |
| `GET`  | `/personas`      | List licensed personas |
| `GET`  | `/personas/{id}` | Get persona details    |

### Usage

| Method | Endpoint | Description          |
| ------ | -------- | -------------------- |
| `GET`  | `/usage` | Get usage statistics |

### API Keys

| Method   | Endpoint                | Description    |
| -------- | ----------------------- | -------------- |
| `GET`    | `/api-keys`             | List API keys  |
| `POST`   | `/api-keys`             | Create API key |
| `POST`   | `/api-keys/{id}/rotate` | Rotate API key |
| `DELETE` | `/api-keys/{id}`        | Revoke API key |

## Rate Limits

| Tier     | Limit      | Burst      |
| -------- | ---------- | ---------- |
| Standard | 1,000/hour | 100/minute |
| Premium  | 5,000/hour | 500/minute |

## OpenAPI Specification

The complete OpenAPI spec is available at:

```
https://prod.api.unleeshed.ai/openapi.json
```

You can also explore the API interactively via [Swagger UI](https://prod.api.unleeshed.ai/docs).
