# Export and publishing

> Slicer API export endpoints — rendering the video with file settings and publishing, a project's publications and connected social accounts.

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

Export is free and re-renders the video from the current document. With the `publish` field the video is published to connected accounts after rendering — this requires the `publish` scope. Social accounts can only be connected in the app, and TikTok can only be published to from the app. Details — [Export and publishing](https://docs.slicer.media/en/api/export/).

## Render the video (free)

`POST /v1/projects/{id}/export`

- **Scopes:** `projects:write`
- **Rate limit:** paid operations

With `publish` — publishes after rendering (needs the `publish` scope). TikTok — only from the Slicer app.

### Path parameters

| Field | Type | Description |
| --- | --- | --- |
| `id` _(required)_ | `integer` | — ≥ 1 |

### Request body `ExportRequest`

| Field | Type | Description |
| --- | --- | --- |
| `profile` | `ExportProfile` |     |
| `publish` | `PublishRequestItem[]` | — 0–8 |

### Request

**curl**

```bash
curl -X POST "https://api.slicer.media/v1/projects/42/export" \
  -H "Authorization: Bearer $SLICER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"profile":{"container":"mp4","codec":"h264","resolution":"720p","fps":24,"quality":"balanced","colorDepth":8,"audioBitrate":128,"loudness":-14},"publish":[{"accountId":42,"title":"Монтаж за 3 минуты","caption":"string","options":{}}]}'
```

**JavaScript**

```js
const response = await fetch('https://api.slicer.media/v1/projects/42/export', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SLICER_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "profile": {
      "container": "mp4",
      "codec": "h264",
      "resolution": "720p",
      "fps": 24,
      "quality": "balanced",
      "colorDepth": 8,
      "audioBitrate": 128,
      "loudness": -14
    },
    "publish": [
      {
        "accountId": 42,
        "title": "Монтаж за 3 минуты",
        "caption": "string",
        "options": {}
      }
    ]
  }),
});
const { ok, data, error } = await response.json();
```

**Python**

```python
import os
import requests

response = requests.post(
    "https://api.slicer.media/v1/projects/42/export",
    headers={"Authorization": f"Bearer {os.environ['SLICER_TOKEN']}"},
    json={
        "profile": {
            "container": "mp4",
            "codec": "h264",
            "resolution": "720p",
            "fps": 24,
            "quality": "balanced",
            "colorDepth": 8,
            "audioBitrate": 128,
            "loudness": -14,
        },
        "publish": [{
            "accountId": 42,
            "title": "Монтаж за 3 минуты",
            "caption": "string",
            "options": {},
        }],
    },
)
body = response.json()
```

### Response

**Response fields: `ProjectDetails` (44)**

| Field | Type | Description |
| --- | --- | --- |
| `id` _(required)_ | `integer` |     |
| `title` _(required)_ | `string` |     |
| `status` _(required)_ | `string` | `draft` — an “edit it myself” project before its first export: edit it with operations, then export — `queued` · `processing` · `succeeded` · `failed` · `cancelled` · `draft` |
| `mode` _(required)_ | `string` | `ai` — edited by the AI director; `manual` — materials on the timeline as is, free (only AI operations cost) — `ai` · `manual` |
| `stage` _(required)_ | `string \| null` |     |
| `progress` _(required)_ | `integer` | Progress of the current run, % |
| `client` _(required)_ | `string \| null` | Where it was created: web, mobile, api, mcp |
| `settings` _(required)_ | `object` | Montage settings (see MontageSettingsInput) |
| `brief` _(required)_ | `string \| null` |     |
| `isFree` _(required)_ | `boolean` |     |
| `watermark` _(required)_ | `boolean` |     |
| `tokensCost` _(required)_ | `integer` |     |
| `error` _(required)_ | `object \| null` |     |
| `error.code` _(required)_ | `string` |     |
| `error.message` _(required)_ | `string` |     |
| `durationSec` _(required)_ | `number \| null` |     |
| `versionChoice` _(required)_ | `integer[] \| null` | Version ids awaiting your choice; a montage returns one version, so usually `null` |
| `result` _(required)_ | `object \| null` |     |
| `result.url` _(required)_ | `string (uri)` | Download with the token (Range supported) |
| `result.posterUrl` _(required)_ | `string (uri) \| null` |     |
| `result.container` _(required)_ | `string` |     |
| `result.info` _(required)_ | `object \| null` |     |
| `appUrl` _(required)_ | `string (uri)` | The project in the Slicer web app |
| `sourcesAvailable` _(required)_ | `boolean` | Sources are kept 7 days after the montage |
| `createdAt` _(required)_ | `string` | ISO 8601 date-time, UTC |
| `finishedAt` _(required)_ | `string \| null` |     |
| `stages` _(required)_ | `object[]` |     |
| `stages[].stage` _(required)_ | `string` |     |
| `stages[].status` _(required)_ | `string` | — `pending` · `running` · `succeeded` · `failed` · `skipped` |
| `stages[].inRun` _(required)_ | `boolean` | Part of the current run (not reused from a previous one) |
| `stages[].startedAt` _(required)_ | `string \| null` |     |
| `stages[].finishedAt` _(required)_ | `string \| null` |     |
| `stages[].durationSec` _(required)_ | `number \| null` |     |
| `stages[].progress` _(required)_ | `integer` |     |
| `stages[].tokens` _(required)_ | `integer` | Share of the run price |
| `run` _(required)_ | `object` |     |
| `run.kind` _(required)_ | `string` |     |
| `run.status` _(required)_ | `string` |     |
| `run.tokens` _(required)_ | `integer` |     |
| `run.tokensState` _(required)_ | `string` | — `free` · `reserved` · `charged` · `refunded` |
| `run.queuedAt` _(required)_ | `string` | ISO 8601 date-time, UTC |
| `run.startedAt` _(required)_ | `string \| null` |     |
| `run.finishedAt` _(required)_ | `string \| null` |     |
| `versions` _(required)_ | `ProjectVersion[]` |     |

Response example:

```json
{
  "ok": true,
  "data": {
    "id": 42,
    "title": "Монтаж за 3 минуты",
    "status": "queued",
    "mode": "ai",
    "stage": "string",
    "progress": 0.5,
    "client": "string",
    "settings": {},
    "brief": "Динамично, с акцентом на главные мысли",
    "isFree": true,
    "watermark": true,
    "tokensCost": 24,
    "error": {
      "code": "string",
      "message": "string"
    },
    "durationSec": 42.5,
    "versionChoice": [
      1
    ],
    "result": {
      "url": "https://example.com/hook",
      "posterUrl": "https://api.slicer.media/v1/…",
      "container": "string",
      "info": {}
    },
    "appUrl": "https://api.slicer.media/v1/…",
    "sourcesAvailable": true,
    "createdAt": "2026-10-16T09:30:00Z",
    "finishedAt": "2026-10-16T09:30:00Z",
    "stages": [
      {
        "stage": "string",
        "status": "pending",
        "inRun": true,
        "startedAt": "2026-10-16T09:30:00Z",
        "finishedAt": "2026-10-16T09:30:00Z",
        "durationSec": 42.5,
        "progress": 0.5,
        "tokens": 24
      }
    ],
    "run": {
      "kind": "string",
      "status": "string",
      "tokens": 24,
      "tokensState": "free",
      "queuedAt": "2026-10-16T09:30:00Z",
      "startedAt": "2026-10-16T09:30:00Z",
      "finishedAt": "2026-10-16T09:30:00Z"
    },
    "versions": [
      {
        "id": 42,
        "version": null,
        "idea": "string",
        "durationSec": 42.5,
        "current": true,
        "awaitingChoice": true,
        "hasFile": true,
        "createdAt": "2026-10-16T09:30:00Z"
      }
    ]
  }
}
```

## Project publications

`GET /v1/projects/{id}/publications`

- **Scopes:** `projects:read`
- **Rate limit:** default

### Path parameters

| Field | Type | Description |
| --- | --- | --- |
| `id` _(required)_ | `integer` | — ≥ 1 |

### Request

**curl**

```bash
curl "https://api.slicer.media/v1/projects/42/publications" \
  -H "Authorization: Bearer $SLICER_TOKEN"
```

**JavaScript**

```js
const response = await fetch('https://api.slicer.media/v1/projects/42/publications', {
  headers: {
    Authorization: `Bearer ${process.env.SLICER_TOKEN}`,
  },
});
const { ok, data, error } = await response.json();
```

**Python**

```python
import os
import requests

response = requests.get(
    "https://api.slicer.media/v1/projects/42/publications",
    headers={"Authorization": f"Bearer {os.environ['SLICER_TOKEN']}"},
)
body = response.json()
```

### Response

Response example:

```json
{
  "ok": true,
  "data": [
    {
      "id": 42,
      "platform": "string",
      "accountName": "Anna",
      "status": "string",
      "url": "https://example.com/hook",
      "errorCode": "string",
      "createdAt": "2026-10-16T09:30:00Z"
    }
  ]
}
```

## Connected social accounts

`GET /v1/social/accounts`

- **Scopes:** `publish`
- **Rate limit:** default

### Request

**curl**

```bash
curl "https://api.slicer.media/v1/social/accounts" \
  -H "Authorization: Bearer $SLICER_TOKEN"
```

**JavaScript**

```js
const response = await fetch('https://api.slicer.media/v1/social/accounts', {
  headers: {
    Authorization: `Bearer ${process.env.SLICER_TOKEN}`,
  },
});
const { ok, data, error } = await response.json();
```

**Python**

```python
import os
import requests

response = requests.get(
    "https://api.slicer.media/v1/social/accounts",
    headers={"Authorization": f"Bearer {os.environ['SLICER_TOKEN']}"},
)
body = response.json()
```

### Response

Response example:

```json
{
  "ok": true,
  "data": [
    {
      "id": 42,
      "platform": "youtube",
      "name": "Anna",
      "status": "string",
      "apiPublishing": true
    }
  ]
}
```

## Schemas

`ExportRequest`

| Field | Type | Description |
| --- | --- | --- |
| `profile` | `ExportProfile` |     |
| `publish` | `PublishRequestItem[]` | — 0–8 |

`ExportProfile`

| Field | Type | Description |
| --- | --- | --- |
| `container` | `string` | — `mp4` · `mov` |
| `codec` | `string` | — `h264` · `hevc` |
| `resolution` | `string` | — `720p` · `1080p` · `1440p` · `2160p` |
| `fps` | `24 \| 25 \| 30` |     |
| `quality` | `string` | — `balanced` · `high` · `max` |
| `colorDepth` | `8 \| 10` | 10-bit only with HEVC |
| `audioBitrate` | `128 \| 192 \| 256 \| 320` |     |
| `loudness` | `-14 \| -16 \| -23` | Target loudness, LUFS |

`PublishRequestItem`

| Field | Type | Description |
| --- | --- | --- |
| `accountId` _(required)_ | `integer` | Connected account from GET /v1/social/accounts |
| `title` | `string` | — ≤ 150 |
| `caption` | `string` | — ≤ 5000 |
| `options` | `object` | Platform options: `{ youtube: { privacy, madeForKids } }`, `{ instagram: { shareToFeed } }`, `{ vk: { privacy, wallpost, groupId } }`, `aiGenerated` |

`Publication`

| Field | Type | Description |
| --- | --- | --- |
| `id` _(required)_ | `integer` |     |
| `platform` _(required)_ | `string` |     |
| `accountName` _(required)_ | `string \| null` |     |
| `status` _(required)_ | `string` |     |
| `url` _(required)_ | `string \| null` |     |
| `errorCode` _(required)_ | `string \| null` |     |
| `createdAt` _(required)_ | `string` | ISO 8601 date-time, UTC |

`SocialAccount`

| Field | Type | Description |
| --- | --- | --- |
| `id` _(required)_ | `integer` |     |
| `platform` _(required)_ | `string` | — `youtube` · `instagram` · `tiktok` · `vk` |
| `name` _(required)_ | `string \| null` |     |
| `status` _(required)_ | `string` |     |
| `apiPublishing` _(required)_ | `boolean` | Can publish through the API (TikTok — only from the app) |
