# API reference

> Every Slicer API v1 endpoint by group — method, path, scopes, rate limit, price, parameters, responses and examples in curl, JavaScript and Python.

Source: https://docs.slicer.media/en/api/reference/

The reference is built from the OpenAPI 3.1 specification that the server itself serves — the description and the API's behavior don't drift apart. You can download the specification for a client generator or Postman without a token: [`https://api.slicer.media/v1/openapi.json`](https://api.slicer.media/v1/openapi.json).

## Groups

| Group | What's inside |
| --- | --- |
| [Account](https://docs.slicer.media/en/api/reference/account/) | profile, balance, token, wallet transactions |
| [Catalog and prices](https://docs.slicer.media/en/api/reference/catalog/) | styles and montage settings, export presets, operation price, the specification |
| [Uploads](https://docs.slicer.media/en/api/reference/uploads/) | uploading files whole, in parts, by link and from a URL |
| [Projects](https://docs.slicer.media/en/api/reference/projects/) | montage, status, versions, rebuild, retry, stop, download |
| [Editing](https://docs.slicer.media/en/api/reference/editing/) | the video text, edit operations, the edit document, AI assistant, translation, style |
| [Export and publishing](https://docs.slicer.media/en/api/reference/export/) | rendering, publications, connected social accounts |
| [Webhooks](https://docs.slicer.media/en/api/reference/webhooks/) | notification endpoints, testing and the delivery log |

## Reading an endpoint description

-   **Method and path** — relative to `https://api.slicer.media`; path parameters are in curly braces.
-   **Scopes** — which [scopes](https://docs.slicer.media/en/api/authentication/) the token needs. "Any" means any valid token will do.
-   **Limit** — the [rate limit](https://docs.slicer.media/en/api/rate-limits/) bucket: regular, paid or upload parts.
-   **Price** — for paid endpoints: without `confirmCost` the response is a `Quote` price and nothing starts ([Montage and pricing](https://docs.slicer.media/en/api/montage/)). Captions from speech, the AI assistant and translation are priced at AI cost: the `Quote` has `estimate` (the expected price) and `atCost: true`, and `cost` is the maximum ([Editing the video](https://docs.slicer.media/en/api/editing/#assistant)).
-   **Response** — the content of the `data` field of a successful `{ "ok": true, "data": … }` response. Errors use the common format ([Errors](https://docs.slicer.media/en/api/errors/)).

All requests with a body send JSON (`Content-Type: application/json`), except file uploads, where the body is the file bytes (`application/octet-stream`).

## Common schemas

`Quote`

| Field | Type | Description |
| --- | --- | --- |
| `status` _(required)_ | `"quote"` |     |
| `cost` _(required)_ | `integer` | Price in tokens; repeat the request with `confirmCost` equal to it. For an operation at cost (`atCost`) — the maximum: the actual cost is charged, never more |
| `free` _(required)_ | `boolean` | The operation is free (first video, free retry) |
| `estimate` | `number` | Operation at cost: expected price in tokens (fractional) |
| `atCost` | `boolean` | Priced at the AI providers’ cost, no markup: the wallet is charged the actual cost, at most `cost` |
| `available` _(required)_ | `integer` | Tokens available now |
| `enough` _(required)_ | `boolean` | Enough tokens to run |
| `spendLimitLeft` _(required)_ | `integer \| null` | What is left of the token's monthly spend limit; `null` — no limit |

`Error`

| Field | Type | Description |
| --- | --- | --- |
| `ok` _(required)_ | `false` |     |
| `error` _(required)_ | `object` |     |
| `error.code` _(required)_ | `string` | Stable snake\_case error code |
| `error.message` _(required)_ | `string` | Human-readable message in the account language |
| `error.fields` | `Record<string, string>` | Field errors |
| `error.retryAfterSec` | `integer` | Seconds to wait before retrying |

## What's next

[QuickstartThe whole path of a video, with examples.](https://docs.slicer.media/en/api/quickstart/)[ProjectsThe main group: montage and results.](https://docs.slicer.media/en/api/reference/projects/)
