From 37bd18b1a56e239f06d94182c2ba747208612fbc Mon Sep 17 00:00:00 2001 From: Abdelrahman Essawy Date: Tue, 23 Jun 2026 00:30:39 +0300 Subject: [PATCH] docs(compose): format the simplest-render code samples --- jobs/compose.mdx | 66 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 54 insertions(+), 12 deletions(-) diff --git a/jobs/compose.mdx b/jobs/compose.mdx index eed6f41..3f8277d 100644 --- a/jobs/compose.mdx +++ b/jobs/compose.mdx @@ -42,12 +42,26 @@ const job = await client.jobs.create({ type: "compose", params: { schemaVersion: 1, - output: { format: "mp4", resolution: { width: 1280, height: 720 }, fps: 30 }, + output: { + format: "mp4", + resolution: { width: 1280, height: 720 }, + fps: 30, + }, timeline: { tracks: [ - { clips: [ - { asset: { type: "video", src: "https://cdn.rendobar.com/assets/examples/a.mp4", trim: { from: 0, to: 3 } }, start: 0, length: 3 }, - ] }, + { + clips: [ + { + asset: { + type: "video", + src: "https://cdn.rendobar.com/assets/examples/a.mp4", + trim: { from: 0, to: 3 }, + }, + start: 0, + length: 3, + }, + ], + }, ], }, }, @@ -67,12 +81,26 @@ res = requests.post( "type": "compose", "params": { "schemaVersion": 1, - "output": {"format": "mp4", "resolution": {"width": 1280, "height": 720}, "fps": 30}, + "output": { + "format": "mp4", + "resolution": {"width": 1280, "height": 720}, + "fps": 30, + }, "timeline": { "tracks": [ - {"clips": [ - {"asset": {"type": "video", "src": "https://cdn.rendobar.com/assets/examples/a.mp4", "trim": {"from": 0, "to": 3}}, "start": 0, "length": 3} - ]} + { + "clips": [ + { + "asset": { + "type": "video", + "src": "https://cdn.rendobar.com/assets/examples/a.mp4", + "trim": {"from": 0, "to": 3}, + }, + "start": 0, + "length": 3, + } + ] + } ] }, }, @@ -88,12 +116,26 @@ curl -X POST https://api.rendobar.com/jobs \ "type": "compose", "params": { "schemaVersion": 1, - "output": { "format": "mp4", "resolution": { "width": 1280, "height": 720 }, "fps": 30 }, + "output": { + "format": "mp4", + "resolution": { "width": 1280, "height": 720 }, + "fps": 30 + }, "timeline": { "tracks": [ - { "clips": [ - { "asset": { "type": "video", "src": "https://cdn.rendobar.com/assets/examples/a.mp4", "trim": { "from": 0, "to": 3 } }, "start": 0, "length": 3 } - ] } + { + "clips": [ + { + "asset": { + "type": "video", + "src": "https://cdn.rendobar.com/assets/examples/a.mp4", + "trim": { "from": 0, "to": 3 } + }, + "start": 0, + "length": 3 + } + ] + } ] } }