Create video generation task
create_videoGenerates videos from text, images, or other inputs via asynchronous tasks. Poll the returned task ID for status.
Instructions
Create video generation task Creates an asynchronous video generation task. The response returns a canonical task ID and usually a preferred poll_url; clients should poll poll_url first, or use /v1/tasks/{id} as the fixed status endpoint.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | Frames per second | |
| seed | No | Seed for reproducibility. Seedance uses -1 for random seed when omitted. | |
| size | No | Model-specific size tier for compatible video models. | |
| user | No | End-user identifier | |
| draft | No | Seedance 1.5 Pro draft workflow flag. Only supported by draft-capable Seedance routes; draft=true creates a low-cost draft task. | |
| image | No | Inline image as a data URL (for example, data:image/png;base64,...). Prefer image_url for broader production compatibility. When the selected Seedance model can use the TokenLab material library, TokenLab prepares this image input as a reusable material before generation; if it is not ACTIVE within 60 seconds, the API returns 409 seedance_material_preparing with auto_material_asset_ids. If the selected model cannot use the material library, ordinary image inputs continue on the regular image path. | |
| model | No | Model to use (e.g., veo3.1, kling-v1) | |
| ratio | No | Compatibility alias for aspect_ratio. If both ratio and aspect_ratio are provided, they must match. | |
| frames | No | Optional frame count for compatible video models. Seedance 2.0 models and Seedance 1.5 Pro do not support this field. | |
| prompt | No | Video description | |
| seconds | No | Alias of duration used by compatible request shapes. Seedance models also accept -1 to let the model choose within its supported duration range; duration and seconds must match when both are provided. | |
| task_id | No | Task identifier used by some continuation, extension, or derivative flows. | |
| duration | No | Video duration in seconds. Seedance models also accept -1 to let the model choose within its supported duration range; TokenLab estimates billing conservatively for that mode. | |
| priority | No | Optional task priority for compatible video models. Do not combine priority with service_tier=flex. | |
| audio_url | No | Publicly reachable audio URL for model-specific audio-conditioned video flows. | |
| cfg_scale | No | Prompt adherence strength (0-20) for models that expose CFG-style control. | |
| end_image | No | Last frame image input for start-end-to-video flows. When the selected Seedance model can use the TokenLab material library, TokenLab prepares this image input as a reusable material before generation; if it is not ACTIVE within 60 seconds, the API returns 409 seedance_material_preparing with auto_material_asset_ids. If the selected model cannot use the material library, ordinary image inputs continue on the regular image path. | |
| extend_at | No | Model-specific extension start offset used by some video-extension flows. | |
| image_url | No | Publicly reachable image URL for image-to-video generation. Preferred over inline base64 in production. When the selected Seedance model can use the TokenLab material library, TokenLab prepares this image input as a reusable material before generation; if it is not ACTIVE within 60 seconds, the API returns 409 seedance_material_preparing with auto_material_asset_ids. If the selected model cannot use the material library, ordinary image inputs continue on the regular image path. | |
| operation | No | Requested video operation. If omitted, TokenLab infers the operation from the provided inputs. Explicit operation is recommended for production reliability. | |
| video_url | No | Publicly reachable video URL for video-to-video style flows and motion-control models. | |
| watermark | No | Optional watermark toggle for models that expose it. Seedance defaults to false when omitted. | |
| audio_urls | No | Compatibility array for audio-conditioned flows when multiple audio references are supported by the routed model family. TokenLab currently accepts up to 3 reference audios. | |
| image_urls | No | Image URL array for compatible image-conditioned video flows. This endpoint currently allows up to 9 entries. When the selected Seedance model can use the TokenLab material library, TokenLab prepares this image input as reusable material before generation; if it is not ACTIVE within 60 seconds, the API returns 409 seedance_material_preparing with auto_material_asset_ids. If the selected model cannot use the material library, ordinary image inputs continue on the regular image path. | |
| resolution | No | Video resolution. Seedance defaults to 720p when omitted; available values are model-dependent. | |
| video_urls | No | Compatibility array for video-conditioned flows when multiple input videos are supported by the routed model family. TokenLab currently accepts up to 3 reference videos. | |
| effect_type | No | Model-specific effect selector for specialized editing flows. | |
| outputAudio | No | Compatibility alias for output_audio. If both are provided, they must match. | |
| start_image | No | First frame image input for start-end-to-video flows. When the selected Seedance model can use the TokenLab material library, TokenLab prepares this image input as a reusable material before generation; if it is not ACTIVE within 60 seconds, the API returns 409 seedance_material_preparing with auto_material_asset_ids. If the selected model cannot use the material library, ordinary image inputs continue on the regular image path. | |
| aspect_ratio | No | Canonical video aspect ratio. Seedance defaults to adaptive when omitted. The ratio alias is accepted for compatibility. | |
| camera_fixed | No | Optional fixed-camera selector for compatible video models. Seedance 2.0 models do not support this field. | |
| extend_times | No | Model-specific extension multiplier or repeat count used by some video-extension flows. | |
| output_audio | No | Canonical model-dependent audio output toggle. Veo 3 and Seedance requests default to true when omitted. Kling 3.0 Video accepts this selector for non-element-reference requests and maps it to the compatible sound control; omitted Kling requests default to silent output. Do not combine output_audio=true with kling_elements. The aliases outputAudio and generate_audio are accepted for compatibility and must match when provided together. | |
| service_tier | No | Optional service tier for compatible video models. service_tier=default is accepted as a no-op for Seedance 2.0 models; service_tier=flex is rejected where the selected model does not support it. | |
| draft_task_id | No | Seedance 1.5 Pro draft promotion task ID. Provide this instead of draft=true to create the final video from a previous draft task. | |
| generate_audio | No | Compatibility alias for output_audio. If more than one audio toggle is provided, all values must match. | |
| kling_elements | No | Kling 3.0 element references for kling-3.0-video image-conditioned requests. Define 1-3 elements and reference them in the prompt with @name. Each element requires 2-4 image URLs in element_input_urls. Do not combine kling_elements with output_audio=true; omit output_audio or set it to false for element-reference requests. | |
| motion_strength | No | Motion intensity (0-1) for models that expose it. | |
| negative_prompt | No | What to avoid in the video | |
| reference_images | No | Canonical public reference-image field for reference-to-video conditioning. This endpoint currently allows up to 9 URLs or compatible data URLs; model-specific limits can be lower. xAI grok-imagine-video accepts up to 7 image references with duration capped at 10 seconds, and grok-imagine-video-1.5-preview does not accept reference images. When the selected Seedance model can use the TokenLab material library, TokenLab prepares this image input as reusable material before generation; if it is not ACTIVE within 60 seconds, the API returns 409 seedance_material_preparing with auto_material_asset_ids. If the selected model cannot use the material library, ordinary image inputs continue on the regular image path. | |
| material_asset_id | No | TokenLab Seedance material asset ID returned by /v1/videos/assets, by automatic image preparation, or by a real-person verification bind flow. Use it after the asset is ACTIVE with Seedance models that can use the TokenLab material library. The asset must belong to the current account. | |
| return_last_frame | No | Return the last generated frame when the selected model supports it. Seedance defaults to false when omitted. | |
| safety_identifier | No | Optional safety/user trace identifier for compatible video models. If omitted for Seedance, TokenLab uses user when provided. | |
| material_asset_ids | No | TokenLab Seedance material asset IDs returned by /v1/videos/assets or by automatic image preparation. They share the Seedance image-reference limit; the selected model must be able to use the TokenLab material library and all assets must belong to the current account and be ACTIVE. | |
| reference_image_type | No | Optional reference image role for models that distinguish between asset and style references. The camelCase alias referenceImageType is accepted for compatibility. | |
| execution_expires_after | No | Optional execution expiry window in seconds for compatible video models. Seedance defaults to 172800 seconds when omitted. |