curl --request POST \
--url https://api.rendermate.com/v1/documents/{document_id}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_version": 1,
"message": "<string>",
"commit_id": "<string>",
"edits": [
{
"new_text": "<string>",
"old_text": "<string>"
}
],
"jsx": "<string>"
}
'import requests
url = "https://api.rendermate.com/v1/documents/{document_id}/versions"
payload = {
"base_version": 1,
"message": "<string>",
"commit_id": "<string>",
"edits": [
{
"new_text": "<string>",
"old_text": "<string>"
}
],
"jsx": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
base_version: 1,
message: '<string>',
commit_id: '<string>',
edits: [{new_text: '<string>', old_text: '<string>'}],
jsx: '<string>'
})
};
fetch('https://api.rendermate.com/v1/documents/{document_id}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rendermate.com/v1/documents/{document_id}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'base_version' => 1,
'message' => '<string>',
'commit_id' => '<string>',
'edits' => [
[
'new_text' => '<string>',
'old_text' => '<string>'
]
],
'jsx' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rendermate.com/v1/documents/{document_id}/versions"
payload := strings.NewReader("{\n \"base_version\": 1,\n \"message\": \"<string>\",\n \"commit_id\": \"<string>\",\n \"edits\": [\n {\n \"new_text\": \"<string>\",\n \"old_text\": \"<string>\"\n }\n ],\n \"jsx\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.rendermate.com/v1/documents/{document_id}/versions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_version\": 1,\n \"message\": \"<string>\",\n \"commit_id\": \"<string>\",\n \"edits\": [\n {\n \"new_text\": \"<string>\",\n \"old_text\": \"<string>\"\n }\n ],\n \"jsx\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rendermate.com/v1/documents/{document_id}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base_version\": 1,\n \"message\": \"<string>\",\n \"commit_id\": \"<string>\",\n \"edits\": [\n {\n \"new_text\": \"<string>\",\n \"old_text\": \"<string>\"\n }\n ],\n \"jsx\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"author": {
"id": "api_key_01JF3Q1C5E7G9J2M4N6Q8S0T2W",
"name": "ci",
"via": "api"
},
"commit_id": "0193f2a4-c1d8-7b2e-9f3a-6c5d4e8b7a10",
"committed_at": "2026-12-03T10:15:00Z",
"id": "doc_01JF3QZ8X6N2V7K4M9P5R1T3WY",
"message": "Shorten the intro",
"sha256": "9f2c4e1a7b3d5f8e0c6a2b4d8f1e3c5a7b9d0f2e4c6a8b1d3f5e7c9a0b2d4f6e",
"version": 12
}Edit document
Change a document by committing an edit on base_version, which makes a new version. Give edits, exact replacements in the JSX get_document returned for base_version: each old_text must occur exactly once, spaces and line breaks included (copy it from that JSX, and include the node’s id=”…” to make it unique), and they apply in order. Or give jsx, the whole edited document: do that to add the first nodes to an empty document, whose <timeline ... /> closes itself. Long strings and arrays the JSX cut (Doc.cut, …Doc.more) stay as they are when left in place. If another commit landed after base_version, this fails with version.conflict: read the document again and redo the edit.
How to write what most videos need (https://rendermate.com/docs/documents has the rest):
- Every node has an
id="...", unique and without/, andcommon={{start: 0, duration: 3, order: "a1"}}: its window in seconds, which may not reach past the canvas’s duration, and its paint order among its siblings ("a0"is under"a1"). - Files are declared before
export default, each with an id that nodes use and a workspace asset, uploaded with upload_asset or imported with import_asset first:export const assets = {fonts: [{id: "inter", family: "Inter", weight: 700, style: "normal", source: {type: "uri", uri: "asset://brand/Inter-Bold.ttf"}}], images: [{id: "logo", source: {type: "uri", uri: "asset://brand/logo.png"}}], media: [{id: "intro", source: {type: "uri", uri: "asset://launch/intro.mp4"}}]}; - Text needs a font: a .ttf or .otf asset declared in
fonts.<text id="title" common={{start: 0, duration: 3, order: "a3"}} content={{type: "paragraph", text: "Hello world", position: {x: 120, y: 860}, width: 1680, align: "left", style: {fontId: "inter", fontSize: 96, color: "#ffffff"}}} /> - A background colour:
<fill id="bg" common={{order: "a0"}} paint={{style: "fill", source: {type: "solid", color: "#10233f"}}} /> - A shape:
<shape id="dot" common={{start: 0, duration: 3, order: "a2"}} geometry={{type: "circle", center: {x: 960, y: 540}, radius: 100}} paint={{style: "fill", source: {type: "solid", color: "#ffd84d"}}} />.geometrycan also be{type: "rect", rect: {x, y, width, height}}or{type: "oval", rect: {...}}. - A video, or an image from
images:<media id="clip" common={{start: 0, duration: 4, order: "a1"}} assetId="intro" destination={{x: 0, y: 0, width: 1920, height: 1080}} fit="cover" sampling={{filter: "linear", mipmap: "linear"}} sourceIn={1} />.fit="contain"fits it insidedestination;sourceInis where in the file it starts, in seconds. - Sound:
<audio id="music" common={{start: 0, duration: 6}} assetId="intro" gain={0.3} /> - Animation: a number becomes keyframes,
Doc.keys([seconds, value], ...)timed from the node’s start, such asopacity: Doc.keys([0, 0], [0.5, 1])incommonorradius: Doc.keys([0, 20], [3, 120]). - A field the format doesn’t have is refused with jsx.unreadable, whose message says what that place takes.
MCP tool: edit_document.
curl --request POST \
--url https://api.rendermate.com/v1/documents/{document_id}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_version": 1,
"message": "<string>",
"commit_id": "<string>",
"edits": [
{
"new_text": "<string>",
"old_text": "<string>"
}
],
"jsx": "<string>"
}
'import requests
url = "https://api.rendermate.com/v1/documents/{document_id}/versions"
payload = {
"base_version": 1,
"message": "<string>",
"commit_id": "<string>",
"edits": [
{
"new_text": "<string>",
"old_text": "<string>"
}
],
"jsx": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
base_version: 1,
message: '<string>',
commit_id: '<string>',
edits: [{new_text: '<string>', old_text: '<string>'}],
jsx: '<string>'
})
};
fetch('https://api.rendermate.com/v1/documents/{document_id}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rendermate.com/v1/documents/{document_id}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'base_version' => 1,
'message' => '<string>',
'commit_id' => '<string>',
'edits' => [
[
'new_text' => '<string>',
'old_text' => '<string>'
]
],
'jsx' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rendermate.com/v1/documents/{document_id}/versions"
payload := strings.NewReader("{\n \"base_version\": 1,\n \"message\": \"<string>\",\n \"commit_id\": \"<string>\",\n \"edits\": [\n {\n \"new_text\": \"<string>\",\n \"old_text\": \"<string>\"\n }\n ],\n \"jsx\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.rendermate.com/v1/documents/{document_id}/versions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_version\": 1,\n \"message\": \"<string>\",\n \"commit_id\": \"<string>\",\n \"edits\": [\n {\n \"new_text\": \"<string>\",\n \"old_text\": \"<string>\"\n }\n ],\n \"jsx\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rendermate.com/v1/documents/{document_id}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base_version\": 1,\n \"message\": \"<string>\",\n \"commit_id\": \"<string>\",\n \"edits\": [\n {\n \"new_text\": \"<string>\",\n \"old_text\": \"<string>\"\n }\n ],\n \"jsx\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"author": {
"id": "api_key_01JF3Q1C5E7G9J2M4N6Q8S0T2W",
"name": "ci",
"via": "api"
},
"commit_id": "0193f2a4-c1d8-7b2e-9f3a-6c5d4e8b7a10",
"committed_at": "2026-12-03T10:15:00Z",
"id": "doc_01JF3QZ8X6N2V7K4M9P5R1T3WY",
"message": "Shorten the intro",
"sha256": "9f2c4e1a7b3d5f8e0c6a2b4d8f1e3c5a7b9d0f2e4c6a8b1d3f5e7c9a0b2d4f6e",
"version": 12
}Authorizations
Body
Response
Created
The Rendermate document at this version, written
as JSX; only when it's read, not when it's created or committed. Edit it with
edit_document, giving this version as base_version.