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

# API Reference

> Complete StagingSpaces API reference

# API Reference

Base URL: `https://stagingspaces-production-6fb7.up.railway.app`

## Endpoints

### Staging (API Key Auth)

| Method | Endpoint                 | Description                      | Cost     |
| ------ | ------------------------ | -------------------------------- | -------- |
| `POST` | `/api/v1/stage`          | Stage an image with AI furniture | 1 credit |
| `POST` | `/api/v1/place-products` | Add product placement            | Free     |
| `POST` | `/api/v1/enhance`        | Enhance to 4K                    | 1 credit |

### Credits (API Key Auth)

| Method | Endpoint          | Description          |
| ------ | ----------------- | -------------------- |
| `GET`  | `/api/v1/credits` | Check credit balance |

### API Keys (Firebase Auth)

| Method   | Endpoint                | Description          |
| -------- | ----------------------- | -------------------- |
| `POST`   | `/api/v1/keys`          | Generate new API key |
| `GET`    | `/api/v1/keys`          | List API keys        |
| `DELETE` | `/api/v1/keys/{key_id}` | Revoke API key       |

### Claims (Firebase Auth)

| Method | Endpoint                | Description         |
| ------ | ----------------------- | ------------------- |
| `POST` | `/api/v1/claim`         | Claim staged images |
| `POST` | `/api/v1/claim/preview` | Preview claim code  |

### Webhooks (Firebase Auth)

| Method | Endpoint                             | Description             |
| ------ | ------------------------------------ | ----------------------- |
| `GET`  | `/api/v1/keys/{key_id}/webhook`      | Get webhook settings    |
| `PUT`  | `/api/v1/keys/{key_id}/webhook`      | Update webhook settings |
| `POST` | `/api/v1/keys/{key_id}/webhook/test` | Send test webhook       |

### Settings (Firebase Auth)

| Method | Endpoint                      | Description              |
| ------ | ----------------------------- | ------------------------ |
| `GET`  | `/api/v1/settings/auto-topup` | Get auto top-up settings |
| `PUT`  | `/api/v1/settings/auto-topup` | Update auto top-up       |

### Utility

| Method | Endpoint        | Auth     | Description      |
| ------ | --------------- | -------- | ---------------- |
| `GET`  | `/api/health`   | None     | Health check     |
| `GET`  | `/api/v1/usage` | Firebase | Usage statistics |
