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.
- Submit:
POST /v1/video/generationswith model, prompt and seconds. - Poll:
GET /v1/video/generations/{task_id}until status is succeeded or failed. - Or webhook: set
metadata.callback_urland 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. According to the official relaydance.com/docs: "set base_url to https://relaydance.com/v1 and keep your 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. According to the official relaydance.com docs: "failed or errored requests are never billed". Billing is pay-as-you-go per generated video. Current per-model rates are listed at https://relaydance.com/models.
| Model / tier | Rate |
|---|---|
| Seedance 2.0 720p | about $0.190 / second |
| Seedance 2.0 1080p | about $0.470 / second |
| Seedance Fast | about $0.152 / second |
| Seedance native 4K | about $4.90 per 5-second clip |
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.
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
| Item | Value | Source |
|---|---|---|
| Seedance 2.0 720p price | about $0.190 / second | relaydance.com/models |
| Seedance 2.0 1080p price | about $0.470 / second | relaydance.com/models |
| Seedance Fast price | about $0.152 / second | relaydance.com/models |
| Seedance native 4K price | about $4.90 per 5-second clip | relaydance.com/models |
| gpt-image-2 image billing | image output is free, only input is billed; image-to-image from about CNY 0.035; 4K and 1K output cost the same | relaydance.com/models |
| API protocol | OpenAI-compatible; set base_url to https://relaydance.com/v1 | relaydance.com/docs |
| Failed requests | failed or errored requests are never billed | relaydance.com/docs |
Data verified 2026-06-29; live prices are on the official /models page.