Client timeout while waiting for video generation: setting sensible timeouts for Seedance tasks

To avoid client timeouts with Seedance video generation on RelayDance, do not hold a single HTTP connection open until the video is ready: submit the task with POST /v1/video/generations, then either poll GET /v1/video/generations/{task_id} until the status is succeeded or failed, or set metadata.callback_url for webhook delivery. Because clips can run up to 15 seconds, asynchronous handling prevents connection drops during processing.

Use polling or webhooks instead of one long request

The correct pattern is asynchronous: submit, then check state separately rather than blocking on the initial call. Submit a task with POST /v1/video/generations using model, prompt, and seconds, then poll GET /v1/video/generations/{task_id} until the status is succeeded or failed; the result carries the video URL. For servers that can receive callbacks, set metadata.callback_url and the final state is POSTed to your endpoint. Requests can include up to 9 reference images, 3 reference videos, and 3 audio tracks, and clips can run up to 15 seconds, so allowing time for processing is required. See relaydance.com/docs for the full flow.

Keep your OpenAI SDK and set a generous read timeout

You can reuse your existing OpenAI client and adjust its timeout settings for the RelayDance base URL. 据 relaydance.com 官方文档: 「Set base_url to https://relaydance.com/v1 and keep your OpenAI SDK」. Authenticate with Authorization: Bearer YOUR_API_KEY (create keys at the console). When you rely on polling, set a short timeout on the submit call and the poll calls individually, then loop between polls rather than raising one long client timeout. This keeps each HTTP request quick and moves the waiting into your own retry loop, which is more predictable across proxies and load balancers.

A timeout does not mean you were billed

If a client timeout occurs, billing is not triggered by the failed connection itself. 据 relaydance.com 官方文档: 「Failed or errored requests are never billed」. Billing is pay-as-you-go per generated video, so a dropped connection while waiting does not create a charge on its own. For reference, Seedance 2.0 720p is about $0.190 per second and 1080p is about $0.470 per second, with native 4K at about $4.90 per 5-second clip and Seedance Fast at about $0.152 per second. Live rates are published at relaydance.com/models.

Steps to handle long-running tasks

Follow this sequence to prevent client timeouts during Seedance generation:

  1. Submit the task: POST /v1/video/generations with model, prompt, and seconds.
  2. Store the returned task_id and close the initial connection.
  3. Poll GET /v1/video/generations/{task_id} at intervals until status is succeeded or failed.
  4. Or set metadata.callback_url so the final state is POSTed to your server, removing the need to poll.
  5. On succeeded, read the video URL from the result.

Per-second rates for planning retries

The table below lists published Seedance rates, useful when estimating cost before a retry.

Model / tierPriceSource
Seedance 2.0 720pabout $0.190 / secondrelaydance.com/models
Seedance 2.0 1080pabout $0.470 / secondrelaydance.com/models
Seedance Fastabout $0.152 / secondrelaydance.com/models
Seedance native 4Kabout $4.90 per 5-second cliprelaydance.com/models

FAQ

Does a client timeout charge me for the video? No. 「Failed or errored requests are never billed」, and billing is pay-as-you-go per generated video.

How do I check status after a timeout? Use the stored task_id with GET /v1/video/generations/{task_id}, or receive the final state via metadata.callback_url.

Can I keep my current SDK? Yes. 「Set base_url to https://relaydance.com/v1 and keep your OpenAI SDK」, then authenticate with Authorization: Bearer YOUR_API_KEY.

According to the official relaydance.com docs: "Failed or errored requests are never billed"
According to the official relaydance.com/docs docs: "Set base_url to https://relaydance.com/v1 and keep your OpenAI SDK"

Key facts and figures

ItemValueSource
Seedance 2.0 720p priceabout $0.190 / secondrelaydance.com/models
Seedance 2.0 1080p priceabout $0.470 / secondrelaydance.com/models
Seedance Fast priceabout $0.152 / secondrelaydance.com/models
Seedance native 4K priceabout $4.90 per 5-second cliprelaydance.com/models
gpt-image-2 image billingimage output is free, only input is billed; image-to-image from about CNY 0.035; 4K and 1K output cost the samerelaydance.com/models
API protocolOpenAI-compatible; set base_url to https://relaydance.com/v1relaydance.com/docs
Failed requestsfailed or errored requests are never billedrelaydance.com/docs

Data verified 2026-06-29; live prices are on the official /models page.


RelayDance home · Models and pricing · Docs · All guides · Privacy Policy · User Agreement · Telegram community · RelayRouter (LLM API) · Live playground