إنشاء فيديو MiniMax H3
إنشاء مهمة فيديو MiniMax H3 أو H3-Max باستخدام نص أو وسائط مرجعية أو الإطارين الأول والأخير عبر CometAPI
curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=minimax-h3' \
--form-string 'prompt=A paper boat glides across a still pond, daylight, locked camera, no text.' \
--form-string 'seconds=5' \
--form-string 'size=2544x1456'{
"id": "<task_id>",
"task_id": "<task_id>",
"object": "video",
"model": "minimax-h3",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}id للاستعلام عن المهمة وتنزيل الفيديو المكتمل.
POST /v1/videos يستخدم multipart/form-data. أرسل عناصر التحكم كحقول نموذج وكرّر كل حقل مرجعي مرة واحدة لكل إدخال وسائط.
اختر نموذجًا
عيّنmodel إلى أحد معرّفات النماذج التالية. اختر حجم طلب من جدول النموذج المطابق في تعيين المدة والحجم.
| معرّف النموذج | درجات الدقة |
|---|---|
minimax-h3 | 768P, 2K |
minimax-h3-max | 480P, 768P |
اختر وضع إدخال
يستخدم كلا النموذجين الحقول أدناه. عيّنmodel إلى معرّف النموذج الذي اخترته.
| الهدف | الحقول المطلوبة | الحقول الاختيارية |
|---|---|---|
| من النص إلى الفيديو | model, prompt | seconds, size |
| صور مرجعية | model, prompt، عنوان URL واحد أو أكثر لـ input_reference أو ملفات | seconds, size |
| عنوان URL أو URI للبيانات أو ملف لفيديو مرجعي | model, prompt، حقل واحد أو أكثر من حقول reference_videos | seconds, size |
| صوت مرجعي مع صورة | model, prompt, input_reference، حقل واحد أو أكثر من حقول reference_audios | seconds, size |
| عناوين URL للإطارين الأول والأخير | model, prompt, first_frame | last_frame, seconds, size |
| الإطاران الأول والأخير المرفوعان | model, prompt, first_frame ملف | last_frame ملف، seconds, size |
استخدم الصور المرجعية
أرسل الصور المرجعية عبرinput_reference بصفتها عناوين URL عامة يمكن الوصول إليها عبر HTTPS أو ملفات مرفوعة. بالنسبة إلى صور متعددة، كرّر الحقل بترتيب الصور، مع عنوان URL أو ملف واحد لكل حقل.
استخدم جميع عناوين URL أو جميع الملفات ضمن هذا الحقل. أرسل كل عنوان URL بشكل منفصل بدلًا من دمج عناوين URL في قيمة مفصولة بفواصل.
يمكنك إرسال ما يصل إلى تسع صور مرجعية بتنسيق PNG أو JPEG، سواء استخدمت عناوين URL أو الملفات المرفوعة. اجعل حجم كل صورة مرفوعة لا يتجاوز 20 MiB.
في الـ Prompt، صف التفاصيل المرئية التي ينبغي أن يحافظ عليها الفيديو المُنشأ.
استخدم فيديو وصوتًا مرجعيين
أرسلreference_videos وreference_audios كقيم نصية متعددة الأجزاء أو كملفات مرفوعة، باستخدام التنسيقات أدناه.
كرّر كل حقل مرة واحدة لكل إدخال، باستخدام قيم نصية فقط أو ملفات فقط ضمن ذلك الحقل. لا تدمج المدخلات في قيمة مفصولة بفواصل.
يمكن للحقول المختلفة استخدام أنواع إدخال مختلفة، مثل عنوان URL لصورة مع ملف صوتي مرفوع.
لجمع مراجع الصور والفيديو والصوت، أرسل input_reference وreference_videos وreference_audios في الطلب نفسه.
| الحقل | الإدخال | التنسيق |
|---|---|---|
reference_videos | عنوان URL مباشر ومتوافر علنًا عبر HTTPS لملف MP4، أو ملف MP4 مرفوع | MP4 بفيديو H.264؛ ومسار صوت AAC اختياري |
reference_videos | URI بيانات Base64 كامل في حقل نصي | data:video/mp4;base64,<BASE64_MP4> |
reference_audios | عنوان URL مباشر ومتوافر علنًا عبر HTTPS لملف MP3، أو ملف MP3 مرفوع | MP3 |
input_reference.
صِف الحركة أو التوقيت أو الصوت الذي ينبغي أن يتبعه الفيديو الذي تم إنشاؤه.
اجعل حجم كل ملف MP4 مرفوع لا يتجاوز 50 MiB، وكل ملف MP3 مرفوع لا يتجاوز 15 MiB. يساوي MiB واحد 1024 × 1024 بايت.
تُظهر أمثلة الطلبات في أعلى هذه الصفحة عناوين URL لملفات MP4، وURIs بيانات MP4، وعناوين URL لملفات MP3 مقترنة بصورة.
ارفع فيديو مرجعيًا
ارفع ملف MP4 لتوجيه بنية اللقطة وحركتها:curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=minimax-h3' \
--form-string 'prompt=Follow the uploaded reference video shot structure and motion. No text.' \
--form-string 'seconds=5' \
--form-string 'size=1344x768' \
--form 'reference_videos=@/path/to/reference.mp4;type=video/mp4'
ارفع صوتًا مرجعيًا مع صورة
اقرن عنوان URL لصورة مرجعية بملف MP3 مرفوع:curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=minimax-h3' \
--form-string 'prompt=Animate the reference image and synchronize the motion with the uploaded reference audio. No text.' \
--form-string 'seconds=5' \
--form-string 'size=1344x768' \
--form-string 'input_reference=https://your-image-host/reference.png' \
--form 'reference_audios=@/path/to/reference.mp3;type=audio/mpeg'
عيّن الإطارين الأول والأخير
أرسلfirst_frame لصورة البداية، ويمكنك اختياريًا إرسال last_frame واحد لصورة النهاية.
يقبل كل حقل عنوان URL مباشرًا ومتوافرًا علنًا عبر HTTPS لملف PNG واحد أو ملف PNG مرفوعًا واحدًا. اجعل حجم كل ملف PNG مرفوع لا يتجاوز 20 MiB (20 × 1024 × 1024 بايت).
لا تدمج حقول الإطارات مع حقول الصور أو الفيديو أو الصوت المرجعية. استخدم طلبًا منفصلًا للإنشاء المستند إلى الإطارات.
مع مدخلات الإطارات، يحدد size مستوى الدقة. يمكن للخدمة توحيد أبعاد الإخراج النهائية استنادًا إلى الإطارات المتوفرة.
تابع إرسال size بصيغة WxH.
id المعاد. تحقّق من حالة المهمة دوريًا إلى أن تصبح status هي completed أو
failed. عند اكتمال المهمة، نزّل محتوى الفيديو.تعيين المدة والحجم
لكلا النموذجين، عيّنseconds إلى عدد صحيح من 5 إلى 15. القيمة الافتراضية هي 5 ثوانٍ.
اختر دقة ونسبة أبعاد من الجدول الخاص بنموذجك، ثم أرسل قيمة حجم الطلب المقابلة باعتبارها size بصيغة WxH.
بالنسبة إلى طلبات النص والوسائط المرجعية، يحدد size مستوى الدقة ونسبة أبعاد التأطير.
يمكن للخدمة توحيد أبعاد المخرجات النهائية استنادًا إلى الحجم المطلوب والوسائط المرجعية المتوفرة.
أحجام minimax-h3
استخدم أحجام الطلب هذه مع model=minimax-h3:
| الدقة | نسبة الأبعاد | حجم الطلب |
|---|---|---|
768P | 21:9 | 1536x672 |
768P | 16:9 | 1344x768 |
768P | 4:3 | 1024x768 |
768P | 1:1 | 768x768 |
768P | 3:4 | 768x1024 |
768P | 9:16 | 768x1344 |
2K | 21:9 | 2912x1280 |
2K | 16:9 | 2544x1456 |
2K | 4:3 | 1920x1440 |
2K | 1:1 | 1440x1440 |
2K | 3:4 | 1440x1920 |
2K | 9:16 | 1440x2560 |
أحجام minimax-h3-max
استخدم أحجام الطلب هذه مع model=minimax-h3-max:
| الدقة | نسبة الأبعاد | حجم الطلب |
|---|---|---|
480P | 21:9 | 1120x480 |
480P | 16:9 | 864x480 |
480P | 4:3 | 640x480 |
480P | 1:1 | 480x480 |
480P | 3:4 | 480x640 |
480P | 9:16 | 480x864 |
768P | 21:9 | 1792x768 |
768P | 16:9 | 1360x768 |
768P | 4:3 | 1024x768 |
768P | 1:1 | 768x768 |
768P | 3:4 | 768x1024 |
768P | 9:16 | 768x1360 |
تدفق المهمة
إنشاء المهمة
id المُعاد.تحقق من حالة المهمة
status هي completed أو failed.تنزيل النتيجة
completed، استدعِ تنزيل محتوى فيديو MiniMax H3 لحفظ ملف MP4.الجسم
Requested size in WxH form. For text and reference-media requests, size selects the resolution tier and framing aspect ratio. With first or last frames, size selects the resolution tier. Use the matching model table: minimax-h3 uses 768P or 2K; minimax-h3-max uses 480P or 768P. For example, use 1344x768 for H3 at 768P, 864x480 for H3-Max at 480P, or 1360x768 for H3-Max at 768P. The service can normalize the final output dimensions.
^[1-9][0-9]*x[1-9][0-9]*$"1536x672"
"1344x768"
"1024x768"
"768x768"
"768x1024"
"768x1344"
"2912x1280"
"2544x1456"
"1920x1440"
"1440x1440"
"1440x1920"
"1440x2560"
"1120x480"
"864x480"
"640x480"
"480x480"
"480x640"
"480x864"
"1792x768"
"1360x768"
"768x1360"
PNG or JPEG reference images. Repeat input_reference with one publicly accessible HTTPS image URL or uploaded image file per field. Send up to nine reference images, whether you use URLs or uploaded files. Use all URLs or all files within this field. Do not combine URLs into a comma-separated value. Keep each uploaded image at or below 20 MiB. Do not combine this field with first_frame or last_frame. Across images, videos, and audio, send at most 12 reference inputs. Each reference video or audio clip must be 2–15 seconds; keep the combined video duration and combined audio duration at or below 15 seconds each. Submit images in the order you want to reference them in the prompt.
^https://Reference video inputs. Repeat reference_videos with a direct publicly accessible HTTPS MP4 URL or an uploaded MP4 file. Use only text values or only files within this field. Each uploaded file can be up to 50 MiB. Send no more than three video inputs. A complete data:video/mp4;base64,... URI is also accepted as a text value. Use MP4 with H.264 video; an AAC audio track is optional. Do not combine this field with first_frame or last_frame. Across images, videos, and audio, send at most 12 reference inputs. Each reference video or audio clip must be 2–15 seconds; keep the combined video duration and combined audio duration at or below 15 seconds each.
1 - 3 elements^(https://|data:video/mp4;base64,)"https://your-media-host/reference.mp4"
Reference audio inputs. Repeat reference_audios with a direct publicly accessible HTTPS MP3 URL or an uploaded MP3 file. Use only text values or only files within this field. Each uploaded file can be up to 15 MiB. Send no more than three audio inputs. Pair reference audio with at least one reference image. Do not combine this field with first_frame or last_frame. Across images, videos, and audio, send at most 12 reference inputs. Each reference video or audio clip must be 2–15 seconds; keep the combined video duration and combined audio duration at or below 15 seconds each.
1 - 3 elements^https://"https://your-media-host/reference.mp3"
Opening frame input as one direct publicly accessible HTTPS PNG URL or one uploaded PNG file at or below 20 MiB (20 x 1024 x 1024 bytes). Do not combine frame fields with reference media fields.
^https://"https://your-image-host/first-frame.png"
Optional ending frame input, used with first_frame, as one direct publicly accessible HTTPS PNG URL or one uploaded PNG file at or below 20 MiB (20 x 1024 x 1024 bytes). Do not combine frame fields with reference media fields.
^https://"https://your-image-host/last-frame.png"
الاستجابة
Task created. Store the returned id and use it in retrieve and content requests.
curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=minimax-h3' \
--form-string 'prompt=A paper boat glides across a still pond, daylight, locked camera, no text.' \
--form-string 'seconds=5' \
--form-string 'size=2544x1456'{
"id": "<task_id>",
"task_id": "<task_id>",
"object": "video",
"model": "minimax-h3",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}