From 5d2ab8cf8ee8e1645e7e63c27a71a995748b38d9 Mon Sep 17 00:00:00 2001 From: dazzatronus Date: Fri, 4 Sep 2026 22:53:02 +1000 Subject: [PATCH] docs: document which start-image option each video model takes --- schemas/imagetovideoasset.yaml | 2 +- schemas/videoasset.yaml | 6 ++++-- tests/smoke.cjs | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/schemas/imagetovideoasset.yaml b/schemas/imagetovideoasset.yaml index f8d76a6..14477b3 100644 --- a/schemas/imagetovideoasset.yaml +++ b/schemas/imagetovideoasset.yaml @@ -3,7 +3,7 @@ ImageToVideoAsset: description: | **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset) with `prompt`, a `model` that accepts a starting image, and that image in - `options.inputSrc` — for example `seedance-2.0-image-to-video`.** This type continues to + `options.startSrc` — for example `seedance-2.0-image-to-video`.** This type continues to function and is internally rewritten to VideoAsset; no behaviour change for existing integrations. diff --git a/schemas/videoasset.yaml b/schemas/videoasset.yaml index 1bc353a..5263c4a 100644 --- a/schemas/videoasset.yaml +++ b/schemas/videoasset.yaml @@ -7,7 +7,8 @@ - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file. - **Generated:** set `prompt` to describe the motion. Choose a generator with `model` and configure it with model-specific `options`. Models that - animate a starting image take it as `options.inputSrc`; the default model + animate an image take it as `options.startSrc` (the original + image-to-video models use `options.inputSrc`); the default model generates from the prompt alone. The generated `src` is filled in automatically. - **Both:** `src` acts as a preview placeholder while `prompt` drives @@ -35,7 +36,8 @@ at render time and fills `src` automatically; an existing `src` is treated as a preview placeholder and replaced. Use `model` to choose the generator and `options` to configure it. A starting image goes in - `options.inputSrc`, on the models that accept one. + `options.startSrc` — or `options.inputSrc` on the original + image-to-video models — on the models that accept one. type: string maxLength: 4000 example: Slowly zoom out and orbit left around the object. diff --git a/tests/smoke.cjs b/tests/smoke.cjs index 81e3eb4..e492fee 100644 --- a/tests/smoke.cjs +++ b/tests/smoke.cjs @@ -236,14 +236,14 @@ async function run() { assert.strictEqual(result.model, "flux-schnell"); }); - check("Parse videoAsset with prompt + options.inputSrc", () => { + check("Parse videoAsset with prompt + options.startSrc", () => { const result = zodCjs.videoAssetSchema.parse({ type: "video", prompt: "Slowly zoom out and orbit left around the object", - options: { inputSrc: "https://example.com/input-image.jpg" }, + options: { startSrc: "https://example.com/input-image.jpg" }, }); assert.strictEqual(result.prompt, "Slowly zoom out and orbit left around the object"); - assert.strictEqual(result.options.inputSrc, "https://example.com/input-image.jpg"); + assert.strictEqual(result.options.startSrc, "https://example.com/input-image.jpg"); }); check("Parse videoAsset with prompt + model + options", () => { @@ -389,7 +389,7 @@ async function run() { check("REJECT video with only options and no src/prompt (options never satisfies the rule)", () => { assert.throws(() => - zodCjs.videoAssetSchema.parse({ type: "video", options: { inputSrc: "https://example.com/input.jpg" } }) + zodCjs.videoAssetSchema.parse({ type: "video", options: { startSrc: "https://example.com/input.jpg" } }) ); });