الانتقال إلى المحتوى الرئيسي
POST
أنشئ فيديو MiniMax H3 أو H3-Max من نص أو وسائط مرجعية أو الإطارين الأول والأخير. خزّن القيمة المُعادة id للاستعلام عن المهمة وتنزيل الفيديو المكتمل. POST /v1/videos يستخدم multipart/form-data. أرسل عناصر التحكم كحقول نموذج وكرّر كل حقل مرجعي مرة واحدة لكل إدخال وسائط.

اختر نموذجًا

عيّن model إلى أحد معرّفات النماذج التالية. اختر حجم طلب من جدول النموذج المطابق في تعيين المدة والحجم.

اختر وضع إدخال

يستخدم كلا النموذجين الحقول أدناه. عيّن model إلى معرّف النموذج الذي اخترته. تتضمن أمثلة طلبات H3-Max تحويل النص إلى فيديو على درجتي الدقة كلتيهما، والصور المرجعية، والمراجع المدمجة للصور والفيديو والصوت، والإطارين الأول والأخير.

استخدم الصور المرجعية

أرسل الصور المرجعية عبر 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 في الطلب نفسه. أرسل ما لا يزيد إجمالًا عن 12 إدخالًا مرجعيًا، بما في ذلك ما لا يزيد عن ثلاثة مقاطع فيديو وثلاثة مقاطع صوتية. يجب أن تتراوح مدة كل مقطع فيديو أو صوت بين ثانيتين و15 ثانية. ويجب ألا تتجاوز مدة الفيديو المجمعة ومدة الصوت المجمعة 15 ثانية لكل منهما. اقرن الصوت المرجعي بصورة واحدة على الأقل عبر input_reference. صِف الحركة أو التوقيت أو الصوت الذي ينبغي أن يتبعه الفيديو الذي تم إنشاؤه. اجعل حجم كل ملف MP4 مرفوع لا يتجاوز 50 MiB، وكل ملف MP3 مرفوع لا يتجاوز 15 MiB. يساوي MiB واحد 1024 × 1024 بايت. تُظهر أمثلة الطلبات في أعلى هذه الصفحة عناوين URL لملفات MP4، وURIs بيانات MP4، وعناوين URL لملفات MP3 مقترنة بصورة.

ارفع فيديو مرجعيًا

ارفع ملف MP4 لتوجيه بنية اللقطة وحركتها:

ارفع صوتًا مرجعيًا مع صورة

اقرن عنوان URL لصورة مرجعية بملف MP3 مرفوع:

عيّن الإطارين الأول والأخير

أرسل 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:

أحجام minimax-h3-max

استخدم أحجام الطلب هذه مع model=minimax-h3-max:

تدفق المهمة

1

إنشاء المهمة

أرسل طلب النموذج متعدد الأجزاء وخزّن id المُعاد.
2

تحقق من حالة المهمة

استدعِ استرداد فيديو MiniMax H3 إلى أن تكون قيمة status هي completed أو failed.
3

تنزيل النتيجة

عندما تكون المهمة completed، استدعِ تنزيل محتوى فيديو MiniMax H3 لحفظ ملف MP4.

التفويضات

Authorization
string
header
مطلوب

Bearer authentication. Use your CometAPI API key.

الجسم

multipart/form-data
model
enum<string>
افتراضي:minimax-h3
مطلوب

Model ID for the video task. Use minimax-h3 for 768P or 2K, or minimax-h3-max for 480P or 768P. Choose size from the matching model table.

الخيارات المتاحة:
minimax-h3,
minimax-h3-max
prompt
string
افتراضي:A paper boat glides across a still pond, daylight, locked camera, no text.
مطلوب

Text that describes the scene, motion, camera behavior, and visual details that the video should preserve.

Minimum string length: 1
seconds
integer
افتراضي:5

Requested clip duration in whole seconds. Use an integer from 5 through 15. The default is 5.

النطاق المطلوب: 5 <= x <= 15
size
string

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.

Pattern: ^[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"

input_reference

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.

Pattern: ^https://
reference_videos
(string<uri> | file)[]

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.

Required array length: 1 - 3 elements
Pattern: ^(https://|data:video/mp4;base64,)
مثال:

"https://your-media-host/reference.mp4"

reference_audios
(string<uri> | file)[]

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.

Required array length: 1 - 3 elements
Pattern: ^https://
مثال:

"https://your-media-host/reference.mp3"

first_frame
مطلوب if last_frame is set

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.

Pattern: ^https://
مثال:

"https://your-image-host/first-frame.png"

last_frame

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.

Pattern: ^https://
مثال:

"https://your-image-host/last-frame.png"

الاستجابة

200 - application/json

Task created. Store the returned id and use it in retrieve and content requests.

id
string
مطلوب

Task ID. Use this value as task_id in retrieve and content requests.

مثال:

"<task_id>"

object
string
مطلوب

Object type for the asynchronous video task.

Allowed value: "video"
model
enum<string>
مطلوب

Model ID that the task uses.

الخيارات المتاحة:
minimax-h3,
minimax-h3-max
status
enum<string>
مطلوب

Task lifecycle status. Poll until the value is completed or failed.

الخيارات المتاحة:
queued,
in_progress,
completed,
failed
progress
integer
مطلوب

Task progress as a coarse percentage.

النطاق المطلوب: 0 <= x <= 100
created_at
integer<int64>
مطلوب

Task creation time as a Unix timestamp in seconds.

task_id
string

Compatibility alias for id. This field can be omitted from retrieve responses.

مثال:

"<task_id>"

completed_at
integer<int64>

Unix timestamp returned by the platform. Use status, not this field, to decide when polling can stop.

expires_at
integer<int64>

Result expiration time as a Unix timestamp in seconds when the task provides one.

video_url
string<uri>

Video delivery URL. This field appears on completed tasks.

مثال:

"https://your-media-host/result.mp4"

error
object

Failure details. This field appears when the task fails.

آخر تعديل في ١٤ سبتمبر ٢٠٢٦