Seedance 2.0
Seedance 2.0
DokumentationKom igang
API-oversiktText till videoBild till video
API-referens

Text till video

Generera videor fran textprompter med Seedance 2.0 Open API.

Nar mediaUrls utelamnas kor endpointen i ren text-to-video-lage.

Endpoint

POST /api/open/v1/video/generations

Requestexempel

curl --request POST \
  --url https://www.seedance2.ink/api/open/v1/video/generations \
  --header 'Authorization: Bearer sd2_live_your_api_key' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "seedance-2.0",
    "prompt": "A river flowing through an autumn forest, aerial view, cinematic motion",
    "aspectRatio": "16:9",
    "duration": 5,
    "resolution": "720p",
    "webhookUrl": "https://your-app.com/webhooks/seedance",
    "metadata": {
      "projectId": "proj_1001",
      "sceneId": "scene_08"
    }
  }'

Lyckat svar

{
  "success": true,
  "requestId": "req_1234567890",
  "status": "queued",
  "creditsCharged": 40
}

Requestfalt

FieldTypeRequiredDescription
modelstringYesEtt av seedance-2.0, seedance-2.0-fast, seedance-1.5-pro.
promptstringYesEn naturlig sprakprompt som beskriver malvideon.
aspectRatiostringNoEtt av 16:9, 9:16, 1:1.
durationintegerNoseedance-2.0 och seedance-2.0-fast stoder 4-15 sekunder; seedance-1.5-pro stoder 5 eller 10 sekunder.
resolutionstringNoEtt av 480p, 720p, 1080p.
webhookUrlstringNoCallback-URL som tar emot slutresultatet.
metadataobjectNoAnpassade metadata som sparas tillsammans med requesten.

Hamta resultat

curl https://www.seedance2.ink/api/open/v1/video/generations/req_1234567890 \
  --header 'Authorization: Bearer sd2_live_your_api_key'
{
  "success": true,
  "requestId": "req_1234567890",
  "status": "succeeded",
  "model": "seedance-2.0",
  "prompt": "A river flowing through an autumn forest, aerial view, cinematic motion",
  "duration": 5,
  "aspectRatio": "16:9",
  "output": {
    "type": "video",
    "url": "https://pub-your-bucket.r2.dev/open-api-results/req_1234567890.mp4"
  },
  "error": null
}

Avbryt jobb

curl --request POST \
  --url https://www.seedance2.ink/api/open/v1/video/generations/req_1234567890/cancel \
  --header 'Authorization: Bearer sd2_live_your_api_key'
{
  "success": true,
  "requestId": "req_1234567890",
  "status": "cancelled"
}

Noteringar

  • creditsCharged beraknas nar jobbet accepteras.
  • output.url returneras bara nar status ar succeeded.
  • Om du vill ha pushnotiser i stallet for polling, konfigurera en webhook.

API-oversikt

Forsta autentisering, inlamning, statuskontroll och webhookar i Seedance 2.0 Open API.

Bild till video

Generera videor fran bilder och referensmedia med Seedance 2.0 Open API.

Innehållsförteckning

EndpointRequestexempelLyckat svarRequestfaltHamta resultatAvbryt jobbNoteringar