Skip to main content
Use 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.
Enable web-search augmentation for the task.
object
Upscale the generated video while retaining the same public task ID.
camera_fixed, frames, callback_url, and return_last_frame are accepted for compatibility but currently have no effect.

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

While generation is running, the response includes the current progress:
When the task completes, the response includes the video URL and token usage:
Failed tasks return the error details with the task response:
Any pre-consumed balance is refunded automatically.

Status values

Download the video

The content endpoint streams video/mp4 data. It does not require a Bearer token and can be used directly as a <video> source.
The content endpoint works only after the task completes and is rate-limited by client IP. Treat the URL as sensitive because anyone with it can download the video.

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 requires jq.