MuseSpark
MuseSpark
Models & toolsVideo models

MiniMax H3 API guide

MiniMax H3 API: Generate video using text, frame images, or multimodal references with MiniMax H3. First-frame, last-frame, paired-frame, and reference scenarios have different input requirements.

Model overview

Generate video using text, frame images, or multimodal references with MiniMax H3. First-frame, last-frame, paired-frame, and reference scenarios have different input requirements.

API integration

DocumentationValue
API invocation identifierminimax-h3
IntegrationAsync task API

Use this invocation identifier in API requests. Check your authorized model catalog for access. Follow the Quickstart for your first complete call.

Request parameters

Select a mode to highlight its required inputs. Mode selection does not change the API field names.

Studio presets describe the form setup, not guaranteed server defaults. Send preset values explicitly to reproduce them.

promptstringNon-nullRequired

Text prompt describing the video to generate.

Length: minimum 1; maximum 7000.

first_frame_imagestringNon-nullConditional

Required for First Frame, First and Last Frames.

Additional requirements depend on other values. See model rules.

The image to use as the first frame. Use a publicly accessible image URL; inline image data is not supported. Accepted formats: JPG, JPEG, PNG, WebP, HEIC and HEIF. Each image must be no larger than 30 MB, with width and height each between 256 and 5760 pixels and an aspect ratio between 0.4 and 2.5. Do not combine first/last frames with reference images, videos or audio.

Media types: image/*.

last_frame_imagestringNon-nullConditional

Required for First and Last Frames, Last Frame.

Additional requirements depend on other values. See model rules.

The image to use as the last frame. Use a publicly accessible image URL; inline image data is not supported. Accepted formats: JPG, JPEG, PNG, WebP, HEIC and HEIF. Each image must be no larger than 30 MB, with width and height each between 256 and 5760 pixels and an aspect ratio between 0.4 and 2.5. It can be combined with a first-frame image. Do not combine first/last frames with reference images, videos or audio.

Media types: image/*.

image_urlsarray<string>Non-nullConditional

Additional requirements depend on other values. See model rules.

Provide up to 9 reference images. Use a publicly accessible image URL; inline image data is not supported. Accepted formats: JPG, JPEG, PNG, WebP, HEIC and HEIF. Each image must be no larger than 30 MB, with width and height each between 256 and 5760 pixels and an aspect ratio between 0.4 and 2.5. Images here are visual references, not first or last frames. Do not combine first/last frames with reference images, videos or audio.

Item count: maximum 9.

Media types: image/*.

video_urlsarray<string>Non-nullOptional

Provide up to 3 publicly accessible reference video URLs. Each clip must be 2-15 seconds, with no more than 15 seconds of video in total. Use MP4 or MOV with H.264 or H.265 video. Any audio track must use AAC or MP3. Each clip must be no larger than 50 MB, with width and height each between 256 and 5760 pixels, an aspect ratio between 0.4 and 2.5, and a frame rate between 23.976 and 60 fps. Do not combine reference videos with first/last frames.

Item count: maximum 3.

Media types: video/*.

audio_urlsarray<string>Non-nullOptional

Provide up to 3 publicly accessible reference audio URLs in WAV or MP3 format. Each clip must be 2-15 seconds and no larger than 15 MB, with no more than 15 seconds of audio in total. Reference audio requires at least one reference image or video and cannot be combined with first/last frames.

Item count: maximum 3.

Media types: audio/*.

resolutionstringNon-nullOptional

Output video resolution.

Allowed values: "2K", "768P".

Studio preset: "2K".

durationintegerNon-nullOptional

Video duration in seconds. Must be between 4 and 15 seconds.

Value: minimum 4; maximum 15.

Studio preset: 5.

aspect_ratiostringNon-nullOptional

Output aspect ratio or adaptive sizing. Text-to-video defaults to 16:9; reference generation defaults to adaptive; frame images determine frame-generation dimensions.

Allowed values: "21:9", "16:9", "4:3", "1:1", "3:4", "9:16", "adaptive".

batch_sizeintegerNon-nullOptional

Standard quantity control field. The allowed range for this item is 1-4.

Repeats MuseSpark execution within one logical task. This is separate from a model-native output count.

Value: minimum 1; maximum 4.

Studio preset: 1.

nsfw_checkbooleanNon-nullOptional

Run prompt and input-image moderation before submission when enabled.

watermarkbooleanNon-nullOptional

Add a watermark to the generated video.

No parameters match. Clear the search or reset the filters.

Model rules

Input modes

Select a mode by supplying its required public inputs. The mode identifier describes a documentation/form choice; do not send input_mode as a model parameter.

ModeRequired inputs
Text to VideoNo reference media required
First Framefirst_frame_image
First and Last Framesfirst_frame_image, last_frame_image
Last Framelast_frame_image
Reference to VideoNo reference media required
  • When audio_urls is provided and image_urls is omitted and video_urls is omitted, provide image_urls; keep image_urls, when supplied, at least 1 items.
  • When first_frame_image is provided, omit audio_urls; omit image_urls; omit video_urls.
  • When last_frame_image is provided, omit audio_urls; omit image_urls; omit video_urls.
  • When the input mode is Text to Video, omit audio_urls; omit image_urls; omit video_urls; omit last_frame_image; omit first_frame_image.
  • When the input mode is First Frame, omit audio_urls; omit image_urls; omit video_urls.
  • When the input mode is Reference to Video, omit last_frame_image; omit first_frame_image.
  • When the input mode is Reference to Video and image_urls is omitted and video_urls is omitted and audio_urls is omitted, provide image_urls.
  • When the input mode is First Frame, provide first_frame_image; omit audio_urls; omit image_urls; omit video_urls; omit last_frame_image.
  • When the input mode is First and Last Frames, provide first_frame_image, last_frame_image; omit audio_urls; omit image_urls; omit video_urls.
  • When the input mode is Last Frame, provide last_frame_image; omit audio_urls; omit image_urls; omit video_urls; omit first_frame_image.
  • When the input mode is Text to Video, omit last_frame_image; omit first_frame_image.

Parameter meaning

  • Provide a nonempty prompt in every generation mode, including media-conditioned requests.
  • Reference audio must be accompanied by reference imagery or video. Audio alone is not a complete visual-generation input.

Dependencies

  • Reference-media mode and explicit first/last-frame mode are distinct and cannot be mixed.
  • Check video and audio durations separately. Trim reference clips to the permitted range before submission; a valid URL alone does not make an overlong clip valid.

batch_size controls repeated MuseSpark executions. Output grouping, sequential image generation, and video shot count are separate concepts.

Request examples

Replace example media URLs and YOUR_... input identifiers with your own valid resources. Examples are checked against the exported item schema; media access and paid execution are separate runtime checks.

Set MUSESPARK_API_KEY and a stable MUSESPARK_REQUEST_ID before submitting. Preserve the request ID for retries of the same request and use a new ID for new work. Python examples use requests; JavaScript examples use Node.js 20 or later. The standalone Quickstart includes task polling and recovery.

Text to Video

curl --fail-with-body 'https://api.musespark.ai/api/v1/openapi/task' \
  -H "Authorization: Bearer $MUSESPARK_API_KEY" \
  -H "X-Idempotency-Key: $MUSESPARK_REQUEST_ID" \
  -H 'Content-Type: application/json' \
  -d '{
  "item_key": "minimax-h3",
  "parameters": {
    "duration": 5,
    "batch_size": 1,
    "resolution": "2K",
    "prompt": "A paper city under soft morning light"
  }
}'

Parameters used: duration · batch_size · resolution · prompt.

First Frame

curl --fail-with-body 'https://api.musespark.ai/api/v1/openapi/task' \
  -H "Authorization: Bearer $MUSESPARK_API_KEY" \
  -H "X-Idempotency-Key: $MUSESPARK_REQUEST_ID" \
  -H 'Content-Type: application/json' \
  -d '{
  "item_key": "minimax-h3",
  "parameters": {
    "duration": 5,
    "batch_size": 1,
    "resolution": "2K",
    "prompt": "A paper city under soft morning light",
    "first_frame_image": "YOUR_FIRST_FRAME_IMAGE"
  }
}'

Parameters used: duration · batch_size · resolution · prompt · first_frame_image.

First and Last Frames

curl --fail-with-body 'https://api.musespark.ai/api/v1/openapi/task' \
  -H "Authorization: Bearer $MUSESPARK_API_KEY" \
  -H "X-Idempotency-Key: $MUSESPARK_REQUEST_ID" \
  -H 'Content-Type: application/json' \
  -d '{
  "item_key": "minimax-h3",
  "parameters": {
    "duration": 5,
    "batch_size": 1,
    "resolution": "2K",
    "prompt": "A paper city under soft morning light",
    "first_frame_image": "YOUR_FIRST_FRAME_IMAGE",
    "last_frame_image": "YOUR_LAST_FRAME_IMAGE"
  }
}'

Parameters used: duration · batch_size · resolution · prompt · first_frame_image · last_frame_image.

Last Frame

curl --fail-with-body 'https://api.musespark.ai/api/v1/openapi/task' \
  -H "Authorization: Bearer $MUSESPARK_API_KEY" \
  -H "X-Idempotency-Key: $MUSESPARK_REQUEST_ID" \
  -H 'Content-Type: application/json' \
  -d '{
  "item_key": "minimax-h3",
  "parameters": {
    "duration": 5,
    "batch_size": 1,
    "resolution": "2K",
    "prompt": "A paper city under soft morning light",
    "last_frame_image": "YOUR_LAST_FRAME_IMAGE"
  }
}'

Parameters used: duration · batch_size · resolution · prompt · last_frame_image.

Reference to Video

curl --fail-with-body 'https://api.musespark.ai/api/v1/openapi/task' \
  -H "Authorization: Bearer $MUSESPARK_API_KEY" \
  -H "X-Idempotency-Key: $MUSESPARK_REQUEST_ID" \
  -H 'Content-Type: application/json' \
  -d '{
  "item_key": "minimax-h3",
  "parameters": {
    "duration": 5,
    "batch_size": 1,
    "resolution": "2K",
    "prompt": "A paper city under soft morning light",
    "image_urls": [
      "https://example.com/input-1.png"
    ]
  }
}'

Parameters used: duration · batch_size · resolution · prompt · image_urls.

Output

Creation returns a task ID inside data. Poll that task until completion, then save data.result.output_urls and any data.result.batch_results. See the task lifecycle for terminal states, result retention, and errors.

Troubleshooting

For rejected inputs, check the field type, accepted values, and conditional requirements in Request parameters and Model rules. Correct the affected fields before submitting again.

If creation times out, preserve the request identity and any known task ID. Follow Errors, timeouts and retries before submitting again.

The public input snapshot was exported on 2026-11-09. Current prices and availability are listed in the model center.