إنشاء مهمة توليد
التحقق من صحة الإدخال، وخصم الرصيد، وإنشاء مهمة، وإرجاع taskId.
معلمات الحمولة
- مطلوب. واحد من 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.
- شرطي. مطلوب لجميع النماذج باستثناء sora-2-pro-storyboard.
- شرطي. عنوان URL لبيانات Base64 مثل data:image/png;base64,... مطلوب لتحويل الصورة إلى فيديو إذا لم يكن هناك imageUrl.
- شرطي. عنوان URL للصورة العامة يُستخدم عندما لا يتم توفير imageData.
- اختياري. portrait أو landscape. الافتراضي: landscape.
- اختياري. 10 أو 15 أو 25 (لوحة القصة فقط). تختلف الافتراضيات حسب النموذج.
- اختياري. standard أو high. فقط لنماذج Pro نص/صورة.
- اختياري. إزالة العلامة المائية للنماذج غير لوحة القصة. الافتراضي: true.
- شرطي. مطلوب لـ sora-2-pro-storyboard. مصفوفة من '{ Scene, duration }'.
ملاحظات
- imageData له الأولوية على imageUrl عند توفير كليهما.
- prompt اختياري للوحة القصة ولا يُرسل إلى المزود؛ استخدم shots للمحتوى.
- يتم تطبيع nFrames إلى القيم المسموح بها لكل نموذج.
- removeWatermark افتراضيًا true للنماذج غير لوحة القصة.
- يجب أن تتضمن shots حقل Scene (بحرف S كبير) ومدة > 0.
طلبات نموذجية
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"
}'استجابة نموذجية
{
"code": 0,
"message": "ok",
"data": {
"taskId": "281e5b0*********************f39b9"
}
}