Generate video assets in CI: a GitHub Actions pipeline with the Seedance API
You can generate video assets inside GitHub Actions by calling the RelayDance Seedance API from a CI job: store your key as a secret, POST to /v1/video/generations with a model, prompt, and seconds, then poll /v1/video/generations/{task_id} until the status is succeeded. Because the API is OpenAI-compatible with base URL https://relaydance.com/v1, you keep your existing SDK. Failed or errored requests are never billed, which suits automated retries.
Configure the pipeline authentication and base URL
Start by storing your API key as a GitHub secret and pointing your SDK at the RelayDance base URL. According to the official relaydance.com/docs, 「Set base_url to https://relaydance.com/v1 and keep your OpenAI SDK」, so no client rewrite is needed inside the runner. Authenticate each request with the header Authorization: Bearer YOUR_API_KEY, using a key created at the RelayDance console. Because the API is OpenAI-compatible, you avoid a BytePlus enterprise account or KYC. This keeps the CI setup small: one secret, one base URL, and the same request shape your team already uses for other OpenAI-style endpoints. See relaydance.com/docs for the full request contract and headers.
Submit and poll a video task in a job
Submit the task with a POST and then poll for completion in the same workflow. The steps are:
- POST to
/v1/video/generationswithmodel,prompt,seconds, andmetadata(ratio, resolution, generate_audio). - Read the returned
task_id. - Poll GET
/v1/video/generations/{task_id}until status is succeeded or failed. - Download the video url from the succeeded result and upload it as a build artifact.
For long jobs, set metadata.callback_url to use webhook mode, where the final state is POSTed to your server. Reference media go in metadata.content[] and are cited in the prompt as @image1 to @imageN, up to 9 reference images, 3 reference videos, and 3 audio tracks per request, with clips up to 15 seconds.
Budget CI runs with per-model rates
Budget each pipeline run using the pay-as-you-go per-second and per-clip rates published on relaydance.com/models. Seedance 2.0 at 720p costs about $0.190 per second and at 1080p about $0.470 per second, Seedance Fast costs about $0.152 per second, and Seedance native 4K costs about $4.90 per 5-second clip. For image steps, gpt-image-2 bills only input while image output is free, with image-to-image from about CNY 0.035, and 4K and 1K output cost the same.
| Option | Rate (source: relaydance.com/models) |
|---|---|
| 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 |
Handle retries and payment without over-billing
Add retries in your CI job without worrying about double charges, because failed calls do not incur cost. According to the official relaydance.com docs, 「Failed or errored requests are never billed」, so a retry loop around transient network errors is safe to run in the pipeline. Billing is pay-as-you-go per generated video, which means only successful outputs count against your balance. Payments are accepted via USDT and Stripe card. Combined with OpenAI-compatible access, this lets a GitHub Actions workflow generate Seedance video on each push while keeping costs tied to completed jobs only. Confirm live per-model rates at relaydance.com/models before scheduling large batches.
FAQ
Do I need a BytePlus enterprise account to run this in CI? No. RelayDance provides direct OpenAI-compatible access to Seedance with no BytePlus enterprise account or KYC required.
Am I charged if a CI job fails? No. Failed or errored requests are never billed, and billing is pay-as-you-go per generated video.
How many reference files can one request include? Up to 9 reference images, 3 reference videos, and 3 audio tracks per request, with clips up to 15 seconds, cited in the prompt as @image1 to @imageN.
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.