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

# Migrate from Shotstack

> Move Shotstack edits to Rendermate: media, tracks and clips as documents, merge fields, AI assets, renders, callbacks and hosting, step by step.

A Shotstack edit is a JSON timeline of tracks and clips that you send with each render request. A
Rendermate video is a [document](https://rendermate.com/docs/documents.md): the same timeline as JSX nodes, versioned like a git
repository and rendered on Rendermate's GPUs. This guide moves a Shotstack integration over in the
order you'd do it: media first, then each edit, then rendering and delivery.

***

## (1) How do I move my media to Rendermate?

Every file a document uses is a file in your workspace. A Shotstack edit reads its media from URLs,
so import each one with `import_asset` (`POST /v1/imports`):

```bash theme={null}
curl https://api.rendermate.com/v1/imports \
  -H "Authorization: Bearer $RENDERMATE_API_KEY" \
  --json '{ "url": "https://my-bucket.s3.amazonaws.com/video.mp4", "name": "launch/video.mp4" }'
```

For files on your computer, such as those you sent to Shotstack's Ingest API, the [CLI](https://rendermate.com/docs/cli.md)
keeps a folder in step with one in your workspace:

```bash theme={null}
rendermate login
rendermate sync ./media
```

A document then refers to each file as `asset://<name>`, such as `asset://launch/video.mp4`. Font
files you listed in `timeline.fonts` move the same way.

***

## (2) How do I rebuild an edit as a document?

### (A) Let your coding agent migrate it

Connect your agent to `https://api.rendermate.com/mcp` ([Claude Code](https://rendermate.com/docs/mcp/claude-code.md),
[Cursor](https://rendermate.com/docs/mcp/cursor.md)) and give it one of your edit JSON files. It writes the document with
`create_document` and `edit_document` and checks each moment with `get_frame`, following the
mapping below.

### (B) Write the documents with the API

Create a document with `POST /v1/documents`, read its `jsx` with `GET /v1/documents/{id}`, and
commit your nodes with `POST /v1/documents/{id}/versions`.
[How do I edit a document?](https://rendermate.com/docs/documents.md#how-do-i-edit-a-document) shows the request. An empty
document is 10 seconds of 1920×1080 at 30 fps; set its `canvas` in the same edit.

### How does an edit map onto a document?

| Shotstack | | Rendermate |
| - | - | - |
| `output.size` or `output.resolution` | → | `canvas.width`, `canvas.height` |
| `output.fps` | → | `canvas.frameRate`: `{numerator: 25, denominator: 1}` |
| The edit's length | → | `canvas.duration`, in seconds |
| `timeline.tracks` | → | The `<timeline>` element's child nodes |
| A clip's `start` and `length` | → | A node's `common.start` and `common.duration`, in seconds |
| `timeline.background` | → | A `<fill>` node under everything else |
| `timeline.fonts` | → | `assets.fonts`, each with an `id` that text styles name as `fontId` |

### How do clips and assets map?

| Shotstack | | Rendermate node |
| - | - | - |
| `video` asset with `trim` | → | `<media>` with an asset from `assets.media` and `sourceIn` |
| `image` asset | → | `<media>` with an asset from `assets.images` |
| `audio` asset with `volume` | → | `<audio>` with `gain` |
| `text`, `rich-text` or `title` asset | → | `<text>` with `paragraph` content |
| `fit: "crop"` or `"cover"` | → | `fit="cover"` |
| `fit: "contain"` | → | `fit="contain"` |
| `opacity` | → | `common.opacity` |
| `scale` | → | `common.transform` with `scaleX` and `scaleY` |
| A `fade` transition or `fadeIn` effect | → | `common.opacity` keyframes: `Doc.keys([0, 0], [0.5, 1])` |

Here is a title over a video, as a Shotstack edit and as a document's nodes:

```json Shotstack theme={null}
{
  "tracks": [
    { "clips": [{ "asset": { "type": "rich-text", "text": "Hello World",
        "font": { "family": "Montserrat", "size": 64, "color": "#ffffff" } },
      "start": 0, "length": 4 }] },
    { "clips": [{ "asset": { "type": "video", "src": "https://…/video.mp4", "trim": 2 },
      "start": 0, "length": 8 }] }
  ]
}
```

```jsx Rendermate theme={null}
export const assets = {
  fonts: [{id: "montserrat", family: "Montserrat", weight: 700, style: "normal", source: {type: "uri", uri: "asset://fonts/Montserrat-Bold.ttf"}}],
  media: [{id: "video", source: {type: "uri", uri: "asset://launch/video.mp4"}}],
};

// Inside <timeline>:
<media
  id="video"
  common={{start: 0, duration: 8, order: "a0"}}
  assetId="video"
  destination={{x: 0, y: 0, width: 1920, height: 1080}}
  fit="cover"
  sampling={{filter: "linear", mipmap: "linear"}}
  sourceIn={2}
/>
<text
  id="title"
  common={{start: 0, duration: 4, order: "a1"}}
  content={{
    type: "paragraph",
    text: "Hello World",
    position: {x: 0, y: 560},
    width: 1920,
    align: "center",
    style: {fontId: "montserrat", fontSize: 64, color: "#ffffff"},
  }}
/>
```

### Why is the track order reversed?

In Shotstack, `tracks[0]` is the top layer. In a document, siblings paint in `common.order` key
order, so the first key is the bottom: give your last Shotstack track the lowest key, such as
`"a0"`, and your first track the highest. [How do order keys work?](https://rendermate.com/docs/documents.md#how-do-order-keys-work)
explains the keys.

### How do position and offset become pixels?

Shotstack places a clip with `position` (such as `topLeft`) and an `offset` from -1 to 1 of the
output's size, with positive `y` moving up. A document places a `media` node in a `destination`
rectangle in pixels, and a `text` node at a `position` in pixels, both measured from the canvas's
top-left corner with `y` growing downward. An `offset` of `{x: 0.05, y: -0.05}` from `topLeft` on a
1920×1080 output is 96 pixels right and 54 pixels down.

### What do smart clips like "auto" and "end" become?

Write every `start` and `duration` as seconds:

| Shotstack | | Rendermate |
| - | - | - |
| `"start": "auto"` | → | The previous node's `start` plus its `duration`, or a `sequence` node |
| `"length": "auto"` | → | The file's own length, in seconds |
| `"length": "end"` | → | The canvas's `duration` minus the node's `start` |
| `"alias://intro"` | → | The same seconds as the node it referred to |

***

## (3) How do I replace templates and merge fields?

Your code writes the values into the JSX. Keep your template as a JSX string with placeholders, such
as `{{NAME}}`, replace them, and send the result:

* **One video per record:** call `create_document` with the filled-in `jsx`.
* **A change to one video:** commit an `edits` replacement, such as the title's text, on the version
  you read.

Every edit is a new version that stays readable, with its author and message, and
[`list_versions`](https://rendermate.com/docs/mcp/tools/documents#list_versions) shows the history.

***

## (4) How do I move AI voice-overs, generated clips and captions?

Call the model through `create_generation` (`POST /v1/generations`), at the provider's own price.
Its output is saved as an asset, ready for a document's `assets`:

| Shotstack | | Rendermate model |
| - | - | - |
| A text-to-speech asset | → | A speech model, such as `elevenlabs/v4` or `assemblyai/tts-1` |
| A generated video asset (`prompt`, `model`) | → | A video model, such as `bytedance/seedance-2.5` |
| A `caption` or `rich-caption` asset | → | A transcription model, such as `assemblyai/universal-2`, then `text` nodes |
| Music | → | `elevenlabs/music-v2.5` |

A transcript has every word with its start and end time; write each line as a `text` node starting
at its first word. [Models](https://rendermate.com/docs/models.md) lists every model, with its inputs and params.

***

## (5) How do I render, get notified and host the video?

| Shotstack | | Rendermate |
| - | - | - |
| `POST /edit/{version}/render` | → | `create_export` (`POST /v1/exports`) with the document and a version |
| `GET /edit/{version}/render/{id}` | → | `get_export` (`GET /v1/exports/{id}`) |
| `callback` | → | [Webhooks](https://rendermate.com/docs/webhooks.md): `export.succeeded` and `export.failed` |
| The render's `url` | → | The export's `download_url` |
| `output.poster`, `output.thumbnail` | → | `get_frame` (`POST /v1/documents/{id}/frames`) |
| Hosting on Shotstack's CDN | → | A link (`create_link`): a page, an embed and HLS playback |

Exporting a version again reuses what was already rendered. `export.succeeded`'s `data` has the
`download_url`; copy the file from there to your own storage if you send renders to S3 or another
destination today.

A link plays one fixed version, or follows `latest`, so it plays each new version as you commit it.
It can autoplay, show controls, expire and ask for a password, and its pages can be on
[your own domain](https://rendermate.com/docs/custom-domains.md).

***

## (6) How do I switch over?

### (A) All at once

For a few kinds of edit, rebuild each one as a document, check it with `get_frame`, and switch your
code from the render endpoint to `create_export` in one release.

### (B) One kind of edit at a time

For a larger integration, keep rendering with Shotstack while you move one kind of edit over:

1. Rebuild it as a document.
2. Compare a frame of your Shotstack render with `get_frame` at the same time.
3. Switch the code that renders it to `create_export`, and its callback handler to
   `export.succeeded`.
4. Move on to the next.

***

## Next steps

* [Documents](https://rendermate.com/docs/documents.md): every node, keyframes, assets and errors.
* [Webhooks](https://rendermate.com/docs/webhooks.md): verify and handle `export.succeeded`.
* [Models](https://rendermate.com/docs/models.md): every model `create_generation` can call.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.