Seedance 2.0 API Dokumentation
Vollständiger Leitfaden zur Integration der Seedance 2.0 Videogenerierungs-API in Ihre Anwendungen.
Schnellstart
| 1 | curl -X POST 'https://seedanceapi.org/v1/generate' \ |
| 2 | -H 'Authorization: Bearer YOUR_API_KEY' \ |
| 3 | -H 'Content-Type: application/json' \ |
| 4 | -d '{ |
| 5 | "prompt": "A cinematic shot of mountains at sunrise with flowing clouds", |
| 6 | "aspect_ratio": "16:9", |
| 7 | "resolution": "720p", |
| 8 | "duration": "8" |
| 9 | }' |
Authentifizierung
Alle API-Anfragen erfordern eine Authentifizierung mit einem Bearer-Token im Authorization-Header.
Wichtig: Sie können Ihren API-Schlüssel von der API-Keys-Seite in Ihrem Dashboard erhalten. → API-Schlüssel erhalten
| 1 | Authorization: Bearer YOUR_API_KEY |
Preise
480p Auflösung
Schnelle Generierung, geeignet für Vorschauen und Entwürfe
| Dauer | Ohne Audio | Mit Audio |
|---|---|---|
| 4s | 8 credits ($0.04) | 14 credits ($0.07) |
| 8s | 14 credits ($0.07) | 28 credits ($0.14) |
| 12s | 19 credits ($0.095) | 38 credits ($0.19) |
720p Auflösung
Hohe Qualität, empfohlen für Produktion
| Dauer | Ohne Audio | Mit Audio |
|---|---|---|
| 4s | 14 credits ($0.07) | 28 credits ($0.14) |
| 8s | 28 credits ($0.14) | 56 credits ($0.28) |
| 12s | 42 credits ($0.21) | 84 credits ($0.42) |
API-Endpunkte
/v1/generateNeue Videoerstellungs-Aufgabe mit dem Seedance 2.0 Modell erstellen. Unterstützt Text-zu-Video und Bild-zu-Video.
Anfragekörper
Textbeschreibung des zu erstellenden Videos (max. 2000 Zeichen)
Ausgabeseitenverhältnis. Unterstützt: 1:1, 16:9, 9:16, 4:3, 3:4, 21:9, 9:21 Defaults to 1:1.
Videoauflösung: 480p oder 720p Defaults to 720p.
Videodauer in Sekunden: 4, 8 oder 12 Defaults to 8.
KI-Audiogenerierung für das Video aktivieren Defaults to false.
Kamera fixieren, um Bewegungsunschärfe zu reduzieren Defaults to false.
Array von Referenzbild-URLs für Bild-zu-Video (max. 1)
Webhook-URL für asynchrone Statusbenachrichtigungen. Muss öffentlich erreichbar sein.
Text zu Video
| 1 | { |
| 2 | "prompt": "A majestic eagle soaring through golden sunset clouds over ocean waves", |
| 3 | "aspect_ratio": "16:9", |
| 4 | "resolution": "720p", |
| 5 | "duration": "8" |
| 6 | } |
Bild zu Video
| 1 | { |
| 2 | "prompt": "The character slowly turns and smiles at the camera", |
| 3 | "image_urls": [ |
| 4 | "https://example.com/my-image.jpg" |
| 5 | ], |
| 6 | "aspect_ratio": "16:9", |
| 7 | "resolution": "720p", |
| 8 | "duration": "4" |
| 9 | } |
Mit Audiogenerierung
| 1 | { |
| 2 | "prompt": "A peaceful river flowing through a forest with birds singing", |
| 3 | "aspect_ratio": "16:9", |
| 4 | "resolution": "720p", |
| 5 | "duration": "8", |
| 6 | "generate_audio": true, |
| 7 | "fixed_lens": true |
| 8 | } |
Antworten
Task created successfully
| 1 | { |
| 2 | "code": 200, |
| 3 | "message": "success", |
| 4 | "data": { |
| 5 | "task_id": "seed15abc123def456pro", |
| 6 | "status": "IN_PROGRESS" |
| 7 | } |
| 8 | } |
/v1/statusStatus einer Videoerstellungs-Aufgabe prüfen und Ergebnis nach Abschluss abrufen.
Abfrageparameter
Die eindeutige Aufgaben-ID vom Generate-Endpunkt
Beispielanfrage
| 1 | curl -X GET 'https://seedanceapi.org/v1/status?task_id=seed15abc123def456pro' \ |
| 2 | -H 'Authorization: Bearer YOUR_API_KEY' |
💡 Tip: Das response-Feld in der Status-API ist ein Array von Video-URLs. Sie können direkt auf data.response[0] zugreifen.
| 1 | // Extract video URL from response |
| 2 | const videoUrl = data.response[0]; |
Antworten
| 1 | { |
| 2 | "code": 200, |
| 3 | "message": "success", |
| 4 | "data": { |
| 5 | "task_id": "seed15abc123def456pro", |
| 6 | "status": "SUCCESS", |
| 7 | "consumed_credits": 28, |
| 8 | "created_at": "2026-02-07T10:30:00Z", |
| 9 | "request": { |
| 10 | "prompt": "A majestic eagle soaring through golden sunset clouds", |
| 11 | "aspect_ratio": "16:9", |
| 12 | "resolution": "720p", |
| 13 | "duration": "8" |
| 14 | }, |
| 15 | "response": [ |
| 16 | "https://cdn.example.com/videos/seed15abc123def456pro.mp4" |
| 17 | ], |
| 18 | "error_message": null |
| 19 | } |
| 20 | } |
API-Spielplatz
Testen Sie die API direkt in Ihrem Browser. Ersetzen Sie YOUR_API_KEY durch Ihren tatsächlichen API-Schlüssel.
Fehlercodes
| Status | Code | Description |
|---|---|---|
| 400 Ungültige Anfrage | INVALID_PROMPT | Der Prompt ist ungültig oder leer |
| 400 Ungültige Anfrage | INVALID_ASPECT_RATIO | Nicht unterstütztes Seitenverhältnis |
| 400 Ungültige Anfrage | INVALID_RESOLUTION | Auflösung muss 480p oder 720p sein |
| 400 Ungültige Anfrage | INVALID_DURATION | Dauer muss 4, 8 oder 12 Sekunden sein |
| 400 Ungültige Anfrage | TOO_MANY_IMAGES | Maximal 1 Bild-URL im image_urls-Array erlaubt |
| 401 Nicht autorisiert | INVALID_API_KEY | API-Schlüssel fehlt oder ist ungültig |
| 402 | INSUFFICIENT_CREDITS | Nicht genügend Credits für diesen Vorgang |
| 404 Nicht gefunden | TASK_NOT_FOUND | Aufgaben-ID nicht gefunden oder gehört nicht zu Ihrem Konto |
| 500 Interner Serverfehler | INTERNAL_ERROR | Serverfehler, bitte versuchen Sie es später erneut |