# 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="/files/c0YM24axPESXFXJto8BQ" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cluster-protocol.gitbook.io/whitepaper/technical-architecture/api-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
