How to Use the Seedance 2.0 API: Complete Guide & Examples
how-to-use-seedance-2-0seedance-tutorialseedance-2-0-apibytedance-video-apiai-video-tutorial

How to Use the Seedance 2.0 API: Complete Guide & Examples

2026-07-03

What You'll Build

By the end of this guide you'll be able to generate cinematic video with synchronized audio from a text prompt, animate a still image, and steer output with reference material — all through a single REST API. We'll use Seedance 2.0 via LinkModel because it exposes the model through one clean async endpoint. For pricing and access routes, see the Seedance API pricing & access guide; for camera and prompt craft, the Seedance 2.0 API guide.

Step 1 — Get a Key

Register (email only, no card) and create an API key in the dashboard. New accounts get a $1 credit — enough for a few test generations. Set it as an environment variable so it never touches source control:

export LINKMODEL_API_KEY="sk_live_..."

Step 2 — Your First Video (Text-to-Video)

Seedance uses a submit-then-poll pattern. You POST a job, get a task_id, then poll until the video is ready.

curl -X POST https://api.linkmodel.ai/api/v1/video-generation \
  -H "Authorization: Bearer $LINKMODEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2-0",
    "prompt": "A drone shot sweeping across a mist-shrouded valley at dawn, slowly revealing a waterfall. Ambient birdsong and distant water."
  }'

Response envelope (code: 0 means success):

{
  "code": 0,
  "data": { "task_id": "019d...1193", "status": "processing", "price": 0.074 },
  "msg": "success",
  "request_id": "250b...4d35"
}

Step 3 — Poll for the Result

Take the task_id and poll the query endpoint until status is completed, then read the output URL:

import os, time, requests
 
BASE = "https://api.linkmodel.ai/api/v1"
H = {"Authorization": f"Bearer {os.environ['LINKMODEL_API_KEY']}",
     "Content-Type": "application/json"}
 
def generate(payload):
    r = requests.post(f"{BASE}/video-generation", headers=H, json=payload).json()
    if r["code"] != 0:
        raise RuntimeError(r["msg"])
    task_id = r["data"]["task_id"]
    while True:
        q = requests.get(f"{BASE}/query/video-generation",
                         headers=H, params={"task_id": task_id}).json()
        status = q["data"]["status"]
        if status == "completed":
            return q["data"]
        if status == "failed":
            raise RuntimeError("generation failed")
        time.sleep(3)
 
result = generate({
    "model": "seedance-2-0",
    "prompt": "A woman walks into a neon-lit Tokyo alley at night, steadicam follow, rain reflecting city lights, cinematic grade."
})
print(result)

Exact query parameters and field names are in the API reference — confirm them there, as response fields can evolve.

Step 4 — Image-to-Video

Animate a still by passing an image URL alongside a motion prompt:

result = generate({
    "model": "seedance-2-0",
    "prompt": "Crane shot rising from ground level to an aerial view, golden-hour lighting.",
    "image_url": "https://your-cdn.com/frame.jpg"
})

Step 5 — The @ Reference System

Seedance 2.0's signature feature is multimodal referencing — up to 9 images, 3 video clips, and 3 audio files, tagged to lock characters, style, motion, and soundtrack across the clip. Structure your prompt around the references you attach:

@character (portrait.jpg) walks through @setting (alley.jpg) as
@music (theme.mp3) plays. Steadicam follow, rain, cinematic grade.

Attach references per the documented request schema, then tag them in the prompt. This is what makes Seedance strong for consistent, multi-shot output rather than one-off clips.

Prompting Tips That Actually Matter

  1. Lead with the camera — "Dolly zoom into…" beats "a scene where the camera…".
  2. Describe the audio — Seedance generates sound natively; name the ambience, dialogue, and Foley.
  3. Layer time — "First 3s: wide establishing. Seconds 4–8: tracking forward."
  4. Name a look — reference a cinematographer or grade for consistent tone.
  5. Draft cheap — iterate on the Fast/Mini tier, render finals on Standard.

Error Handling

The envelope's code mirrors HTTP status: 400 = bad/missing field, 401 = bad key, 500 = task creation failed (often insufficient balance). Always branch on code != 0, and treat a failed status during polling as a retryable event with backoff. Never hard-loop without a sleep.

Where to Go Next

Compare Seedance against its main rival in Seedance 2.0 vs Kling 3.0, and see the whole field in best AI video generation APIs. Because everything runs through one endpoint, swapping "seedance-2-0" for "kling-v3" re-points your pipeline at native 4K with no other code changes.

Get your key and run the first example in under a minute.

Related Posts