Docs / Core Concepts / How It Works
How RelayDance Works
RelayDance is a gateway between your application and the upstream model providers. You integrate one API and one key; the gateway forwards each request to the provider that serves the model you asked for.
#Request flow
- Authentication: your API key is validated and your balance checked.
- Routing: the request is forwarded to the upstream provider based on the
modelfield. - Response: the provider's output is returned to you in a consistent format.
#Synchronous vs asynchronous
Synchronous (chat and image)
Chat completions and image generation return their result in the HTTP response. Chat supports stream: true for Server-Sent Events.
Asynchronous (video)
Video rendering takes minutes, so the API never holds the connection open. POST /v1/video/generations returns a task_id immediately; you poll GET /v1/video/generations/{task_id}, or set metadata.callback_url and receive the final task state as a webhook.
| Status | Meaning |
|---|---|
submitted | Task accepted and queued |
running | Generation in progress |
succeeded | Done: the url field contains the clip |
failed | Generation failed and is not billed |
#Upstream providers
Video, image and text models from leading AI labs:
| Provider |
|---|
ByteDance (Seedance) |
xAI (Grok) |
HappyHorse |
#Billing
Usage is metered per request:
- Chat models: billed per input and output token
- Image generation: billed per generated image
- Video generation: billed per clip; price varies with model, resolution and duration
Failed requests are not billed: you only pay for output that is successfully delivered.