Create Video
Submit a MiniMax-H3 multimodal video generation task using `POST /v2/video_generation`, with H3-Context-IR prompt enhancement and video regeneration support.
https://zx1.deepwl.net/v2/video_generationcurl --location --request POST 'https://zx1.deepwl.net/v2/h3_context_ir' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "Epic space opera theatrical trailer: a female captain stands alone before a huge observation window while the last fleet assembles and jumps away, bright light flashes, the bridge shakes, and she is left behind."
}
],
"duration": 5,
"ratio": "16:9"
}'{
"task_id": "426586401755526"
}The official format submits a multimodal content array, which differs from the prompt + image fields of MiniMax Video Generation (OpenAI Format). The official format provides three creation endpoints:
| Endpoint | Path | Purpose |
|---|---|---|
| H3-Context-IR Prompt Enhancement | POST /v2/h3_context_ir | Enhance the video prompt and return a structured multimodal description |
| Video Generation | POST /v2/video_generation | Text-to-video, image-to-video, etc. |
| Video Regeneration (Remix) | POST /v2/video_regeneration | Regenerate a new video from an existing video or source task |
All three endpoints return a task_id on success. Use Query Task (Official Format) to poll the result.
Request Headers
Authorizationstring必填Authentication header. Uses a Bearer token, e.g. Bearer YOUR_API_KEY.
Content-Typestring必填Request content type, must be application/json.
Common Request Body
modelstring必填Model name. Currently only supports MiniMax-H3.
contentarray<object>必填Multimodal input array; the order affects role assignment.
typestring必填Content type: text, image_url, video_url, audio_url.
textstringRequired when type=text; prompt text.
image_urlobjectUsed when type=image_url; must include url.
urlstring必填Public image URL. Supports JPG, JPEG, PNG, WEBP, HEIC, HEIF; single file up to 30 MB; width/height range 256–5760 px; aspect ratio range 0.4–2.5. First frame ≤ 1 image, last frame ≤ 1 image, reference images ≤ 9.
video_urlobjectUsed when type=video_url; must include url.
urlstring必填Reference video public URL. Supports MP4, MOV with H.264/AVC or H.265/HEVC encoding; single file up to 50 MB; count ≤ 3; each segment 2–15 seconds with total duration up to 15 seconds; width/height range 256–5760 px; aspect ratio range 0.4–2.5; frame rate range 23.976–60.
audio_urlobjectUsed when type=audio_url; must include url.
urlstring必填Reference audio public URL. Supports WAV, MP3; single file up to 15 MB; count ≤ 3; each segment 2–15 seconds with total duration up to 15 seconds.
rolestringMedia role:
first_frame: first frame (image)last_frame: last frame (image)reference_image: reference imagereference_video: reference videoreference_audio: reference audio
H3-Context-IR Prompt Enhancement
Enhance the video prompt with H3-Context-IR and return a structured multimodal description. The enhanced prompt can be retrieved from the task result via Query Task (Official Format).
durationinteger必填Target video duration in seconds. Range 4-15.
ratiostringAspect ratio: adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16.
callback_urlstringCallback URL invoked after the task completes.
Request Examples
Response Examples
Video Generation
Generate a video from text, images, or other multimodal input.
durationintegerVideo duration in seconds. Range 4-15, default 5.
resolutionstringResolution: 2K or 768P, default 2K.
aigc_watermarkbooleanWhether to add an AIGC watermark to the generated video, default true.
callback_urlstringCallback URL invoked after the task completes.
Request Examples
Response Examples
Video Regeneration (Remix)
Regenerate a new video from an existing video. Two ways to specify the source video (choose one):
- By source video: include a
video_urlitem incontent - By task ID: pass
source_task_id
contentarray<object>Optional for this endpoint (overrides the common definition above); required when regenerating by source video. The multimodal array must include a video_url item for the source video.
source_task_idstringRequired when regenerating by task ID; the source task ID.
resolutionstring必填Video resolution; fixed to 2K for regeneration.
aigc_watermarkbooleanWhether to add an AIGC watermark to the generated video.
callback_urlstringCallback URL invoked after the task completes.
Request Examples
Response Examples
Response Fields
task_idstringTask ID, used for Query Task (Official Format).
content Mixing Rules
Violating the following rules may return 400:
reference_image/reference_video/reference_audiocannot appear together withfirst_frame/last_frame- Every request must include a non-empty
textitem (prompt is required) - The total request body must not exceed 64 MB; use public URLs for large files instead of Base64
Endpoint Comparison
| Endpoint | Purpose | Applicable Parameters | content Key Points |
|---|---|---|---|
h3_context_ir | H3-Context-IR prompt enhancement | model, content, duration (required, 4-15), ratio, callback_url | text (required) + optional first_frame / reference_video / reference_audio |
video_generation | Video generation | model, content, duration (default 5), resolution (default 2K), aigc_watermark (default true), callback_url | text (required) + optional first_frame, etc. |
video_regeneration | Video regeneration | model, content (optional), source_task_id (optional), resolution (required, 2K), aigc_watermark, callback_url | text + video_url (by source video) or source_task_id (by task ID); no duration / ratio |