API Referansi
Metinden videoya
Seedance 2.0 Open API ile metin istemlerinden video uretin.
mediaUrls gonderilmezse bu endpoint saf text-to-video modunda calisir.
Endpoint
POST /api/open/v1/video/generationsIstek ornegi
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"
}
}'Basarili yanit
{
"success": true,
"requestId": "req_1234567890",
"status": "queued",
"creditsCharged": 40
}Istek alanlari
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | seedance-2.0, seedance-2.0-fast, seedance-1.5-pro degerlerinden biri. |
prompt | string | Yes | Hedef videoyu anlatan dogal dil istemi. |
aspectRatio | string | No | 16:9, 9:16, 1:1 degerlerinden biri. |
duration | integer | No | seedance-2.0 ve seedance-2.0-fast 4-15 saniyeyi; seedance-1.5-pro ise 5 veya 10 saniyeyi destekler. |
resolution | string | No | 480p, 720p, 1080p degerlerinden biri. |
webhookUrl | string | No | Sonucun gonderilecegi callback URL si. |
metadata | object | No | Istekle birlikte saklanan ozel metadata. |
Sonucu sorgulama
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
}Gorevi iptal et
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"
}Notlar
creditsCharged, gorev kabul edildiginde hesaplanir.output.urlsadecestatusdegerisucceededoldugunda doner.- Polling yerine bildirim istiyorsaniz webhook ayarlayin.