Docs / Quick Start
Quick Start
Get your API key and generate your first video clip with two HTTP calls.
#Step 1: Create your account
Sign up for a RelayDance account and top up any amount to start making requests.
#Step 2: Get your API key
- Open the console and go to the API keys section
- Create a new key
- Copy and store it securely
Never commit your key to version control. Keep it in an environment variable such as
RELAYDANCE_API_KEY.#Step 3: Submit a video task
Video generation is asynchronous. POST /v1/video/generations returns a task_id immediately; the clip renders in the background. Vendor parameters such as ratio and resolution go inside metadata.
terminalbash
curl https://relaydance.com/v1/video/generations \
-H "Authorization: Bearer $RELAYDANCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2-0-1080p",
"prompt": "A dancer spins in golden hour light, cinematic",
"seconds": "10",
"metadata": {
"ratio": "16:9",
"resolution": "1080p",
"generate_audio": true
}
}'response.jsonjson
{
"task_id": "task_abc123",
"status": "submitted"
}#Step 4: Poll until the clip is ready
terminalbash
curl https://relaydance.com/v1/video/generations/task_abc123 \
-H "Authorization: Bearer $RELAYDANCE_API_KEY"response.jsonjson
{
"task_id": "task_abc123",
"status": "succeeded",
"url": "https://...mp4",
"format": "mp4"
}Status moves through submitted, running, then succeeded or failed. Poll every few seconds until it settles.
Skip polling entirely: set
metadata.callback_url when you submit and the final task JSON is POSTed to your webhook when the clip finishes. See Video Generation.#Step 5: Explore the rest of the API
The same key also serves OpenAI-compatible image generation and Grok chat models:
terminalbash
# Image generation
curl https://relaydance.com/v1/images/generations \
-H "Authorization: Bearer $RELAYDANCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-image",
"prompt": "A watercolor fox in a bamboo forest",
"n": 1
}'#Next steps
- Video Generation : Full parameter table, reference media, webhooks
- Image-to-Video : Animate a still image with reference media
- Upload Files : Host local images for use as references
- API Keys : Manage separate keys for dev and production