API Referansi
Goruntuden videoya
Seedance 2.0 Open API ile goruntulerden ve referans medyalardan video uretin.
Bu modda mediaUrls alanina bir veya daha fazla herkese acik medya URL si gonderirsiniz.
Endpoint
POST /api/open/v1/video/generationsDesteklenen referans tipleri
| Type | Common formats | Typical usage |
|---|---|---|
| Goruntu | .jpg, .jpeg, .png, .webp, .gif, .bmp | Ilk kare, son kare, stil referansi |
| Video | .mp4, .mov, .m4v | Hareket ve kamera referansi |
| Ses | .mp3, .wav | Ritim veya zamanlama referansi |
Istek 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 young woman blows out birthday candles, warm indoor lighting, shallow depth of field",
"mediaUrls": [
"https://example.com/photo.jpg"
],
"aspectRatio": "16:9",
"duration": 5,
"resolution": "720p"
}'Basarili yanit
{
"success": true,
"requestId": "req_1234567890",
"status": "queued",
"creditsCharged": 64
}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. |
mediaUrls | string[] | Yes | Bir ile bes arasinda herkese acik referans medya URL si. |
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
mediaUrlsen fazla5oge destekler.- Herkese acik HTTPS URL leri kullanin.
- Referans medya gerekmiyorsa Metinden videoya kullanin.