Model APIs
MAGI-2
Asynchrone API-Referenz für MAGI-2 Text-to-Video, Start-/Endbild-Image-to-Video und multimodales Reference-to-Video auf SeedRouter.
MAGI-2 ist das 480B-Audio-Video-Modell von Sand.ai. Auf SeedRouter wird es über drei öffentliche Modell-IDs am einheitlichen asynchronen Video-Endpunkt (POST /v1/videos/generations) bereitgestellt; der Aufgabenstatus wird über GET /v1/tasks/{id} abgefragt.
| Modell-ID | Modus | Erforderliche Eingabe |
|---|---|---|
magi-2-text-to-video | Text-to-Video | prompt (nicht leer, bis zu 15.000 Zeichen) |
magi-2-image-to-video | Startbild- / Start- und Endbild-Image-to-Video | image_urls (1–2 öffentliche HTTP/HTTPS-Bild-URLs) |
magi-2-reference-to-video | Multimodales Reference-to-Video | Mindestens eines aus image_urls, video_urls oder audio_urls |
Alle drei Routen erzeugen 1080p-MP4-Videos mit einer Länge von 4 bis 30 Sekunden (ganzzahlig) samt optionalen synchronen Dialogen, Soundeffekten und Musik (generate_audio: true als Standard).
Endpunkte & Authentifizierung
- Aufgabe einreichen:
POST https://api.seedrouter.ai/v1/videos/generations - Aufgabenstatus abfragen:
GET https://api.seedrouter.ai/v1/tasks/{id} - Authentifizierung:
Authorization: Bearer YOUR_API_KEY - Content-Type:
application/json
Anfrageparameter
Unbekannte Felder werden mit HTTP 400 (invalid_request_error) abgelehnt.
| Parameter | Typ | Standard | Einschränkungen & Beschreibung |
|---|---|---|---|
model | string | erforderlich | magi-2-text-to-video, magi-2-image-to-video oder magi-2-reference-to-video. |
prompt | string | — | Erforderlich für magi-2-text-to-video; optional für Image-to-Video und Reference-to-Video. Wenn angegeben, nicht leer und maximal 15.000 Zeichen lang. |
image_urls | string[] | — | Öffentliche HTTP/HTTPS-Bild-URLs (kein Base64 und keine data:-URIs, jeweils unter 30 MB). Bei magi-2-text-to-video nicht zulässig. magi-2-image-to-video verlangt 1 Bild (Startbild) oder 2 Bilder (Start- und Endbild). magi-2-reference-to-video akzeptiert bis zu 10 Bilder. |
video_urls | string[] | — | Nur für magi-2-reference-to-video. Bis zu 5 öffentliche HTTP/HTTPS-MP4/MOV-Referenzvideos (jeweils bis 200 MB, 2–30 s; Gesamtdauer ≤ 30 s). |
audio_urls | string[] | — | Nur für magi-2-reference-to-video. Bis zu 5 öffentliche HTTP/HTTPS-WAV/MP3-Referenzaudiospuren (jeweils bis 15 MB, 2–30 s; Gesamtdauer ≤ 30 s). |
duration | integer | 5 | Gewünschte Ausgabelänge in Sekunden, ganze Zahl von 4 bis 30. |
quality | string | "1080p" | Ausgabeauflösung. Derzeit "1080p". |
aspect_ratio | string | "16:9" | Eines von "16:9", "9:16", "1:1", "4:3", "3:4", "21:9". |
generate_audio | boolean | true | Synchronisierte Dialoge, Soundeffekte und Musik ohne Aufpreis erzeugen. Für stummes Video auf false setzen. |
seed | integer | — | Optionaler Zufalls-Seed (0 bis 4294967295) für reproduzierbare Läufe. |
Beispiele
1. Text-to-Video
curl -X POST https://api.seedrouter.ai/v1/videos/generations \
-H "Authorization: Bearer $SEEDROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "magi-2-text-to-video",
"prompt": "Continuous 5-second tracking shot through a rainy Tokyo alley at dusk, neon reflections on wet asphalt, distant train rumble and footsteps",
"duration": 5,
"quality": "1080p",
"aspect_ratio": "16:9",
"generate_audio": true
}'2. Image-to-Video (Start- / Endbild)
curl -X POST https://api.seedrouter.ai/v1/videos/generations \
-H "Authorization: Bearer $SEEDROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "magi-2-image-to-video",
"prompt": "The camera slowly pushes in as subtle natural motion brings the frame to life",
"image_urls": [
"https://example.com/first-frame.jpg"
],
"duration": 5,
"quality": "1080p",
"aspect_ratio": "16:9",
"generate_audio": true
}'3. Reference-to-Video
curl -X POST https://api.seedrouter.ai/v1/videos/generations \
-H "Authorization: Bearer $SEEDROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "magi-2-reference-to-video",
"prompt": "The same character walks through a sunlit street market, handheld tracking shot",
"image_urls": [
"https://example.com/character.jpg"
],
"duration": 5,
"quality": "1080p",
"aspect_ratio": "16:9",
"generate_audio": true
}'4. Aufgabenergebnis abfragen
curl https://api.seedrouter.ai/v1/tasks/task_xxxxxxxx \
-H "Authorization: Bearer $SEEDROUTER_API_KEY"Das Einreichen gibt zurück:
{
"id": "task_xxxxxxxx",
"model": "magi-2-text-to-video",
"status": "processing",
"created_at": 1764120000
}Sobald das Polling "status": "completed" erreicht, steht die ausgelieferte MP4-URL in output.video_url:
{
"id": "task_xxxxxxxx",
"model": "magi-2-text-to-video",
"status": "completed",
"created_at": 1764120000,
"finished_at": 1764120095,
"output": {
"video_url": "https://static.seedrouter.ai/..."
}
}Abrechnung
Alle drei MAGI-2-Routen werden pro angeforderter Ausgabesekunde in 1080p abgerechnet (duration von 4 bis 30 Sekunden). Referenzbilder, Referenzvideos, Referenzaudiospuren und synchrone Audiogenerierung verursachen keinen Aufpreis. Fehlgeschlagene Aufgaben werden nicht berechnet.
Die aktuellen Live-Sekundenpreise findest du auf der MAGI-2-Modellseite.
