RelayDanceRelayDance
HomeModelsPricingDocsGet API Key

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

  1. Authentication: your API key is validated and your balance checked.
  2. Routing: the request is forwarded to the upstream provider based on the model field.
  3. 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.

StatusMeaning
submittedTask accepted and queued
runningGeneration in progress
succeededDone: the url field contains the clip
failedGeneration 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.

Mainstream model groups are priced 30% or more below official list prices. See the pricing page for the exact rate per model.