Generierungsaufgabe erstellen
Eingabe validieren, Credits abziehen, Aufgabe erstellen und taskId zurückgeben.
Payload-Parameter
- Erforderlich. Eines von sora-2-text-to-video, sora-2-image-to-video, sora-2-pro-text-to-video, sora-2-pro-image-to-video, sora-2-pro-storyboard.
- Bedingt. Erforderlich für alle Modelle außer sora-2-pro-storyboard.
- Bedingt. Base64-Daten-URL wie data:image/png;base64,... Erforderlich für Bild-zu-Video, wenn keine imageUrl vorhanden.
- Bedingt. Öffentliche Bild-URL, die verwendet wird, wenn imageData nicht angegeben ist.
- Optional. portrait oder landscape. Standard: landscape.
- Optional. 10, 15 oder 25 (nur Storyboard). Standardwerte variieren je nach Modell.
- Optional. standard oder high. Nur für Pro Text/Bild-Modelle.
- Optional. Wasserzeichen für Nicht-Storyboard-Modelle entfernen. Standard: true.
- Bedingt. Erforderlich für sora-2-pro-storyboard. Array von '{ Scene, duration }'.
Hinweise
- imageData hat Vorrang vor imageUrl, wenn beide angegeben sind.
- prompt ist für Storyboard optional und wird nicht an den Anbieter gesendet; verwenden Sie shots für den Inhalt.
- nFrames wird auf die zulässigen Werte pro Modell normalisiert.
- removeWatermark ist standardmäßig true für Nicht-Storyboard-Modelle.
- shots muss Scene (großes S) und duration > 0 enthalten.
Beispielanfragen
curl -X POST https://freesoragenerator.com/api/v1/video/sora-pro \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2-pro-text-to-video",
"prompt": "A cinematic shot of a futuristic city at sunset.",
"aspectRatio": "landscape",
"nFrames": "10",
"size": "high",
"removeWatermark": true
}'curl -X POST https://freesoragenerator.com/api/v1/video/sora-pro \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2-image-to-video",
"prompt": "Turn this image into a dynamic 10s clip.",
"imageUrl": "https://example.com/reference.png",
"aspectRatio": "portrait",
"nFrames": "10"
}'curl -X POST https://freesoragenerator.com/api/v1/video/sora-pro \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2-pro-storyboard",
"shots": [
{ "Scene": "Establishing shot of a city skyline at dusk", "duration": 5 },
{ "Scene": "Close-up of a runner splashing through puddles", "duration": 5 }
],
"aspectRatio": "landscape",
"nFrames": "10"
}'Beispielantwort
{
"code": 0,
"message": "ok",
"data": {
"taskId": "281e5b0*********************f39b9"
}
}