Build a Discord bot that generates videos with the Seedance API
To build a Discord bot that generates videos with the Seedance API, connect your bot to RelayDance's OpenAI-compatible endpoint at https://relaydance.com/v1, submit a task with POST /v1/video/generations, then poll GET /v1/video/generations/{task_id} or use a webhook callback until the status is succeeded. The bot posts the returned video URL back to the channel. Billing is pay-as-you-go, and failed requests cost nothing.
How to connect the bot to the API
Point your Discord bot's HTTP client at RelayDance's OpenAI-compatible base URL and authenticate with a bearer token. According to the official relaydance.com/docs docs, 「Set base_url to https://relaydance.com/v1 and keep your OpenAI SDK」, so any existing OpenAI SDK integration inside your bot works without a rewrite. Create your key at the RelayDance console and send it as Authorization: Bearer YOUR_API_KEY on every call. No BytePlus enterprise account or KYC is required. Because access is OpenAI-compatible, your Discord command handler can reuse the same client instance for both video (/v1/video/generations) and image (/v1/images/generations) requests. See https://relaydance.com/docs for the full protocol reference.
Steps to submit and retrieve a video
Handle a Discord slash command by submitting a video task, then retrieving the result through polling or a webhook.
- Read the user prompt from the Discord command and call
POST /v1/video/generationswithmodel,prompt, andseconds. - Add optional
metadata:ratio,resolution,generate_audio, andcallback_url. - Attach reference media in
metadata.content[]and cite them in the prompt as@image1to@imageN(up to 9 reference images, 3 reference videos, and 3 audio tracks per request). - Poll
GET /v1/video/generations/{task_id}until status is succeeded or failed, or setmetadata.callback_urlso the final state is POSTed to your server. - Post the returned video URL back to the Discord channel. Clips can run up to 15 seconds.
What each model costs
Costs depend on the model and resolution your bot selects, so map Discord command options to specific rates. The table below lists per-model pricing (source relaydance.com/models).
| Model / mode | Price |
|---|---|
| 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 |
For image commands, gpt-image-2 output is free and only input is billed, with image-to-image from about CNY 0.035; 4K and 1K output cost the same. Live rates stay on the models page.
How billing and error handling work
Billing is pay-as-you-go per generated video, which keeps a Discord bot's costs proportional to usage. According to the official relaydance.com docs, 「Failed or errored requests are never billed」, so retry logic in your bot does not accumulate charges when a task returns a failed status. This means your command handler can safely re-submit after a transient error without tracking wasted spend. Payments are accepted via USDT and Stripe card. Because there is no BytePlus enterprise account or KYC requirement, you can wire up billing and start issuing keys from the console directly. Combine the free image output on gpt-image-2 with the per-second Seedance rates to estimate a per-command budget for your server.
FAQ
Do I need a special SDK for the Discord bot?
No. The API is OpenAI-compatible; set base_url to https://relaydance.com/v1 and keep your OpenAI SDK.
Am I charged if a generation fails?
No. Failed or errored requests are never billed, so retries do not add cost.
How many reference images can one command send?
Up to 9 reference images, 3 reference videos, and 3 audio tracks per request, 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.