> ## 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 Editframe

> Move Editframe compositions to Rendermate: files, timegroups and elements as documents, CSS animation as keyframes, render data, pipelines, renders, webhooks and playback, step by step.

An Editframe video is a composition of web components, such as `<ef-timegroup>` and `<ef-video>`,
styled with CSS and rendered in a browser, by the CLI or in Editframe's cloud. A Rendermate video is
a [document](https://rendermate.com/docs/documents.md): a timeline of JSX nodes, versioned like a git repository and rendered on
Rendermate's GPUs. This guide moves an Editframe integration over in the order you'd do it: files
first, then each composition, then rendering and playback.

***

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

Every file a document uses is a file in your workspace. For a file Editframe reads from a
`source_url`, or one you can download, import it 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 with `uploadFile` or `upload`, 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`, where
a composition used a `file-id`. Font files your `@font-face` rules load move the same way.

***

## (2) How do I rebuild a composition 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 your composition's HTML or React and its CSS. 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 a composition map onto a document?

| Editframe | | Rendermate |
| - | - | - |
| The root timegroup's size, such as `w-[1920px] h-[1080px]` | → | `canvas.width`, `canvas.height` |
| The render's `fps` | → | `canvas.frameRate`: `{numerator: 30, denominator: 1}` |
| The root timegroup's length | → | `canvas.duration`, in seconds |
| The root timegroup's children | → | The `<timeline>` element's child nodes |
| An element's `id` | → | The node's `id` |
| `@font-face` rules | → | `assets.fonts`, each with an `id` that text styles name as `fontId` |
| A background color on the root | → | A `<fill>` node under everything else |

### How do elements map?

| Editframe element | | Rendermate node |
| - | - | - |
| `<ef-video>` with `sourcein` or `trimstart` | → | `<media>` with an asset from `assets.media` and `sourceIn` |
| `<ef-image>` | → | `<media>` with an asset from `assets.images` |
| `<ef-audio>` with `volume` | → | `<audio>` with `gain` |
| `<ef-text>` | → | `<text>` with `paragraph` content |
| `<ef-captions>` | → | A transcript's words, as `<text>` nodes (step 4) |
| A `div` with a background color or border | → | `<shape>` with a `rect` geometry and a `paint` |
| `object-fit: cover` or `contain` | → | `fit="cover"` or `fit="contain"` |
| CSS `opacity` | → | `common.opacity` |
| CSS `transform: scale() rotate() translate()` | → | `common.transform` with `scaleX`, `scaleY`, `rotate`, `translateX` and `translateY` |

Here is a title over a video, as an Editframe composition and as a document's nodes:

```html Editframe theme={null}
<ef-timegroup mode="contain" class="w-[1920px] h-[1080px] relative">
  <ef-video file-id="…" sourcein="2s" sourceout="10s" class="absolute inset-0 object-cover"></ef-video>
  <ef-timegroup mode="fixed" duration="4s" class="absolute inset-0">
    <ef-text class="absolute w-full text-center top-[500px] text-white text-[64px] font-bold"
      style="font-family: Montserrat">Hello World</ef-text>
  </ef-timegroup>
</ef-timegroup>
```

```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"},
  }}
/>
```

A text node's `position` is where its first line's baseline starts, so set `y` a little below
where the CSS box's top edge was.

### How do timegroup modes become start and duration?

Every node has a `common.start` and `common.duration` in seconds, counted from the start of the
video. Work out each element's window from its timegroup:

| Editframe | | Rendermate |
| - | - | - |
| `mode="fixed"` with `duration="5s"` | → | `common.duration: 5` on each node inside it |
| `mode="sequence"` | → | A `sequence` node, whose children play one after another, or each node's `start` as the previous one's `start` plus its `duration` |
| `mode="contain"` | → | The longest child's length |
| `mode="fit"` | → | The parent's length |
| `offset` | → | Added to `common.start` |
| `overlap` between sequence items | → | The later node's `start` moved earlier by the overlap |
| `sourcein`, `sourceout` | → | `sourceIn`, and `common.duration` as `sourceout` minus `sourcein` |
| A video's own length | → | The file's own length, in seconds |

### How does CSS layout become pixels?

A composition places elements with CSS, usually `position: absolute` and Tailwind classes. A
document places a `media` or `shape` node in a rectangle in pixels, and a `text` node at a
`position` in pixels, both from the canvas's top-left corner. Read each element's box from the
composition at its size, such as `left-[96px] top-[54px] w-[640px] h-[360px]`, and write those
numbers. An element later in the HTML, or with a higher `z-index`, paints on top: give it a later
`common.order` key. [How do order keys work?](https://rendermate.com/docs/documents.md#how-do-order-keys-work) explains the keys.

### How do CSS animations become keyframes?

Editframe seeks each CSS animation to its element's time. In a document, the value itself is
keyframed: `Doc.keys([seconds, value, easing], …)`, timed from the node's own `start`.

| Editframe | | Rendermate |
| - | - | - |
| `@keyframes` from `opacity: 0` to `1` over `0.5s` | → | `common.opacity`: `Doc.keys([0, 0], [0.5, 1])` |
| `@keyframes` on `transform: translateX()` | → | `common.transform.translateX` keyframes, in pixels |
| `animation-delay` | → | The first keyframe's seconds |
| `ease-in`, `ease-out`, `ease-in-out` | → | `"easeInCubic"`, `"easeOutCubic"`, `"easeInOutCubic"` |
| `steps(1)` | → | `"hold"` |
| A fade between two overlapping items | → | Overlap the two nodes and fade in the later one's `common.opacity` |
| `ef-text` with `split="word"` and `stagger` | → | One `text` node per word, each keyframe moved later by the stagger |

***

## (3) How do I replace render data?

Your code writes the values into the JSX, where a composition read `RENDER_DATA` or
`getRenderData()`. Keep your composition as a JSX string with placeholders, such as `{{TITLE}}`,
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 voice-overs 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`:

| Editframe | | Rendermate model |
| - | - | - |
| A pipeline `speak` step | → | A speech model, such as `elevenlabs/v4` or `assemblyai/tts-1`, with the text as its prompt and `voice` as a param |
| A pipeline `transcribe` step and `<ef-captions>` | → | A transcription model, such as `assemblyai/universal-2`, then `text` nodes |

```bash theme={null}
curl https://api.rendermate.com/v1/generations \
  -H "Authorization: Bearer $RENDERMATE_API_KEY" \
  --json '{ "model": "assemblyai/tts-1", "prompt": "Welcome to the launch.", "output": "launch/voice.mp3" }'
```

A transcript has every word with its start and end time; write each line, or each word, 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 play the video?

| Editframe | | Rendermate |
| - | - | - |
| `POST /api/v1/renders`, `npx editframe render` or `renderToVideo` | → | `create_export` (`POST /v1/exports`) with the document and a version |
| `GET /api/v1/renders/:id` and the progress stream | → | `get_export` (`GET /v1/exports/{id}`) |
| `render.completed` and `render.failed` webhooks | → | [Webhooks](https://rendermate.com/docs/webhooks.md): `export.succeeded` and `export.failed` |
| `download_url`, or `GET /api/v1/renders/:id.mp4` | → | The export's `download_url` |
| A still image render | → | `get_frame` (`POST /v1/documents/{id}/frames`), as `jpg`, `png` or `webp` |
| A `publish` step's `hls_url` and the player components | → | A link (`create_link`): a page, an embed and HLS playback |
| Signed playback URLs from `createURLToken` | → | A link with an expiry or a password |

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 keep renders 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 compositions, rebuild each one as a document, check it with `get_frame`, and switch your
code from `createRender` to `create_export` in one release.

### (B) One composition at a time

For a larger integration, keep rendering with Editframe while you move one composition over:

1. Rebuild it as a document.
2. Compare a frame of your Editframe render with `get_frame` at the same time.
3. Switch the code that renders it to `create_export`, and its webhook 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`.
* [MCP server](https://rendermate.com/docs/mcp/overview.md): connect your agent by URL.


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