Payload and output preview

Payload example

{
  "version": "v1",
  "output": {
    "width": 1080,
    "height": 1920,
    "fps": 30
  },
  "assets": [
    { "id": "porsche-video", "type": "video", "url": "https://pub-2ad5592bc4ca44abb609acfc0b7c5ceb.r2.dev/reel-forge-website-assets/porsche%20clips%20stitched.mp4" },
    { "id": "porsche-audio", "type": "audio", "url": "https://pub-2ad5592bc4ca44abb609acfc0b7c5ceb.r2.dev/reel-forge-website-assets/porsch%20sound%20clip.mp3" }
  ],
  "composition": {
    "timeline": [
      { "id": "video-layer", "type": "video", "asset_id": "porsche-video", "time": { "start_seconds": 0, "duration_seconds": 15.1 } },
      { "id": "audio-layer", "type": "audio", "asset_id": "porsche-audio", "time": { "start_seconds": 0, "duration_seconds": 15.1 }, "media_settings": { "volume": 1.0 } }
    ]
  }
}

Output preview

A 9:16 vertical video with a synchronized background audio track.

Stitch Video and Audio

Combine video and audio layers in the same timeline by defining shared or overlapping time windows.

Input assets

This example uses a stitched vertical video and a high-quality soundtrack:

Why this works

When combining multiple media types:

  1. Layer synchronization: Both the video-layer and audio-layer share a start_seconds: 0, causing them to begin playback simultaneously.
  2. Explicit duration: By setting a matching duration_seconds: 15.1, both layers are pinned to the exact length of the base video.
  3. Volume control: The media_settings.volume: 1.0 sets the soundtrack at full gain. If your video has its own audio you want to keep, you can lower this (e.g., 0.3) to create a background music effect.