Generatietaak aanmaken
Valideer input, trek credits af, maak een taak aan en retourneer taskId.
Payload parameters
- model: Vereist. Een van: sora-2-text-to-video, sora-2-image-to-video, sora-2-text-to-video-stable, sora-2-image-to-video-stable, sora-2-pro-text-to-video, sora-2-pro-image-to-video, sora-2-pro-storyboard.
- prompt: Voorwaardelijk. Vereist voor alle modellen behalve sora-2-pro-storyboard.
- imageData: Voorwaardelijk. Base64 data URL zoals data:image/png;base64,... Vereist voor image-to-video als geen imageUrl.
- imageUrl: Voorwaardelijk. Publieke afbeelding URL gebruikt wanneer imageData niet is opgegeven.
- aspectRatio: Optioneel. portrait of landscape. Standaard: landscape.
- nFrames: Optioneel. 10, 15, of 25 (alleen storyboard). Standaardwaarden variëren per model.
- size: Optioneel. standard of high. Alleen voor Pro tekst/afbeelding modellen.
- removeWatermark: Optioneel. Verwijder watermerk voor niet-storyboard modellen. Standaard: true.
- isPublic: Optioneel. Of de video openbaar moet worden weergegeven; standaard is true.
- shots: Voorwaardelijk. Vereist voor sora-2-pro-storyboard. Array van '{ Scene, duration }'.
Opmerkingen
- imageData heeft voorrang boven imageUrl wanneer beide worden opgegeven.
- prompt is optioneel voor storyboard en wordt niet naar de provider gestuurd; gebruik shots voor content.
- nFrames wordt genormaliseerd naar de toegestane waarden per model.
- removeWatermark staat standaard op true voor niet-storyboard modellen.
- shots moet Scene (hoofdletter S) bevatten en duration > 0.
Voorbeeld requests
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,
"isPublic": 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-stable",
"prompt": "Turn this image into a dynamic 15s clip.",
"imageData": "data:image/png;base64,iVBORw0KGgoAAA...",
"aspectRatio": "portrait",
"nFrames": "15"
}'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"
}'Voorbeeld response
{
"code": 0,
"message": "ok",
"data": {
"taskId": "281e5b0*********************f39b9"
}
}