{
  "openapi": "3.1.1",
  "info": {
    "title": "Multitrack Timeline Renderer API",
    "version": "1.0.0",
    "summary": "Render a video from tracks of clips, stills, sound and titles: trims, fades, crossfades and gain.",
    "description": "Every endpoint performs the same calculation as the human page and returns inputs, result, units, assumptions, sources, warnings and computedAt. MCP endpoint: /mcp."
  },
  "servers": [
    {
      "url": "https://reelcrafttimelinerender.usefulweb.app"
    }
  ],
  "paths": {
    "/api/v1/calculate": {
      "post": {
        "operationId": "calculate",
        "summary": "Render a video from tracks of clips, stills, sound and titles: trims, fades, crossfades and gain.",
        "description": "Renders a Reelcraft timeline into one MP4 video (H.264/AAC) on the usefulweb server. The timeline lists video, image, audio and text tracks; each clip has a start, an in-point and a length, a gain in dB, fade-in and fade-out and an optional crossfade or dip-to-black transition from the clip before it. Pictures are fitted into the canvas (letterboxed or cropped), stacked with the top track on top, titles are drawn as text and all sounds are mixed without normalisation. Send the timeline as JSON and up to eight media files; the report lists every clip as rendered.\n\nMethodology:\n- The timeline is validated first: clips on a track never overlap (later clips move right), lengths, fades and gains are clamped, and the whole video is at most 180 s.\n- Every media clip is read from its in-point for its length; when the source ends early the last frame is held (sound: silence). Pictures are scaled into the canvas — contain = letterboxed with transparent bars, cover = cropped — and overlaid at their start time, from the lowest track to the first (top) track.\n- Fades work on the clip’s transparency, so a faded clip reveals the tracks below (or the background colour). A crossfade of d seconds keeps the previous clip running d seconds past its out-point while the next fades in over it; its sound fades out over the same seconds. A dip fades the previous clip out and the next in, d seconds each.\n- Titles are drawn with ffmpeg drawtext from a text file (no expansion), wrapped to the width, in a size relative to the shorter side of the canvas.\n- Sounds are resampled to 48 kHz stereo (mono copied to both sides at full level), trimmed, changed by clip gain + track gain (dB), faded, delayed to their start and summed without normalisation; a silent track is added when the timeline has no sound. Encoding: libx264 (preset veryfast, CRF 23, yuv420p) and AAC 160 kb/s 48 kHz stereo in MP4 with faststart; the mix peak is measured afterwards with volumedetect.\n\nThe mix is not limited: when several loud sounds play at once the peak can reach 0 dBFS and clip — the report shows the peak, lower the gains if it warns. Titles use the server’s default sans-serif font.",
        "tags": [
          "apps"
        ],
        "x-mcp-tool": "reelcraft_timeline_render",
        "x-owner-app": "reelcraft",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReelcraftTimelineRenderInput"
              },
              "examples": {
                "example1": {
                  "summary": "Clip, crossfade to a still, title and a tone underneath",
                  "value": {
                    "timeline": "{\"width\":320,\"height\":180,\"fps\":25,\"background\":\"#101828\",\"tracks\":[{\"id\":\"title\",\"kind\":\"text\",\"name\":\"T1\",\"gain\":0,\"muted\":false,\"hidden\":false,\"clips\":[{\"id\":\"hello\",\"text\":\"Hello from Reelcraft\",\"start\":0.2,\"in\":0,\"dur\":1.4,\"gain\":0,\"fadeIn\":0.2,\"fadeOut\":0.2,\"pos\":\"bottom\",\"size\":\"m\",\"color\":\"#ffffff\",\"box\":true}]},{\"id\":\"pictures\",\"kind\":\"video\",\"name\":\"V1\",\"gain\":0,\"muted\":false,\"hidden\":false,\"clips\":[{\"id\":\"clip\",\"src\":1,\"start\":0,\"in\":0,\"dur\":0.6,\"gain\":-6,\"fadeIn\":0,\"fadeOut\":0,\"fit\":\"contain\"},{\"id\":\"still\",\"src\":2,\"start\":0.6,\"in\":0,\"dur\":1.4,\"gain\":0,\"fadeIn\":0,\"fadeOut\":0.3,\"fit\":\"cover\",\"transition\":{\"kind\":\"crossfade\",\"dur\":0.4}}]},{\"id\":\"music\",\"kind\":\"audio\",\"name\":\"A1\",\"gain\":0,\"muted\":false,\"hidden\":false,\"clips\":[{\"id\":\"tone\",\"src\":3,\"start\":0.5,\"in\":0,\"dur\":0.5,\"gain\":-12,\"fadeIn\":0.1,\"fadeOut\":0.2}]}],\"markers\":[{\"time\":0.6,\"label\":\"Still\"}]}",
                    "media1": {
                      "filename": "clip.mp4",
                      "contentType": "video/mp4",
                      "contentBase64": "AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAA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ZnjnG4mEXfdkTXbUnKnw3v+zstdwAAAACAGeY0Ql/7GAANowrMwxooRGnjj//T6//L2qvO5zw65TbjG+sqM0LKtm5rlw7mXjLmGMojEpF19mGnnCABkauhdhrw110v110kxG8nTxx1kexesix+NKxtlRpqnZWKE3z2FsX4o0rA9jvHvaFIyTT8oV+nr2rO12hOO17wJqKTUrF8LclZuAAOQwqQUFEZ3Fa//v/2//f8ZJeaqvauy2LUy4D01bMeG4XrXQcVtvVuM/tv6v1WNiii36pfDuYjRJQK4konXr+hm0/T6A4SKELAeWE9J5fS87DUrU8ENguhE7ACZWICIE37tIreUbQRmqhWIvxe7HebdEna6cKqpp2nLfcLgtYq4A5DCszCQxKcxDean/9T+//7vpXAma3AqVdVxiw1JTyrBpgsrr175JzdqC89kaipkAK4zhctCeQnlnHZpoq6qbBZi1w17FYUxeongaygg8eVgRpupSVqUSnHEU3ABm48lpoK4kk7qmBOZJZkTN3MyILms+506rfW3ZnUxhlL7PhguC2HsQf8Nv/NUgluHAASAwqCg7FQ0w/tWff9P9LqueEtJJEkiSJBxh8o+PtwMRrENB2R/b+i+qix+hv6ScsCwdurLEMbAHtwGB7Yhge2IYHtiGB7Yhge2IYHtiGB7Yhge2IUPWIUPWIUPWIUPWIUHrAFB6xCh6xCg9YAoPWAKD2wBQesAUHrAHD3AFB6wBQe4AoPWAKD3AH4ABLDChBZe9Zm+OMku5JJEkkkSJBR7nubUTTQgsshU00ILNTU1O1mmSaKOiySbI3nhyN54cjeeHI3nhyN54cjeeHI3nhyN5yyN5yyN5yyN5yyN5yyN+5fBvcvg3vD8G9y+De5fBvcvg3uXwb3L4N7l8G9y+De5fBvcvg3uXwb3L4N78"
                    },
                    "media2": {
                      "filename": "cover.png",
                      "contentType": "image/png",
                      "contentBase64": "iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAFElEQVR4nGMUCXjHgA2wYBUdtBIAESEBcPFXW6IAAAAASUVORK5CYII="
                    },
                    "media3": {
                      "filename": "tone.mp3",
                      "contentType": "audio/mpeg",
                      "contentBase64": "SUQzAwAAAAAANFRJVDIAAAALAAAAVGVzdCB0b25lAFRQRTEAAAALAAAAdXNlZnVsd2ViAAAAAAAAAAAAAAD/4zjAAAAAAAAAAAAASW5mbwAAAA8AAAAJAAADYABVVVVVVVVVVVVVVWpqampqampqampqgICAgICAgICAgICVlZWVlZWVlZWVlaqqqqqqqqqqqqqqwMDAwMDAwMDAwMDV1dXV1dXV1dXV1erq6urq6urq6urq//////////////8AAAAATGF2ZiBsYW1lAAAAAAAAAAAAAAAAJAJgAAAAAAAAA2DhWsr/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/4xjEAAyokqh5SAAAD22/4d3d3v/RESv5d3f5SSwbgLgLgLg3PlAxw/yhz9/R7+j38HAxkAffWBDmgH+Ud39CgQkKRFiBEz//4xjECA3w6qDBlDgA5MkBJoc7/EBhyQNsGAOBS4BzxgokpgaxKNMIQcg9HhsNv/x0ajU4GhL/hIGhKdBq////////////////4xjECw8QpjgB3gAA+GhGAAYBYAxfoGgIGBqDgYSYPhhOi9GJrekZAAshh+g1GCWCYAgOwqAOYCAAJbFkl+rfoA//b7/L5fX/4xjECQqwjo5YCbRi/n3qiICUpOT5DnL9WR4Ms63+X06P/v9H/+//+nJf+t9GXtsQBtdfrcl5/f+V1eIwQL/nESYRBr0i8sr/4xjEGQtIloJYCnZigON9/lP9n9b/T9v37q/9P2//1fRV///5O3qXQOATAhMCmwMhwSPQYQHRBgcjAEgOoWAuAIB4YAGRACL/4xjEJgpYpjQABvxEbLUb6v///jGAGAADfQMAIBwMCwEgEAvAxGjLAx9m1A6uxbA3pD+AwbAgAwDAJACBeAkAoj4ZgQohCDD/4xjENw04pkABVgAAAR/itBmDQVp/WLIJwRwGKJAwM/DsNjcZwDM5yDpBHgAgGAy0hSC/v8A3wDWMsT8L2PP//zMe5udL5uv/4xjEPRaRlozJlWgAL///+brMwdB8Bn//oB8BmiY1//9BMaaJuNf//3IVBd2AA//aqqp/9VVVOdqOJAwVLAwCARKyIBJV/QX/4xjEHQ1AmqR5xggBBn/0FCv8FBn/FBQp/xQYK/oKFHfiSf/9TEFNRTQuMSAoYWxwaGEgMClVVVVVVVVVVVVVVVVVVVVVVVU="
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReelcraftTimelineRenderResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tool": {
      "get": {
        "operationId": "getToolDefinition",
        "summary": "Inputs, output schema and examples for this tool",
        "responses": {
          "200": {
            "description": "Tool definition.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details. 422 responses include per-field `errors`.",
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "field",
                "message"
              ],
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ReelcraftTimelineRenderInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "timeline": {
            "title": "Timeline (JSON)",
            "description": "width, height (even, ≤ 1920, ≤ 1920×1080 pixels), fps (24/25/30), background (#rrggbb), tracks [{kind: video|image|audio|text, name, gain, muted, hidden, clips:[{src: 1–8, start, in, dur, gain, fadeIn, fadeOut, transition:{kind: crossfade|dip, dur}, mute, fit: contain|cover} or {text, pos: top|center|bottom, size: s|m|l, color, box}]}]. The first track is drawn on top. Reelcraft writes this for you.",
            "type": "string",
            "maxLength": 200000
          },
          "media1": {
            "title": "Media file 1 (src 1)",
            "description": "Video (MP4, MOV, MKV/WebM, AVI, MPEG-TS), audio (MP3, WAV, FLAC, Ogg, M4A, AIFF) or a still (PNG, JPEG, WebP); 189 MB for all files together. Processed in a private temporary folder that is deleted afterwards; the result can be downloaded for about 2 hours. Upload as {filename, contentType?, contentBase64}. Max 184320 KiB. Accepts .mp4,.m4v,.mov,.mkv,.webm,.avi,.ts,.mts,.mpg,.mpeg,.mp3,.wav,.flac,.ogg,.oga,.opus,.m4a,.aac,.aif,.aiff,.png,.jpg,.jpeg,.webp,video/*,audio/*,image/png,image/jpeg,image/webp.",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "filename",
              "contentBase64"
            ],
            "properties": {
              "filename": {
                "type": "string"
              },
              "contentType": {
                "type": "string"
              },
              "contentBase64": {
                "type": "string"
              }
            }
          },
          "media2": {
            "title": "Media file 2 (src 2)",
            "type": "object",
            "description": "Upload as {filename, contentType?, contentBase64}. Max 184320 KiB. Accepts .mp4,.m4v,.mov,.mkv,.webm,.avi,.ts,.mts,.mpg,.mpeg,.mp3,.wav,.flac,.ogg,.oga,.opus,.m4a,.aac,.aif,.aiff,.png,.jpg,.jpeg,.webp,video/*,audio/*,image/png,image/jpeg,image/webp.",
            "additionalProperties": false,
            "required": [
              "filename",
              "contentBase64"
            ],
            "properties": {
              "filename": {
                "type": "string"
              },
              "contentType": {
                "type": "string"
              },
              "contentBase64": {
                "type": "string"
              }
            }
          },
          "media3": {
            "title": "Media file 3 (src 3)",
            "type": "object",
            "description": "Upload as {filename, contentType?, contentBase64}. Max 184320 KiB. Accepts .mp4,.m4v,.mov,.mkv,.webm,.avi,.ts,.mts,.mpg,.mpeg,.mp3,.wav,.flac,.ogg,.oga,.opus,.m4a,.aac,.aif,.aiff,.png,.jpg,.jpeg,.webp,video/*,audio/*,image/png,image/jpeg,image/webp.",
            "additionalProperties": false,
            "required": [
              "filename",
              "contentBase64"
            ],
            "properties": {
              "filename": {
                "type": "string"
              },
              "contentType": {
                "type": "string"
              },
              "contentBase64": {
                "type": "string"
              }
            }
          },
          "media4": {
            "title": "Media file 4 (src 4)",
            "type": "object",
            "description": "Upload as {filename, contentType?, contentBase64}. Max 184320 KiB. Accepts .mp4,.m4v,.mov,.mkv,.webm,.avi,.ts,.mts,.mpg,.mpeg,.mp3,.wav,.flac,.ogg,.oga,.opus,.m4a,.aac,.aif,.aiff,.png,.jpg,.jpeg,.webp,video/*,audio/*,image/png,image/jpeg,image/webp.",
            "additionalProperties": false,
            "required": [
              "filename",
              "contentBase64"
            ],
            "properties": {
              "filename": {
                "type": "string"
              },
              "contentType": {
                "type": "string"
              },
              "contentBase64": {
                "type": "string"
              }
            }
          },
          "media5": {
            "title": "Media file 5 (src 5)",
            "type": "object",
            "description": "Upload as {filename, contentType?, contentBase64}. Max 184320 KiB. Accepts .mp4,.m4v,.mov,.mkv,.webm,.avi,.ts,.mts,.mpg,.mpeg,.mp3,.wav,.flac,.ogg,.oga,.opus,.m4a,.aac,.aif,.aiff,.png,.jpg,.jpeg,.webp,video/*,audio/*,image/png,image/jpeg,image/webp.",
            "additionalProperties": false,
            "required": [
              "filename",
              "contentBase64"
            ],
            "properties": {
              "filename": {
                "type": "string"
              },
              "contentType": {
                "type": "string"
              },
              "contentBase64": {
                "type": "string"
              }
            }
          },
          "media6": {
            "title": "Media file 6 (src 6)",
            "type": "object",
            "description": "Upload as {filename, contentType?, contentBase64}. Max 184320 KiB. Accepts .mp4,.m4v,.mov,.mkv,.webm,.avi,.ts,.mts,.mpg,.mpeg,.mp3,.wav,.flac,.ogg,.oga,.opus,.m4a,.aac,.aif,.aiff,.png,.jpg,.jpeg,.webp,video/*,audio/*,image/png,image/jpeg,image/webp.",
            "additionalProperties": false,
            "required": [
              "filename",
              "contentBase64"
            ],
            "properties": {
              "filename": {
                "type": "string"
              },
              "contentType": {
                "type": "string"
              },
              "contentBase64": {
                "type": "string"
              }
            }
          },
          "media7": {
            "title": "Media file 7 (src 7)",
            "type": "object",
            "description": "Upload as {filename, contentType?, contentBase64}. Max 184320 KiB. Accepts .mp4,.m4v,.mov,.mkv,.webm,.avi,.ts,.mts,.mpg,.mpeg,.mp3,.wav,.flac,.ogg,.oga,.opus,.m4a,.aac,.aif,.aiff,.png,.jpg,.jpeg,.webp,video/*,audio/*,image/png,image/jpeg,image/webp.",
            "additionalProperties": false,
            "required": [
              "filename",
              "contentBase64"
            ],
            "properties": {
              "filename": {
                "type": "string"
              },
              "contentType": {
                "type": "string"
              },
              "contentBase64": {
                "type": "string"
              }
            }
          },
          "media8": {
            "title": "Media file 8 (src 8)",
            "type": "object",
            "description": "Upload as {filename, contentType?, contentBase64}. Max 184320 KiB. Accepts .mp4,.m4v,.mov,.mkv,.webm,.avi,.ts,.mts,.mpg,.mpeg,.mp3,.wav,.flac,.ogg,.oga,.opus,.m4a,.aac,.aif,.aiff,.png,.jpg,.jpeg,.webp,video/*,audio/*,image/png,image/jpeg,image/webp.",
            "additionalProperties": false,
            "required": [
              "filename",
              "contentBase64"
            ],
            "properties": {
              "filename": {
                "type": "string"
              },
              "contentType": {
                "type": "string"
              },
              "contentBase64": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "timeline"
        ]
      },
      "ReelcraftTimelineRenderResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "durationSeconds",
              "width",
              "height",
              "fps",
              "tracks",
              "clips",
              "mediaClips",
              "textClips",
              "audioClips",
              "transitions",
              "sources",
              "audioPeakDb",
              "outputBytes",
              "artifact",
              "renderedClips"
            ],
            "properties": {
              "durationSeconds": {
                "type": "number"
              },
              "width": {
                "type": "integer"
              },
              "height": {
                "type": "integer"
              },
              "fps": {
                "type": "integer"
              },
              "tracks": {
                "type": "integer"
              },
              "clips": {
                "type": "integer"
              },
              "mediaClips": {
                "type": "integer"
              },
              "textClips": {
                "type": "integer"
              },
              "audioClips": {
                "type": "integer"
              },
              "transitions": {
                "type": "integer"
              },
              "sources": {
                "type": "integer"
              },
              "audioPeakDb": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Sample peak of the mixed sound in dBFS (null = silence)."
              },
              "outputBytes": {
                "type": "integer"
              },
              "artifact": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "renderedClips": {
                "type": "array",
                "description": "Every clip as rendered: track, timeline window (incl. crossfade handles) and the effective fades.",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "track",
                    "clip",
                    "start",
                    "end",
                    "in",
                    "fadeIn",
                    "fadeOut",
                    "transition"
                  ],
                  "properties": {
                    "track": {
                      "type": "string"
                    },
                    "clip": {
                      "type": "string"
                    },
                    "start": {
                      "type": "number"
                    },
                    "end": {
                      "type": "number"
                    },
                    "in": {
                      "type": "number"
                    },
                    "fadeIn": {
                      "type": "number"
                    },
                    "fadeOut": {
                      "type": "number"
                    },
                    "transition": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}