Seedance API returns 401 Unauthorized: how to fix invalid API key errors on RelayDance
A 401 Unauthorized error on the RelayDance Seedance API means your request did not send a valid credential. Fix it by passing the header Authorization: Bearer YOUR_API_KEY, using a key created at the RelayDance console, and setting your base URL to https://relaydance.com/v1. Because failed or errored requests are never billed, retrying with a corrected key costs nothing.
What causes a 401 on the Seedance API
A 401 is returned when the server cannot authenticate the credential attached to your request. Common causes include a missing Authorization header, a malformed Bearer prefix, a revoked or deleted key, or a key pasted with extra whitespace. The RelayDance API is OpenAI-compatible, so the header format matches the OpenAI SDK pattern. According to the official relaydance.com/docs, 「Set base_url to https://relaydance.com/v1 and keep your OpenAI SDK」, which means a wrong base URL can also route requests away from your valid key. Create or rotate keys at the RelayDance console (https://relaydance.com/console). Each key must be sent on every call to /v1/video/generations and /v1/images/generations.
Step-by-step fix
Resolve the 401 by verifying your key, header, and base URL in order.
- Open the RelayDance console (https://relaydance.com/console) and confirm the key exists and is active.
- Create a new key if the old one was revoked, then copy it without trailing spaces.
- Set the header exactly as
Authorization: Bearer YOUR_API_KEY. - Set
base_urltohttps://relaydance.com/v1. - Send a small test request to
POST /v1/video/generationswith amodel,prompt, andseconds. - If the call succeeds, poll
GET /v1/video/generations/{task_id}until status is succeeded or failed.
Does a 401 cost money
No, a 401 is an errored request and is not charged. According to the official relaydance.com docs, 「Failed or errored requests are never billed」, so retrying after fixing your key carries no cost. Billing is pay-as-you-go per generated video. For reference, Seedance 2.0 720p is about $0.190 per second, Seedance 2.0 1080p is about $0.470 per second, Seedance Fast is about $0.152 per second, and Seedance native 4K is about $4.90 per 5-second clip. These charges apply only to successful generations. Live per-model rates are listed at https://relaydance.com/models. This means you can safely repeat authentication tests while debugging a 401 without accruing charges on the failed attempts.
Seedance request pricing reference
Use the table below to confirm which model and resolution you are calling once authentication succeeds.
| Model / resolution | Price | Source |
|---|---|---|
| Seedance 2.0 720p | about $0.190 / second | relaydance.com/models |
| Seedance 2.0 1080p | about $0.470 / second | relaydance.com/models |
| Seedance Fast | about $0.152 / second | relaydance.com/models |
| Seedance native 4K | about $4.90 per 5-second clip | relaydance.com/models |
Full request details are documented at https://relaydance.com/docs.
FAQ
Where do I create a RelayDance API key? Create keys at the RelayDance console (https://relaydance.com/console), then send them as Authorization: Bearer YOUR_API_KEY.
What base URL should I use with the OpenAI SDK? Set base_url to https://relaydance.com/v1 and keep your existing OpenAI SDK.
Will repeated 401 errors be billed? No. Failed or errored requests are never billed; only successful generations are charged, per the rates at https://relaydance.com/models.
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
| Item | Value | Source |
|---|---|---|
| Seedance 2.0 720p price | about $0.190 / second | relaydance.com/models |
| Seedance 2.0 1080p price | about $0.470 / second | relaydance.com/models |
| Seedance Fast price | about $0.152 / second | relaydance.com/models |
| Seedance native 4K price | about $4.90 per 5-second clip | relaydance.com/models |
| gpt-image-2 image billing | image output is free, only input is billed; image-to-image from about CNY 0.035; 4K and 1K output cost the same | relaydance.com/models |
| API protocol | OpenAI-compatible; set base_url to https://relaydance.com/v1 | relaydance.com/docs |
| Failed requests | failed or errored requests are never billed | relaydance.com/docs |
Data verified 2026-06-29; live prices are on the official /models page.