Generate Video
generate_videoUse this to create or edit an AI video. Text-to-video from a prompt; image-to-video by passing image (start frame, + optional end_image); reference-to-video by passing reference_images; or video-to-video editing by passing video (an input video URL — upload local files with upload_media first). IMPORTANT — cost: video is priced per SECOND and by resolution (default model seedance-2.5: 480p=150, 720p=330, 1080p=750, 4k=1250 credits/sec, plus 80/160/375/750 per second of reference-video INPUT), so e.g. 5s at 720p ≈ 1,650 credits, 5s at 1080p ≈ 3,750 and 5s at 4k ≈ 6,250 (use 4k only when the user asks for it); seedance-2.5-flash, the faster, lower-cost Seedance 2.5, is 93 / 200 credits/sec at 480p / 720p plus 57 / 123 per second of reference-video INPUT; confirm with the user before expensive combos (long durations or many reference clips). Each call starts a new paid job, charged on success only. Submits an async job and returns a job_id (uuid) — video takes MINUTES: poll check_generation_status every 15–30 seconds until it returns the finished video link, then share that link with the user. Default model: seedance-2.5; call list_models for available video models and prices. Write @handle in the prompt to cast a character (list_characters), e.g. a free BudgetPixel AI influencer like @barry; an item's @handle (search_wardrobe) dresses them: "@barry wearing @camel_coat_set"; a pose's @handle (search_poses) poses them: "@barry in @sitting_knee_up_pose".
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>"
},
"name": "generate_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | p-video-2-pro ONLY: generation mode, which sets the price together with resolution — cost (cheapest AND fastest, ~20s for a 5s clip), speed (default), quality (most detail, slowest). Per-second prices per mode are in list_models. Omit for every other model. | |
| audio | No | Optional reference audio URL (MP3/WAV/OGG; upload local files with upload_media). Must accompany reference_images, reference_videos or a video input. On the seedance-2.0 family it counts toward the 3 audio clips (pass more in reference_audios). Not for minimax-h3 / seedance-2.5 / seedance-2.5-flash / wan-3.0-video(-prime) — use reference_audios there. | |
| draft | No | seedance-2.5 only (seedance-2.5-flash has no draft mode): make a 480p DRAFT to preview cheaply, priced like any 480p video (150 credits/sec). If the user likes it, finalize_video_draft turns that same video into its 1080p final (same motion, framing and sound, sharper; 750 credits/sec) within 7 days. Leave resolution unset. | |
| image | No | Optional START FRAME for image-to-video — a public image URL, a data URI, or raw base64. Can't be combined with reference_images or video. | |
| model | No | Video model id. Omit for the default (seedance-2.5 — flagship multimodal: text-to-video, image-to-video, reference images/videos/audio; pass a clip as reference_videos to edit/extend; 480p/720p/1080p, up to 30s). seedance-2.5-flash is the faster, lower-cost Seedance 2.5 (about twice as fast and ~40% cheaper: 480p 93 / 720p 200 credits/sec; the same modes, 480p/720p, up to 30s, with sound; no draft mode). wan-3.0-video is the Alibaba all-in-one alternative — same modes, up to 30s, free reference images and audio (480p 60 / 720p 120 / 1080p 240 credits/sec of output, and the same rate per second of reference video; wan-3.0-video-prime is the same model generating much faster at 85/170/340). For cheaper drafts pick seedance-2.0-mini (480p 60 / 720p 120 credits/sec). Call list_models for per-resolution prices. | |
| video | No | Optional INPUT VIDEO for video-to-video editing (2-15s) — must be a URL (upload local files with upload_media first). Can't be combined with image/end_image. On the seedance-2.0 family the INPUT seconds are billed at half the output per-second rate on top of the output, and up to 2 more reference_videos may join it (it is "Video 1"). On minimax-h3-max the video is EXTENDED instead (1.6-60s source; length_seconds = new footage appended; source billed 170 credits/sec, first 15s). On flux-3-video it is EXTENDED too (1s-2min source, free; length_seconds = 5-15s of new footage at the extend rate; the result is the source followed by the new footage). | |
| prompt | Yes | Text prompt describing the video to generate (or the edit to apply, when passing an input video) | |
| end_image | No | Optional END FRAME used together with image (the start frame) — the video interpolates between the two. Not on kling-v4-flash (first frame only). | |
| resolution | No | Output resolution — PRICING VARIES A LOT (seedance-2.5: 480p=150, 720p=330, 1080p=750 credits per SECOND, default 720p; seedance-2.5-flash: 480p=93, 720p=200, default 720p, no 1080p; seedance-2.0: 1080p=550/4k=1250). Prefer 480p unless asked. | |
| aspect_ratio | No | Aspect ratio (seedance-2.5 and seedance-2.5-flash: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9 — default 16:9). On minimax-h3 it applies to TEXT-TO-VIDEO only. On seedance-2.5 and seedance-2.5-flash it is used for text-to-video and reference-to-video: with reference VIDEOS, pass it to set the output's shape or leave it out to let the model pick one (adaptive); a start/end frame sets the shape and it is ignored; a job the model reads as an edit or extension of a clip keeps that clip's shape. On wan-3.0-video (and -prime) it is honored in EVERY mode (even with a first frame or reference media) and also accepts 'adaptive' (its default — the model picks a suitable ratio from the inputs). | |
| generate_audio | No | Whether the model should generate audio with the video (no price impact on seedance-2.5, seedance-2.5-flash, seedance-2.0 or flux-3-video). | |
| negative_prompt | No | What to avoid in the generated video | |
| duration_seconds | No | Video length in seconds (seedance-2.5 and seedance-2.5-flash: 4–30, default 5; seedance-2.0: 4–15). Cost scales linearly. | |
| reference_audios | No | minimax-h3 / minimax-h3-max / seedance-2.5 / seedance-2.5-flash / seedance-2.0 / seedance-2.0-mini / wan-3.0-video(-prime) only: reference AUDIO clips (WAV/MP3) guiding sound/voice — each a public URL (upload local files with upload_media first). Caps: minimax-h3(-max) ≤3, 15s combined; seedance-2.5 ≤10, 2-30s each, 30s combined (audio-only input works); seedance-2.5-flash ≤5, 2-30s each, 30s combined (audio-only input works); seedance-2.0 / seedance-2.0-mini ≤3 with `audio` counted, 15s combined, and they need a reference image or video next to them; wan-3.0-video(-prime) ≤5, 15s combined (audio-only works). Free. Can't be combined with image/end_image. | |
| reference_images | No | Optional reference images guiding the video (subject consistency) — each a URL, data URI, or base64. seedance-2.5: up to 30; seedance-2.5-flash: up to 10 (free); wan-3.0-video / wan-3.0-video-prime: up to 10 (free); seedance-2.0 family: up to 9, with or without an input video. Can't be combined with image/end_image. | |
| reference_videos | No | minimax-h3 / minimax-h3-max / seedance-2.5 / seedance-2.5-flash / seedance-2.0 / seedance-2.0-mini / wan-3.0-video(-prime) / kling-4.0 / kling-v4-flash only: reference VIDEO clips guiding motion/identity — on seedance-2.5, seedance-2.5-flash and wan-3.0-video(-prime) also the way to EDIT or EXTEND a clip (kling-4.0 and kling-v4-flash edit through `video`). Each a public video URL (upload local files with upload_media first). Caps: minimax-h3(-max) ≤3, 15s combined; seedance-2.5 ≤10, 2-30s each, 30s combined; seedance-2.5-flash ≤5, 2-30s each, 30s combined; seedance-2.0 / seedance-2.0-mini ≤3 (a `video` to edit counts as one), 15s combined; wan-3.0-video(-prime) ≤5, 15s combined, and input + output ≤ 30s; kling-4.0 ≤5 (a `video` to edit counts as one), 3-30s each, 30s combined, 700-4553 px per side; kling-v4-flash the same with 3-20s each, 20s combined. IMPORTANT — billed per second of INPUT on top of the output: h3 160/s; seedance-2.5 80/160/375 per s at 480p/720p/1080p; seedance-2.5-flash 57/123 per s at 480p/720p; the seedance-2.0 family half its output rate; wan-3.0-video(-prime) its full output rate (60/120/240, Prime 85/170/340); kling-4.0 moves every billed second to 124/186 (720p/1080p) and kling-v4-flash to 82, and both bill the output plus the longer of the input clips and the output. Can't be combined with image/end_image (except on kling-4.0 and kling-v4-flash). |