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.

  1. Read the user prompt from the Discord command and call POST /v1/video/generations with model, prompt, and seconds.
  2. Add optional metadata: ratio, resolution, generate_audio, and callback_url.
  3. Attach reference media in metadata.content[] and cite them in the prompt as @image1 to @imageN (up to 9 reference images, 3 reference videos, and 3 audio tracks per request).
  4. 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.
  5. 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 / modePrice
Seedance 2.0 (720p)about $0.190 / second
Seedance 2.0 (1080p)about $0.470 / second
Seedance Fastabout $0.152 / second
Seedance native 4Kabout $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

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