API Quickstart

Create and poll an image-to-video generation.

1. Set credentials

export SEEDANCE_BASE_URL="https://api.seedance2video.io/v1"
export SEEDANCE_API_KEY="sd_live_replace_me"

Store the key only in a server-side secret manager or n8n Credential.

2. Create a generation

The input host must be approved for your API Key before use.

curl --request POST "$SEEDANCE_BASE_URL/videos" \
  --header "Authorization: Bearer $SEEDANCE_API_KEY" \
  --header "Idempotency-Key: order-10086-shot-1" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "seedance-2.0-pro",
    "mode": "image-to-video",
    "prompt": "The subject slowly turns toward the camera.",
    "inputs": [{
      "type": "image",
      "url": "https://media.example.com/reference.png"
    }],
    "parameters": {
      "duration_seconds": 5,
      "resolution": "720p",
      "aspect_ratio": "16:9",
      "generate_audio": true
    }
  }'

The API returns 202 Accepted with a generation id, status, status_url, and billing.cost_credits. Billing uses the same PC calculation and credit consumption order.

3. Poll the same generation

curl "$SEEDANCE_BASE_URL/generations/GENERATION_ID" \
  --header "Authorization: Bearer $SEEDANCE_API_KEY"

Respect retry_after_seconds or the Retry-After header. Continue polling while status is queued or processing.

4. Read the completed URL

{
  "status": "completed",
  "output": {
    "urls": ["https://.../completed-video.mp4"],
    "video_url": "https://.../completed-video.mp4"
  },
  "billing": {
    "unit": "credits",
    "cost_credits": 355,
    "policy": "same_as_pc"
  }
}

If create times out, retry with the exact same body and Idempotency-Key. Do not automatically create a new request with a new key.