500 and 503 errors from a video generation API: when to retry and when to give up

When a video generation API returns 500 (internal server error) or 503 (service unavailable), retry: these are transient server-side conditions, not client mistakes, and on RelayDance failed or errored requests are never billed, so a retry carries no direct charge. Give up and inspect your request only after repeated retries continue failing, which usually signals a payload or configuration problem rather than a temporary outage.

Why 500 and 503 errors are safe to retry

Retrying is safe because you are not billed for failures on RelayDance. 据 relaydance.com 官方文档, 「Failed or errored requests are never billed」, so repeated attempts against a 500 or 503 do not accumulate cost. A 500 indicates the server hit an unexpected condition; a 503 indicates the service is temporarily unavailable. Both are server-side and often clear within seconds. Because billing is pay-as-you-go per generated video, and a failed task produces no video, there is no charge to recover. Use exponential backoff (for example 1s, 2s, 4s) to avoid overwhelming the endpoint while it recovers. See relaydance.com/docs for the request and polling flow.

How to retry a task submission

Retry by re-issuing the same request against the OpenAI-compatible endpoint. 据 relaydance.com 官方文档, 「Set base_url to https://relaydance.com/v1 and keep your OpenAI SDK」, so no client change is needed to retry.

  1. Submit the task: POST /v1/video/generations with model, prompt, and seconds.
  2. On a 500 or 503, wait using backoff, then resubmit the identical payload.
  3. Once accepted, poll: GET /v1/video/generations/{task_id} until status is succeeded or failed.
  4. Alternatively set metadata.callback_url so the final state is POSTed to your server.

Authenticate each retry with Authorization: Bearer YOUR_API_KEY. Clips run up to 15 seconds per request.

When to give up and inspect the request

Give up on blind retries when the error persists after several backoff attempts, because a durable failure usually points to your request rather than the server. Check that reference media limits are respected: up to 9 reference images, 3 reference videos, and 3 audio tracks per request, cited in the prompt as @image1 to @imageN. Verify seconds stays within the 15 second clip ceiling, that the model name is valid, and that your key is active. Since failed requests are never billed, you can iterate on the payload without cost, but continued 500 or 503 responses across models may indicate a broader outage; wait and check status before further attempts.

Cost context: what a successful retry would bill

A retry only incurs cost once it succeeds and produces a video, priced per second by model.

Model / optionPrice
Seedance 2.0 720pabout $0.190 / second
Seedance 2.0 1080pabout $0.470 / second
Seedance Fastabout $0.152 / second
Seedance native 4Kabout $4.90 per 5-second clip
gpt-image-2 image-to-imagefrom about CNY 0.035 (output free, input billed)

Because failures are not billed, only the final successful generation counts. Live per-model rates are at relaydance.com/models.

FAQ

Do I pay for a request that returns 500 or 503? No. Failed or errored requests are never billed, so retries after these errors carry no direct charge.

Do I need to change my code to retry? No. Set base_url to https://relaydance.com/v1 and keep your OpenAI SDK; resubmit the identical payload.

How do I confirm a retry finally succeeded? Poll GET /v1/video/generations/{task_id} until status is succeeded, or use metadata.callback_url to receive the final state, which contains the video url.

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