> For the complete documentation index, see [llms.txt](https://cluster-protocol.gitbook.io/whitepaper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cluster-protocol.gitbook.io/whitepaper/technical-architecture/api-reference.md).

# API Reference

#### Public Endpoints (No Authentication)

| Method | Path                        | Description                  |
| ------ | --------------------------- | ---------------------------- |
| GET    | /api/models                 | List all available models    |
| GET    | /api/datasets               | List all datasets            |
| GET    | /api/datasets/:slug         | Dataset detail and metadata  |
| GET    | /api/datasets/:slug/onchain | On-chain NFT info            |
| GET    | /api/pricing                | Pricing tiers                |
| GET    | /v1/models                  | industry-standard model list |

#### Authenticated Endpoints (API Key or JWT)

| Method | Path                       | Description                          |
| ------ | -------------------------- | ------------------------------------ |
| POST   | /v1/chat/completions       | Text inference (streaming supported) |
| POST   | /v1/embeddings             | Text embeddings                      |
| POST   | /v1/images/generations     | Image generation                     |
| POST   | /v1/audio/speech           | Text-to-speech                       |
| POST   | /v1/audio/transcriptions   | Speech-to-text                       |
| POST   | /v1/rerank                 | Document reranking                   |
| GET    | /api/user/dashboard        | User stats and usage                 |
| GET    | /api/user/api-keys         | List API keys                        |
| POST   | /api/datasets              | Create and upload dataset            |
| GET    | /api/datasets/:id/download | Download dataset files               |
| POST   | /api/datasets/:id/purchase | Purchase dataset access              |

#### x402-Enabled Endpoints

All authenticated endpoints also accept x402 payment headers in lieu of an API key. If a request arrives without authentication or payment, the server returns `402 Payment Required` with USDC payment instructions for Base.

<figure><img src="https://2560886960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo8bW2LCw3s9Oq1VIQ85p%2Fuploads%2FKRgJlFGd1rBBSrjgXO8A%2Fimage.png?alt=media&amp;token=b4002dd5-31ea-468c-9d3c-1632ea8d105a" alt=""><figcaption></figcaption></figure>
