View raw JSON
{
"type": "object",
"required": [
"body"
],
"properties": {
"body": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"content"
],
"~standard": {
"vendor": "zod",
"version": 1,
"jsonSchema": {}
},
"properties": {
"ratio": {
"enum": [
"16:9",
"4:3",
"1:1",
"3:4",
"9:16",
"21:9",
"adaptive"
],
"type": "string",
"default": "adaptive",
"description": "\"adaptive\" (the default) matches your inputs and is ALWAYS safe. A specific ratio is accepted ONLY for text-to-video and reference-to-video. First-frame/last-frame, video editing, and video extension all inherit the aspect ratio of their source and REQUIRE \"adaptive\" - anything else is rejected (up front for first-frame/last-frame, and by the model after queueing for editing and extension)."
},
"content": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"required": [
"type",
"text"
],
"properties": {
"text": {
"type": "string",
"maxLength": 6000,
"minLength": 1,
"description": "Text prompt describing the video (recommended <1000 words). Refer to your other content items by ordinal, numbered per type in array order: @Image1, @Image2, @Video1, @Audio1 - and say what each one supplies (appearance, motion, timbre) and what it should not. Mark sounds with () music, <> sound effects, {} dialogue, 【】 subtitles; prefix non-English dialogue with its language."
},
"type": {
"type": "string",
"const": "text"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"type",
"image_url"
],
"properties": {
"role": {
"enum": [
"first_frame",
"last_frame",
"reference_image"
],
"type": "string",
"description": "first_frame (image-to-video, default) pins the exact opening frame; last_frame (only with a first_frame) pins the closing one; reference_image (up to 30) is soft guidance for subject or style, not a frame."
},
"type": {
"type": "string",
"const": "image_url"
},
"image_url": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"type",
"video_url"
],
"properties": {
"role": {
"type": "string",
"const": "reference_video",
"description": "Reference video (up to 10, each 2-30s, total <=30s) for multimodal generation, video editing, or extension."
},
"type": {
"type": "string",
"const": "video_url"
},
"video_url": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"type",
"audio_url"
],
"properties": {
"role": {
"type": "string",
"const": "reference_audio",
"description": "Reference audio (up to 10, each 2-30s, total <=30s). May be the only reference."
},
"type": {
"type": "string",
"const": "audio_url"
},
"audio_url": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
},
"minItems": 1,
"description": "Content items: text (text-to-video), image_url (image-to-video / first+last frame / reference images), video_url and audio_url (multimodal reference). The model infers WHICH task you want from these roles plus your prompt wording - see the endpoint notes."
},
"duration": {
"anyOf": [
{
"type": "integer",
"maximum": 30,
"minimum": 4
},
{
"type": "string",
"const": "auto"
}
],
"default": 5,
"description": "Duration in seconds (4-30), or \"auto\" to let the model choose the length from your prompt and inputs. \"auto\" is REQUIRED for video editing (the output matches the source clip and no explicit duration is accepted). Cost note: \"auto\" holds the price of a 30s video up front - the unused portion is released when the run settles on actual usage."
},
"priority": {
"type": "integer",
"maximum": 9,
"minimum": 0,
"description": "Queue priority 0-9 (higher = front of the queue). Default 0."
},
"watermark": {
"type": "boolean",
"default": false,
"description": "Add an \"AI Generated\" watermark. Default false."
},
"resolution": {
"enum": [
"480p",
"720p"
],
"type": "string",
"default": "720p",
"description": "Output resolution (also the price selector)."
},
"output_format": {
"enum": [
"mp4",
"mov"
],
"type": "string",
"default": "mp4",
"description": "\"mp4\" (default) plays everywhere - web, mobile, players, social platforms. \"mov\" uses H.264 + yuv444p + PCM for higher colour fidelity in grading, keying, and compositing (recommended for video editing and extension), but most browsers cannot play it - use VLC, mpv, ffplay, or IINA."
},
"generate_audio": {
"type": "boolean",
"default": true,
"description": "Generate synchronized audio (voice, sound effects, music). Default true. No price impact."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}