API Referansi
API Genel Bakis
Seedance 2.0 Open API de kimlik dogrulama, is gonderimi, durum sorgulama ve webhook kullanimini anlayin.
Seedance 2.0 Open API ile kendi urununuzden asenkron video uretim gorevleri gonderebilir ve islem tamamlandiginda sonucu alabilirsiniz.
Base URL
https://www.seedance2.inkAuthentication
Tum Open API istekleri, Seedance panelinde olusturulan bir Bearer token kullanir.
Authorization: Bearer sd2_live_your_api_key{
"success": false,
"error": {
"code": "unauthorized",
"message": "Invalid API key"
}
}Entegrasyon akisi
- Seedance panelinde bir API Key olusturun.
POST /api/open/v1/video/generationsile bir gorev gonderin.- Donen
requestIddegerini saklayin. GET /api/open/v1/video/generations/{requestId}ile son duruma kadar sorgulayin.- Isterseniz tamamlanma bildirimleri icin webhook kullanin.
Temel endpoint ler
| Method | Endpoint | Description |
|---|---|---|
GET | /api/open/v1/models | Kullanilabilir modelleri, sureleri, oranlari, cozunurlukleri ve fiyat bilgilerini listeler. |
POST | /api/open/v1/video/generations | Yeni bir video uretim gorevi olusturur. |
GET | /api/open/v1/video/generations/{requestId} | Gorev durumunu sorgular ve tamamlandiginda cikti URL sini doner. |
POST | /api/open/v1/video/generations/{requestId}/cancel | Kuyruktaki veya islenen bir gorevi iptal eder. |
Available Models
| Model | Best for | Supported durations | Resolutions |
|---|---|---|---|
seedance-2.0 | Highest quality, multimodal generation | 4-15 seconds | 480p, 720p, 1080p |
seedance-2.0-fast | Faster turnaround | 4-15 seconds | 480p, 720p, 1080p |
seedance-1.5-pro | Lower-cost fallback workloads | 5 or 10 seconds | 480p, 720p, 1080p |
Supported aspect ratios:
16:99:161:1
Durumlar
| Status | Description |
|---|---|
queued | Istek kabul edildi ve kuyrukta bekliyor. |
processing | Uretim su anda isleniyor. |
succeeded | Gorev basariyla tamamlandi ve output.url hazir. |
failed | Gorev basarisiz oldu. error alanini kontrol edin. |
cancelled | Gorev tamamlanmadan once iptal edildi. |
Models Endpoint Example
curl https://www.seedance2.ink/api/open/v1/models{
"success": true,
"data": [
{
"id": "seedance-2.0",
"type": "video_generation",
"mode": "image_to_video",
"durations": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
"aspectRatios": ["16:9", "9:16", "1:1"],
"resolutions": ["480p", "720p", "1080p"],
"usdPerSecond": {
"480p": 0.05,
"720p": 0.1,
"1080p": 0.2
}
}
]
}Webhook lar
Her istek icin webhookUrl tanimlayabilir veya API Key seviyesinde varsayilan bir callback adresi ayarlayabilirsiniz.
- Ikisi de varsa, istek icindeki
webhookUrlonceliklidir. - Webhook Secret tanimliysa
x-seedance-signaturebasligi gonderilir. - Webhook lar sadece gorev son duruma ulastiginda gonderilir.
x-seedance-signature: <hex_sha256_hmac>{
"success": true,
"requestId": "req_1234567890",
"status": "succeeded",
"output": {
"type": "video",
"url": "https://pub-your-bucket.r2.dev/open-api-results/req_1234567890.mp4"
},
"error": null
}Hata kodlari
| HTTP status | Error code | Description |
|---|---|---|
400 | invalid_request | Istek govdesi beklenen semaya uymuyor. |
401 | unauthorized | API Key eksik veya gecersiz. |
402 | insufficient_credits | Gorev olusturmak icin yeterli kredi yok. |
404 | not_found | Mevcut API Key icin gorev bulunamadi. |
429 | rate_limited | Dakikalik limit veya aylik kota asildi. |
500 | internal_error | Beklenmeyen bir sunucu hatasi olustu. |
Sonraki adimlar
- Metinden videoya sayfasini okuyun
- Goruntuden videoya sayfasini okuyun