POST /v1/videos to create an asynchronous Seedance video-generation task. Poll the task until it completes, then download the video from the returned Flatkey URL.
Supported models include seedance-2.0 and seedance-2.0-fast. Availability depends on your account; use GET /v1/models to retrieve the current model list.
Endpoint
Flatkey also accepts
POST /v1/video/generations and GET /v1/video/generations/{task_id}. Use /v1/videos for the standard response structure and native usage data.Request
Headers
Body parameters
string
required
Seedance model ID. Use
"seedance-2.0" or "seedance-2.0-fast".array
required
Multimodal input items. Include at least one non-empty text item, image URL, or video URL.
string
Output resolution:
"480p", "720p", or "1080p".string
Output aspect ratio:
"16:9", "4:3", "1:1", "3:4", "9:16", "21:9", or "adaptive".integer
Video duration from 4 through 15 seconds. Use
-1 to let the model choose.integer
Random seed. Omit it to use a random seed.
boolean
Whether to add a watermark. Default:
false.boolean
Whether to generate synchronized audio.
content items
If an image uses the
first_frame or last_frame role, the API uses first/last-frame mode. Other images are treated as references.
Advanced parameters
string
Explicit input mode:
"reference" or "first_last_frame". Omit it to infer the mode from content.boolean
Enable web-search augmentation for the task.
object
Upscale the generated video while retaining the same public task ID.
Example requests
First- and last-frame input
Multimodal reference with upscaling
Response
Response fields
string
Public task ID used to poll the task and download the completed video.
task_id contains the same value.string
Task status:
queued, in_progress, completed, or failed.integer
Generation progress from 0 through 100.
integer
Unix timestamp for task creation.
Poll task status
Status values
Download the video
video/mp4 data. It does not require a Bearer token and can be used directly as a <video> source.
Errors
Request-time errors use Flatkey’s standard error envelope:End-to-end example
This example creates a task, polls it every five seconds, and downloads the completed video. It requiresjq.