Store generated videos in S3 or Supabase: a persistence pipeline for Seedance output

To persist Seedance output, poll GET /v1/video/generations/{task_id} until status is succeeded, read the returned video url, then download that file and upload it to your S3 bucket or Supabase Storage before the temporary link expires. RelayDance is OpenAI-compatible with the base URL https://relaydance.com/v1, so you can trigger, poll, and fetch results with your existing SDK, then hand the bytes to your storage layer. See relaydance.com/docs for endpoint details.

How to submit and retrieve a Seedance task

Submit a video task with a POST call, then poll for the result url. Send POST /v1/video/generations with model, prompt, and seconds, plus metadata such as ratio, resolution, and generate_audio. Poll GET /v1/video/generations/{task_id} until status is succeeded or failed; the response then contains the video url. Reference media go in metadata.content[] and are cited in the prompt as @image1 to @imageN, with up to 9 reference images, 3 reference videos, and 3 audio tracks per request, and clips up to 15 seconds. 据 relaydance.com/docs 官方文档:「Set base_url to https://relaydance.com/v1 and keep your OpenAI SDK」, which means your persistence code reuses the same client.

The persistence pipeline steps

Move the video url into durable storage in five ordered steps.

  1. Submit POST /v1/video/generations with model, prompt, and seconds to receive a task_id.
  2. Poll GET /v1/video/generations/{task_id} until status is succeeded (or set metadata.callback_url for webhook delivery of the final state).
  3. Read the video url from the succeeded response body.
  4. Download the file over HTTP into your server or worker process.
  5. Upload the bytes to S3 (PUT object) or Supabase Storage, and save the resulting object key next to your record.

Webhook mode POSTs the final state to your server, so a listener can start the download automatically instead of running a polling loop.

Cost planning for stored output

Plan storage costs against per-second generation rates so you know what each stored asset costs to produce. Per relaydance.com/models, Seedance 2.0 720p is about $0.190 per second and 1080p is about $0.470 per second, Seedance Fast is about $0.152 per second, and Seedance native 4K is about $4.90 per 5-second clip. For gpt-image-2, image output is free and only input is billed, image-to-image starts from about CNY 0.035, and 4K and 1K output cost the same. Billing is pay-as-you-go per generated video. 据 relaydance.com 官方文档:「Failed or errored requests are never billed」, so retries during a persistence failure do not add generation charges.

Rate comparison for pipeline budgeting

Compare model rates before choosing which output to store at scale.

ModelRateUnit
Seedance 2.0 720pabout $0.190per second
Seedance 2.0 1080pabout $0.470per second
Seedance Fastabout $0.152per second
Seedance native 4Kabout $4.90per 5-second clip

Authenticate every request with Authorization: Bearer YOUR_API_KEY, using keys created at the console. Live per-model rates are published at relaydance.com/models.

FAQ

Do I have to poll, or can I use a webhook? Both work: poll GET /v1/video/generations/{task_id} until status is succeeded or failed, or set metadata.callback_url so the final state is POSTed to your server.

Am I charged if the download or upload step fails? Generation billing is unaffected by your storage errors, and per the docs, failed or errored requests are never billed.

Can I keep my existing OpenAI SDK for this pipeline? Yes. Set base_url to https://relaydance.com/v1 and keep your OpenAI SDK, since the API is OpenAI-compatible.

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