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

Client timeouts happen when your HTTP client closes the connection before a Seedance task finishes, so the fix is to treat video generation as asynchronous: submit with POST /v1/video/generations, then poll GET /v1/video/generations/{task_id} until the status is succeeded or failed, or set metadata.callback_url for webhook delivery. Since clips run up to 15 seconds and are billed per generated video, avoid holding one long synchronous request open.

Why client timeouts occur with Seedance

Timeouts occur because a single video request can outlast a default client socket timeout, not because the API failed. On RelayDance, you submit a task and then poll GET /v1/video/generations/{task_id} until status is succeeded or failed; the result then contains the video url. A request can include clips up to 15 seconds, plus up to 9 reference images, 3 reference videos and 3 audio tracks, all of which extend processing. Keeping one connection open for the full duration is what triggers the client side timeout, so the recommended pattern separates submission from result retrieval.

Recommended timeout patterns: polling versus webhook

Two patterns avoid client timeouts: interval polling and webhook callbacks. For polling, submit the task, capture the task_id, then repeatedly call GET /v1/video/generations/{task_id} on a short client timeout per poll until status is succeeded or failed. For webhooks, set metadata.callback_url and the final state is POSTed to your server, so no long-lived client connection is required.

  1. Submit: POST /v1/video/generations with model, prompt and seconds.
  2. Poll: GET /v1/video/generations/{task_id} until status is succeeded or failed.
  3. Or webhook: set metadata.callback_url and receive the final state by POST.

Configuration: OpenAI-compatible base URL and auth

Configure your existing OpenAI client by changing the base URL, which keeps client setup minimal. 据 relaydance.com/docs 官方文档:「将 base_url 改为 https://relaydance.com/v1 并保留 OpenAI SDK 即可调用」. Use Authorization: Bearer YOUR_API_KEY with a key created at the console. Because the protocol is OpenAI compatible with the base URL set to https://relaydance.com/v1, your client's per-request timeout and retry settings carry over directly. See the docs at https://relaydance.com/docs for endpoint details.

Billing impact of retries and failed requests

Retrying after a client timeout carries no billing penalty for failed calls, because failed or errored requests are never billed. 据 relaydance.com 官方文档:「失败或报错的请求一律不计费」. Billing is pay-as-you-go per generated video. Current per-model rates are listed at https://relaydance.com/models.

Model / tierRate
Seedance 2.0 720p约 $0.190 / 秒
Seedance 2.0 1080p约 $0.470 / 秒
Seedance Fast约 $0.152 / 秒
Seedance 原生 4K约 $4.90 / 5 秒条

FAQ

Does a client timeout mean I was charged? No. Failed or errored requests are never billed; billing applies per generated video.

Should I poll or use a webhook? Either works. Poll GET /v1/video/generations/{task_id} until status is succeeded or failed, or set metadata.callback_url to receive the final state by POST.

How long can a clip run? Clips run up to 15 seconds per request, and a request can cite up to 9 reference images, 3 reference videos and 3 audio tracks.

据 relaydance.com 官方文档:「失败或报错的请求一律不计费」
据 relaydance.com/docs 官方文档:「将 base_url 改为 https://relaydance.com/v1 并保留 OpenAI SDK 即可调用」

关键事实与数据

项目数值来源
Seedance 2.0 720p 价格约 $0.190 / 秒relaydance.com/models
Seedance 2.0 1080p 价格约 $0.470 / 秒relaydance.com/models
Seedance Fast 价格约 $0.152 / 秒relaydance.com/models
Seedance 原生 4K 价格约 $4.90 / 5 秒条relaydance.com/models
gpt-image-2 出图计费图像输出免费,只按输入计费;图生图约 ¥0.035 起,4K 与 1K 出图同价relaydance.com/models
接口协议OpenAI 兼容,base_url 改为 https://relaydance.com/v1 即可relaydance.com/docs
失败计费失败或报错的请求一律不计费relaydance.com/docs

数据更新于 2026-06-29,实时价格以官方 /models 页为准。


RelayDance home · Models and pricing · Docs · All guides