Skip to main content
An api.video video is a file you uploaded, encoded and delivered from the URLs in its assets. In Rendermate, a video plays from a document through a link: the document holds the video as a media node, and the link gives it a page, an embed, HLS playback, thumbnails and storyboards. This guide moves an api.video library over in the order you’d do it: the files first, then playback, then uploads and events.

(1) How do I get my videos out of api.video?

Import each video’s MP4 into your workspace. A video’s assets.mp4 is its MP4 when the video has mp4Support; turn it on with PATCH /videos/{videoId} and {"mp4Support": true} for videos that don’t have it. Then import the file with import_asset (POST /v1/imports), named after the video:
For a private video, read the video again with GET /videos/{videoId} for a fresh private token in its URLs just before you import. An import takes files up to 5 GB; call get_import until its status is succeeded. To move a whole library, page through GET /videos with currentPage and pageSize, and do this for each video.

(2) How do I make each video playable?

Create a document that plays the file from start to end, then make a link to it.

(A) Let your coding agent move the library

Connect your agent to https://api.rendermate.com/mcp (Claude Code, Cursor) with your api.video key in its environment. It lists your videos, imports each file, and calls create_document and create_link for it, following the steps below.

(B) Create the documents with the API

Create a document with create_document (POST /v1/documents), with the video’s title as its name, then commit its nodes with edit_document (POST /v1/documents/{id}/versions). How do I edit a document? shows the request. In the same edit, set the canvas’s width, height, duration and frameRate from the video’s encoding.metadata in GET /videos/{videoId}/status, and add one media node that runs the whole video:
The video plays its own sound. Then call create_link (POST /v1/documents/{id}/links): the link works as soon as it’s made, and its segments render as they’re first watched.

How do api.video’s videos map?


(3) How do I replace player and HLS URLs?

Read a link’s URLs from get_link and get_link_playback, and put them where your code used a video’s assets: The api.video player SDK, hls.js and native players play any HLS playlist, so playlist_url works in them as it is; ask get_link_playback again for new URLs before expires_at. A link also has a storyboard_url for scrubbing previews, and poster_url with thumbnail.jpg changed to animated.gif gives a few seconds as a GIF.

(4) How do I replace upload tokens?

An upload token only records assets whose names start with its prefix, up to its max_size, so a browser uploads without ever holding your API key. Your code creates the document and link when the asset.created webhook arrives.

(5) How do I move captions, summaries and downloads?

Call a model through create_generation (POST /v1/generations), at the provider’s own price. A transcript has every word with its start and end time; write each line as a text node starting at its first word, and commit it as a new version of the video’s document. A link that follows latest plays the captioned version once you commit it. Models lists every model.

How do webhooks map?


(6) How do I switch over?

(A) All at once

For a small library, move every video, check a few links on the devices you support, then switch your code from assets URLs to link URLs in one release.

(B) Newest videos first

For a large library, keep playing older videos from api.video while new ones go to Rendermate:
  1. Send new uploads to an upload token, and create a document and a link for each.
  2. Move older videos in batches, newest first, and store each video’s link ID next to its videoId.
  3. Switch each page to the link’s URLs once its video has moved.
  4. Delete the videos from api.video when nothing plays them anymore.

Next steps

  • Documents: edit a video, add text and captions, and keep every version.
  • Custom domains: serve link pages on your own domain.
  • Webhooks: verify and handle asset.created and export.succeeded.