Skip to main content
This walkthrough creates one five-second, 720p video from text. It uses the normalized GENGEN request and response format for both models.

Prepare your account

Create an API key, fund your wallet, and review current prices. Each successful generation is billable. You need curl and Python 3; no provider SDK is required. Set GENGEN_API_KEY in your local environment. Keep the key on your backend and out of browser code, source control and shared logs.

Choose one request

Save one of these examples as request.json. The examples use no input media, so you can first verify your task lifecycle without hosting reference files.
request.json
Next, explore Seedance reference and editing workflows or source-attributed prompt examples. Output duration, resolution and reference-video usage affect billing.

Submit once and save the response

Continue only after a successful HTTP response containing id. Keep task.json: it contains the ID needed to resume polling. Do not rerun the creation command to check progress. If the POST times out or its outcome is unclear, check Dashboard task logs or contact support before creating another paid task.

Poll and download

Save this as poll_video.py and run python3 poll_video.py. It resumes the ID in task.json, retries only temporary GET failures, and never creates another generation task. The 30-minute polling limit is a client timeout, not a provider completion guarantee; you can resume polling later with the same file.
poll_video.py
Download successful outputs promptly because output URLs can expire. If the download fails, rerun the polling script with the saved ID; it will retrieve the task again without submitting a new generation.

Handle failures before retrying

For assistance, include the task ID, model ID and error code, without your API key. See provider troubleshooting and support.

Add reference media after the first successful task

Choose the model-specific media fields and limits from the API reference. Make input URLs accessible without browser cookies or custom headers, and keep signed URLs valid through processing. An image keyframe, reference video and source video are different inputs; do not interchange them.