Decode logoDecode

Seedance API quickstart: from API key to your first video

This guide walks through Seedance 2.0 end to end; for 2.5 just change the model ID. It takes about five minutes.

1. Create an account and top up

Create an account on the sign-up page, then top up in your wallet. For invoices and volume, contact us.

2. Create an API key

Open API keys and create one; it starts with sk-. Keep it on your server only:

export DECODE_API_KEY="sk-..."

3. Pick a base URL and model

Base URLUse for
https://decode8.comDefault, outside mainland China
https://cn.decode8.comMainland China; videos download from storage in China
ModelChina model IDGlobal model IDResolutionDuration (s)Max reference images / videos / audio
Seedance 2.5doubao-seedance-2-5-261111dreamina-seedance-2-5-261111480p、720p、1080p4–3030 / 10 / 10
Seedance 2.0doubao-seedance-2-0-261111dreamina-seedance-2-0-261111480p、720p、1080p、4K4–159 / 3 / 3

4. Submit a task

POST /api/v3/contents/generations/tasks returns a task ID. These samples submit and then poll until the task ends:

curl https://decode8.com/api/v3/contents/generations/tasks \
  -H "Authorization: Bearer $DECODE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "dreamina-seedance-2-0-261111",
  "content": [
    {
      "type": "text",
      "text": "An orange cat stretches on a sunny windowsill, slow dolly-in, warm cinematic light"
    }
  ],
  "resolution": "720p",
  "ratio": "16:9",
  "duration": 5,
  "generate_audio": true
}'

Using images or references? See: Text to Video · Image to Video · Reference to Video

5. Poll and download the video

curl https://decode8.com/api/v3/contents/generations/tasks/task_xxxxxxxx \
  -H "Authorization: Bearer $DECODE_API_KEY"

Once the status is succeeded, download the MP4 from content.video_url. Videos are kept for 60 days.

Reference materials (optional)

Upload frequently used references once and reuse them as asset://ID:

curl https://decode8.com/v1/materials \
  -H "Authorization: Bearer $DECODE_API_KEY" \
  -F file=@product.png \
  -F name=product-front

A material is ready once status is active. Materials belong to one key and are removed after 30 days unused. See the material library docs.

Migrating from the official API

  • Base URL: the Ark or BytePlus endpoint → https://decode8.com/api/v3
  • API key → your Decode sk- key
  • Model → an ID from the table above
  • callback_url is not supported; poll instead

Common errors

HTTPCause
401Invalid, disabled or expired key
400Bad parameters, too many or rejected references, duration out of range (not charged)
403Insufficient balance, or material storage/group limit reached
404Task or material not found, or owned by another key
429Too many requests

Include the request id from the error when contacting support.

FAQ

I already use the official SDK. How do I switch?

Set the SDK base_url to https://decode8.com/api/v3, use your Decode key and the model IDs listed here; the request code stays the same.

Can I use it without code?

Yes. Sign in and use the video console to enter a prompt and upload references; manage files in the material library.

How long does generation take?

It depends on model, resolution, length and upstream queueing — typically tens of seconds to a few minutes. Poll about every 10 seconds.

Contact us: pricing, volume and support

Need volume pricing, a dedicated discount group, higher concurrency or integration help? Reach out and mention "API partnership" with your expected volume.