Skip to main content
Base URL: https://router.flatkey.ai This guide shows the shortest working path for calling Seedance through Flatkey. Copy the examples, replace YOUR_FLATKEY_API_KEY, task_..., ast_..., and rph_... with your own values, then run the commands. Use this authorization header on every API request in this guide. The video download URL returned in metadata.url is the only exception:
Keep your API key private. Do not paste it into public logs, pages, or support tickets.

Call Seedance

Start here if you only want to create a text-to-video task and download the finished video.

1. Create a text-to-video task

Send POST /v1/videos with the seedance-2.0 model and a text prompt.
Copy the returned task_... value. Store it in your database or notes because you need it to check the video.

2. Poll the task

Use this endpoint with the saved task ID:
Poll until status is completed, then read the download URL from metadata.url. If the status is failed, read error.message, fix the request, and create a new task.
After the task is complete, metadata.url downloads the MP4 file without an authorization header. Treat this URL as private and do not publish it.

Use the asset library

Use the asset library when you want to register a reference once, wait until it is ready, and reuse it in Seedance requests. There are two asset types: Use the asset://ast_... URI returned by Flatkey in your Seedance requests.

Virtual assets

Virtual assets do not require real-person verification. They are the simplest way to reuse a product image, background video, or audio reference.

1. Create a virtual asset from a public HTTPS URL

Send a public https:// URL. Virtual assets accept URL-based JSON creation, not local multipart/form-data upload.
The response includes an id, for example ast_1234567890abcdef1234567890abcdef, and a status such as Processing. Build the reusable URI by adding asset:// before the ID:

2. Poll until Active

Only Active assets can be used in video generation. Creating, Processing, and Deleting are not ready. After deletion completes, GET /v1/assets/{asset_id} returns 404 asset_not_found; do not wait for a pollable Deleted status.

3. Call Seedance with the virtual asset

Put the asset://ast_... URI in the media field that matches the asset type: image_url.url for Image, video_url.url for Video, or audio_url.url for Audio. A Seedance request needs text or at least one image/video; audio alone is not enough.
Copy the returned task_... and use GET /v1/videos/{task_id} from the first section to download the finished video from metadata.url.

Real-person assets

Real-person assets are for a specific person’s face, voice, or video. This capability is limited access. Use it only after Flatkey enables it for your account. You will create a profile, send verification_url to the person, wait until the profile is active, create an asset, wait until the asset is Active, then call Seedance with asset://ast_.... File size limits: Write requests in this section require Idempotency-Key. Replace each YOUR_UNIQUE_KEY_... placeholder with a new UUID for every new write request. Reuse a key only when retrying the exact same request.

1. Create a real-person profile

The response includes a profile id, a status, and a one-time verification_url. Send verification_url to the real person and ask them to open it themselves. Do not publish this link. If the link expires or the person needs another link, create a new verification session:
After the person finishes the verification page, continue with the next step.

2. Poll until the profile is active

Wait until the profile status is active before creating assets. If it is pending_verification or verifying, wait and poll again. If it is failed or expired, create a new verification session.

3. Create a real-person asset from a public URL

4. Upload a local file

Local upload uses multipart/form-data and is available only for real-person assets. Use one file field and let curl set the multipart boundary.
The create response includes an asset ID or asset_uri, for example asset://ast_1234567890abcdef1234567890abcdef.

5. Poll and call Seedance

Use the asset polling endpoint until the status is Active:
You can also list assets under the profile:
After the asset is Active, call Seedance with the asset://ast_... URI:
Copy the returned task_... and use GET /v1/videos/{task_id} from the first section to download the finished video from metadata.url.

6. Delete an asset when you no longer need it

The delete request returns 204 No Content. After deletion completes, GET /v1/assets/{asset_id} returns 404 asset_not_found.