How to generate video with audio through an API
To generate video with audio through the RelayDance API, send a POST request to /v1/video/generations with a model, prompt, and seconds, then set generate_audio inside the metadata object to request an audio track. Authenticate using Authorization: Bearer YOUR_API_KEY. The endpoint returns a task ID, which you poll at /v1/video/generations/{task_id} until the status is succeeded or failed. The succeeded result contains the video URL with audio included.
Setting up authentication and the base URL
All RelayDance requests use the base URL https://relaydance.com/v1 and an OpenAI-compatible structure. Create an API key in the console at https://relaydance.com/console, then include it on every request as Authorization: Bearer YOUR_API_KEY. RelayDance supports multiple model groups, including ByteDance Seedance 2.0 and Seedance 1.5 Pro, HappyHorse video models, and Grok Imagine video and image models, plus Grok text models. Because the API is OpenAI-compatible, existing client libraries that target similar endpoints can be pointed at the RelayDance base URL with minimal changes. Live per-model rates are listed at https://relaydance.com/models.
Submitting a video task with audio
Send a POST to /v1/video/generations with model, prompt, and seconds. Optional controls live in the metadata object: ratio, resolution, generate_audio, callback_url, and content[] for reference media. To produce video with sound, set generate_audio in metadata. Clips can run up to 15 seconds. Reference media are placed in metadata.content[] and cited in the prompt as @image1 through @imageN. A single request accepts up to 9 reference images, 3 reference videos, and 3 audio tracks. The response returns a task ID used for polling or webhook delivery.
Retrieving the result: polling versus webhook
RelayDance offers two ways to receive the finished video with audio. With polling, call GET /v1/video/generations/{task_id} repeatedly until the status becomes succeeded or failed; the succeeded result contains the video URL. With webhook mode, set metadata.callback_url and the final state is POSTed directly to your server, avoiding repeated polling.
| Method | How it works | Required field |
|---|---|---|
| Polling | Call the task endpoint until status is succeeded or failed | task_id |
| Webhook | Final state is POSTed to your server | metadata.callback_url |
Step by step example
- Create an API key at https://relaydance.com/console.
- Choose a video model from https://relaydance.com/models.
- POST to
/v1/video/generationswithmodel,prompt, andseconds. - Set
generate_audioinmetadatato request audio. - (Optional) Add reference media to
metadata.content[]and cite them as@image1to@imageN. - (Optional) Set
metadata.callback_urlto use webhook delivery. - Poll
GET /v1/video/generations/{task_id}until status is succeeded, then read the video URL.
Pricing and billing
RelayDance accepts payment via USDT and Stripe card. Mainstream model groups are priced 30 percent or more below official list prices, and live per-model rates are published at https://relaydance.com/models. Failed or errored requests are never billed, so you only pay for successful generations. For full endpoint details and field references, see the documentation at https://relaydance.com/docs. Images can also be generated through the separate /v1/images/generations endpoint using the same authentication and base URL.
FAQ
How do I enable audio in a generated video? Set generate_audio inside the metadata object when you POST to /v1/video/generations.
How long can a clip be? Clips can be up to 15 seconds.
Am I charged if generation fails? No. Failed or errored requests are never billed.