MiniMax Video Generation

OpenAI compatible: POST /v1/video/generations. Native path: /v2/video_generation. Video Generation API

MiniMax H3 supports text-to-video, start-and-end frame image-to-video, and image/video/audio multimodal reference-to-video. Two calling modes are now supported:

  • OpenAI compatible: submit via POST /v1/video/generations, poll via GET /v1/video/generations/{task_id}
  • MiniMax official native: submit via POST /v2/video_generation, poll via GET /v2/query/video_generation/{task_id}

Mutually Exclusive Modes: Start/end frame generation (first_frame/last_frame) and reference generation (reference_image/reference_video/reference_audio) cannot be mixed.


1. OpenAI-Compatible Integration (POST)

  • HTTP Method: POST
  • Request Path: https://www.tokenpad.ai/v1/video/generations
  • Auth Header: Authorization: Bearer sk-your_token

A. Text-to-Video

For text-to-video, ratio is required and cannot be adaptive.

curl -X POST https://www.tokenpad.ai/v1/video/generations \
  -H "Authorization: Bearer sk-your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-H3",
    "prompt": "Epic space opera trailer: a female captain stands alone before the observation window as the fleet warps away, the bridge trembles, leaving her behind",
    "resolution": "2K",
    "ratio": "16:9",
    "duration": 5
  }'

B. Image-to-Video (First Frame / Start & End Frames)

1 image defaults to first frame; 2 images default to first + last frame. You can also explicitly specify role.

curl -X POST https://www.tokenpad.ai/v1/video/generations \
  -H "Authorization: Bearer sk-your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-H3",
    "prompt": "Camera pushes in toward the background figure as steam rises thicker from the ramen bowl, smooth and natural motion",
    "images": [
      "https://example.com/first_frame.png",
      "https://example.com/last_frame.png"
    ],
    "resolution": "2K",
    "duration": 5
  }'

Explicit role example:

curl -X POST https://www.tokenpad.ai/v1/video/generations \
  -H "Authorization: Bearer sk-your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-H3",
    "prompt": "The subject slowly turns around and smiles as the camera gently pushes in",
    "images": [
      { "url": "https://example.com/first_frame.png", "role": "first_frame" },
      { "url": "https://example.com/last_frame.png", "role": "last_frame" }
    ],
    "resolution": "768P",
    "duration": 6
  }'

C. Multi-Image Reference Video Generation

Use role: "reference_image" (or equivalent type). Start/end frames cannot be passed alongside reference mode.

curl -X POST https://www.tokenpad.ai/v1/video/generations \
  -H "Authorization: Bearer sk-your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-H3",
    "prompt": "Using the character appearance from image 1 and the cafe setting from image 2, smooth jib camera movement as the character carries coffee and takes a seat",
    "images": [
      { "url": "https://example.com/character.png", "role": "reference_image" },
      { "url": "https://example.com/cafe.png", "role": "reference_image" }
    ],
    "resolution": "2K",
    "ratio": "16:9",
    "duration": 5
  }'

D. Image + Video + Audio Multimodal Reference Generation

Requires at least one reference image or reference video; audio alone is not supported.

curl -X POST https://www.tokenpad.ai/v1/video/generations \
  -H "Authorization: Bearer sk-your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-H3",
    "prompt": "The character says: Go with the wind, live in the moment. Timbre follows the reference audio, motion follows the reference video",
    "images": [
      { "url": "https://example.com/character.png", "role": "reference_image" }
    ],
    "videos": [
      "https://example.com/motion_ref.mp4"
    ],
    "audios": [
      "https://example.com/voice_ref.mp3"
    ],
    "resolution": "2K",
    "duration": 5
  }'

2. OpenAI-Compatible Polling Result (GET)

  • Request Path: /v1/video/generations/{task_id} or /v1/tasks/{task_id}
curl -X GET https://www.tokenpad.ai/v1/video/generations/video_task_minimax_001 \
  -H "Authorization: Bearer sk-your_token_here"

3. MiniMax Official Native Route Examples

Native routes are ideal for clients already integrated with MiniMax's official SDK / request payloads—simply replace the Base URL and authentication without rewriting into OpenAI-compatible format.

A. Native Task Submission

  • Request Path: /v2/video_generation
curl -X POST https://www.tokenpad.ai/v2/video_generation \
  -H "Authorization: Bearer sk-your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-H3",
    "content": [
      { "type": "text", "text": "Rainy city neon night, camera slowly pushes in as the person turns to look at the lens" },
      { "type": "image_url", "image_url": { "url": "https://example.com/first_frame.png" }, "role": "first_frame" }
    ],
    "resolution": "2K",
    "duration": 5,
    "aigc_watermark": true
  }'

B. Native Task Query

  • Request Path: /v2/query/video_generation/{task_id}
curl -X GET https://www.tokenpad.ai/v2/query/video_generation/video_task_minimax_001 \
  -H "Authorization: Bearer sk-your_token_here"

4. Complete Parameter Dictionary

ParameterTypeRequiredDefaultDescription & Constraints
modelstringYes-Video model; currently MiniMax-H3 on the V2 channel (refer to the actual listed model name on the platform).
promptstringRequired for OpenAI-compatible-Text prompt. Used when calling via the OpenAI-compatible route.
images / image_urlsarrayNo-Image URLs or {url, role}. Default: 1 → first_frame, 2 → start/end frames, 3+ → reference_image. Roles: first_frame/last_frame/reference_image (type is equivalent). Up to 9 reference images.
videosarrayNo-Reference video URLs or objects; defaults to role=reference_video, up to 3 clips, ~2–15s per clip, total duration ≤15s.
audiosarrayNo-Reference audio; defaults to role=reference_audio, up to 3 clips; cannot be used as the sole reference.
contentarrayRecommended for Native-Multimodal array; takes precedence over flat fields if both are present. Ideal for MiniMax official native route.
resolutionstringYes*-768P or 2K.
durationintegerYes*-Video duration in seconds; options 4–15.
ratiostringConditional-Required and non-adaptive for text-to-video: 21:9/16:9/4:3/1:1/3:4/9:16. Determined by input image for image-to-video (adaptive). Optional for reference-to-video, defaults to adaptive.
watermark / aigc_watermarkbooleanNo-Watermark toggle; both fields are equivalent.
callback_urlstringNo-Task status callback URL.

* Please pass resolution / duration explicitly.


5. Response Example

  • Submit Task Response:
{
  "id": "video_task_minimax_001",
  "task_id": "video_task_minimax_001",
  "status": "pending",
  "message": "Task submitted successfully"
}
  • Query Result Response (Completed):
{
  "id": "video_task_minimax_001",
  "task_id": "video_task_minimax_001",
  "status": "completed",
  "data": [
    {
      "url": "https://example.com/output/minimax_h3.mp4"
    }
  ]
}

5. Common Error Codes & Troubleshooting

HTTP codes, error body format, and troubleshooting are maintained in one dedicated page (not duplicated under each example).

👉 Gateway Error Codes & Troubleshooting

Quick reference:

CodeMeaning
400Invalid parameters / content moderation or copyright block
402Insufficient account balance (not 429)
429RPS/RPM limits or in-flight task cap (low balance)
403Token / IP / model permission (balance → 402; content filter → 400)
200 + status: failedAsync video/long-task business failure on poll

HTTP status matches call log status_code for traceability by log_id.

Maintenance: update the error-codes article only; this appendix links to it.

Raw Markdown (.md) · llms.txt