Official Format

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.

POSThttps://zx1.deepwl.net/v2/video_generation
Request
curl --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"
}'
Response
{
  "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:

EndpointPathPurpose
H3-Context-IR Prompt EnhancementPOST /v2/h3_context_irEnhance the video prompt and return a structured multimodal description
Video GenerationPOST /v2/video_generationText-to-video, image-to-video, etc.
Video Regeneration (Remix)POST /v2/video_regenerationRegenerate 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.

textstring

Required when type=text; prompt text.

image_urlobject

Used 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_urlobject

Used 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_urlobject

Used 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.

rolestring

Media role:

  • first_frame: first frame (image)
  • last_frame: last frame (image)
  • reference_image: reference image
  • reference_video: reference video
  • reference_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.

ratiostring

Aspect ratio: adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16.

callback_urlstring

Callback URL invoked after the task completes.

Request Examples

Response Examples

Video Generation

Generate a video from text, images, or other multimodal input.

durationinteger

Video duration in seconds. Range 4-15, default 5.

resolutionstring

Resolution: 2K or 768P, default 2K.

aigc_watermarkboolean

Whether to add an AIGC watermark to the generated video, default true.

callback_urlstring

Callback 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_url item in content
  • 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_idstring

Required when regenerating by task ID; the source task ID.

resolutionstring必填

Video resolution; fixed to 2K for regeneration.

aigc_watermarkboolean

Whether to add an AIGC watermark to the generated video.

callback_urlstring

Callback URL invoked after the task completes.

Request Examples

Response Examples

Response Fields

task_idstring

Task ID, used for Query Task (Official Format).

content Mixing Rules

Violating the following rules may return 400:

  • reference_image / reference_video / reference_audio cannot appear together with first_frame / last_frame
  • Every request must include a non-empty text item (prompt is required)
  • The total request body must not exceed 64 MB; use public URLs for large files instead of Base64

Endpoint Comparison

EndpointPurposeApplicable Parameterscontent Key Points
h3_context_irH3-Context-IR prompt enhancementmodel, content, duration (required, 4-15), ratio, callback_urltext (required) + optional first_frame / reference_video / reference_audio
video_generationVideo generationmodel, content, duration (default 5), resolution (default 2K), aigc_watermark (default true), callback_urltext (required) + optional first_frame, etc.
video_regenerationVideo regenerationmodel, content (optional), source_task_id (optional), resolution (required, 2K), aigc_watermark, callback_urltext + video_url (by source video) or source_task_id (by task ID); no duration / ratio