{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"mode":{"type":"string","const":"t2v"},"prompt":{"description":"Free-form prompt describing the video.","type":"string","minLength":1},"aspect_ratio":{"description":"Output aspect ratio. `auto` (default) picks one from the prompt and any references.","type":"string","enum":["auto","21:9","2:1","16:9","4:3","1:1","3:4","9:16"]},"duration":{"description":"Video duration in seconds (any whole second from 5 to 20), or \"auto\" (default) to fit the content.","anyOf":[{"type":"integer","minimum":5,"maximum":20},{"type":"string","const":"auto"}]},"resolution":{"description":"`hd` (default) or `fhd` for a higher-resolution result finished by the video upsampler.","type":"string","enum":["hd","fhd"]},"generate_audio":{"description":"Generate synchronized audio alongside the video. Defaults to true.","type":"boolean"},"safety_tolerance":{"description":"Tolerance for input/output harm moderation, 0 (strictest) to 4. Defaults to 2. Sexual content is capped at level 3 and hate content at level 2 regardless of the requested tolerance; requests with conditioning media are capped at level 2.","type":"integer","minimum":0,"maximum":4},"draft":{"description":"Generate a fast, low-cost preview instead of a final render, at a reduced flat price. Only available at hd resolution.","type":"boolean"}},"required":["mode","prompt"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"i2v"},"prompt":{"description":"Free-form prompt describing the video.","type":"string","minLength":1},"keyframes":{"anyOf":[{"description":"A single image (HTTPS URL or base64) as the opening frame.","type":"string"},{"description":"A single [seconds, image] pair.","type":"array","prefixItems":[{"type":"number"},{"type":"string"}]},{"description":"Untimed images (1-10). One starts the video; two start and end it; with more, the first starts it, the last ends it, and the rest fall evenly in between. 3+ images require an explicit whole-number `duration`.","minItems":1,"maxItems":10,"type":"array","items":{"type":"string"}},{"description":"Timed [seconds, image] pairs (1-10), e.g. [[0, \"...\"], [3.5, \"...\"]]. With `duration: \"auto\"` the video runs to the last pair's second, rounded up (20s max).","minItems":1,"maxItems":10,"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"string"}]}}]},"aspect_ratio":{"description":"Output aspect ratio. `auto` (default) picks one from the prompt and any references.","type":"string","enum":["auto","21:9","2:1","16:9","4:3","1:1","3:4","9:16"]},"duration":{"description":"Video duration in seconds (any whole second from 5 to 20), or \"auto\" (default) to fit the content.","anyOf":[{"type":"integer","minimum":5,"maximum":20},{"type":"string","const":"auto"}]},"resolution":{"description":"`hd` (default) or `fhd` for a higher-resolution result finished by the video upsampler.","type":"string","enum":["hd","fhd"]},"generate_audio":{"description":"Generate synchronized audio alongside the video. Defaults to true.","type":"boolean"},"safety_tolerance":{"description":"Tolerance for input/output harm moderation, 0 (strictest) to 4. Defaults to 2. Sexual content is capped at level 3 and hate content at level 2 regardless of the requested tolerance; requests with conditioning media are capped at level 2.","type":"integer","minimum":0,"maximum":4},"draft":{"description":"Generate a fast, low-cost preview instead of a final render, at a reduced flat price. Only available at hd resolution.","type":"boolean"}},"required":["mode","prompt","keyframes"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"v2v"},"prompt":{"description":"Free-form prompt describing the video.","type":"string","minLength":1},"start_video":{"description":"The video to continue: an HTTPS URL or base64 mp4 (<= 50MB, <= 15s). The generated clip carries on from its final frames.","type":"string"},"aspect_ratio":{"description":"Output aspect ratio. `auto` (default) picks one from the prompt and any references.","type":"string","enum":["auto","21:9","2:1","16:9","4:3","1:1","3:4","9:16"]},"duration":{"description":"Video duration in seconds (any whole second from 5 to 20), or \"auto\" (default) to fit the content.","anyOf":[{"type":"integer","minimum":5,"maximum":20},{"type":"string","const":"auto"}]},"resolution":{"description":"`hd` (default) or `fhd` for a higher-resolution result finished by the video upsampler.","type":"string","enum":["hd","fhd"]},"generate_audio":{"description":"Generate synchronized audio alongside the video. Defaults to true.","type":"boolean"},"safety_tolerance":{"description":"Tolerance for input/output harm moderation, 0 (strictest) to 4. Defaults to 2. Sexual content is capped at level 3 and hate content at level 2 regardless of the requested tolerance; requests with conditioning media are capped at level 2.","type":"integer","minimum":0,"maximum":4},"draft":{"description":"Generate a fast, low-cost preview instead of a final render, at a reduced flat price. Only available at hd resolution.","type":"boolean"}},"required":["mode","prompt","start_video"],"additionalProperties":false}]}