Minimax H3 Video Edit API Documentation

Minimax H3 Video Edit API Documentation

Playground

Try it on WaveSpeedAI!

MiniMax H3 Open Weights Video-Edit edits an input video from a natural-language prompt. The input video drives subject identity, composition, and motion while the model rewrites lighting, style, weather, environment, or specific elements as instructed, with native stereo audio generated in the same pass. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

Features

MiniMax H3 Video Edit Open Weights edits an input video with prompt instructions while using the source video as the visual and motion foundation. You can guide the edit with optional reference images or reference audio, choose 480p, 540p, 768p, or 1080p, and decide whether to generate native audio or preserve the original input audio.


Why Choose This?

  • Prompt-guided video editing
    Edit an existing video using natural-language instructions.

  • Source-video continuity
    Use the input video to preserve subject identity, composition, and motion while applying visual changes.

  • Reference image support
    Add reference images to guide subject identity, style, objects, or scene details.

  • Reference audio support
    Add reference audio to guide native audio generation.

  • Native audio or preserved audio
    Use generate_audio to generate native audio, or disable it to preserve the input video’s audio track.

  • Flexible output settings
    Choose output duration, aspect ratio, resolution, and seed for controlled generation.


Parameters

ParameterRequiredDescription
promptYesDescribe the edit you want applied to the input video.
videoYesURL of the input video to edit. It drives subject identity, composition, and motion while the prompt rewrites lighting, style, environment, or specific elements.
reference_imagesNoOptional reference image URLs to guide the edit, such as subject identity, visual style, objects, or scene details. Supports up to 9 images.
reference_audiosNoOptional reference audio URLs to guide audio generation. Refer to them in the prompt as <Audio 1>..<Audio 3>. Supports up to 3 audio references.
resolutionNoOutput video resolution: 480p, 540p, 768p, or 1080p. 768p is the model’s native canvas; 480p is a faster, lower-cost tier; 540p is a mid tier at 1.5x the 480p price; 1080p is the highest-quality full-HD tier. Default: 480p.
aspect_ratioNoOutput aspect ratio: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, or 9:21. If not specified, the output adapts to the input video.
durationNoOutput video duration in seconds. Options: 3 to 15. If not specified, duration is auto-detected from the input video.
generate_audioNoWhether to generate native audio for the edited output. When set to false, the input video’s audio track is preserved on the output instead. Default: true.
seedNoRandom seed for generation. A negative value means a random seed will be used.

How to Use

  1. Write your edit prompt — Describe what should change in the input video, such as lighting, style, environment, subject details, or specific elements.
  2. Upload the input video — Provide the source video that should guide subject identity, composition, and motion.
  3. Add reference images optional — Use reference_images when identity, object, style, or scene consistency matters.
  4. Add reference audio optional — Use reference_audios when native audio generation should follow a specific sound direction.
  5. Choose resolution — Use 480p for faster, lower-cost editing, 540p for a mid-price step up, 768p for the native canvas, or 1080p for full-HD output.
  6. Set aspect ratio optional — Select an aspect ratio, or leave it empty to adapt to the input video.
  7. Set duration optional — Choose a duration from 3 to 15 seconds, or leave it empty to follow the input video duration.
  8. Configure audio — Keep generate_audio enabled for native audio generation, or disable it to preserve the input video’s audio track.
  9. Set seed optional — Use a fixed seed for reproducible results, or a negative value for random generation.
  10. Submit — Generate the edited video output.

Pricing

Cost = per-second rate × counted seconds + $0.02 per reference image or reference audio.

Counted seconds = input video duration (rounded up, capped at 15s) + output duration (capped at 15s). When duration is not set, the output matches the input duration (minimum 3s), so a 5s input bills 10 counted seconds.

ResolutionPer counted second5s in + 5s out10s in + 10s out15s in + 15s out
480p$0.05$0.50$1.00$1.50
540p$0.075$0.75$1.50$2.25
768p$0.125$1.25$2.50$3.75
1080p$0.25$2.50$5.00$7.50

Add-ons: reference image $0.02 each, reference audio $0.02 each. aspect_ratio, generate_audio, prompt, and seed do not add separate charges.

Worked Examples

ConfigurationCalculationCost
5s input, default output, 480p10 × $0.05$0.50
5s input + 5s output at 540p + 2 reference images10 × $0.075 + 2 × $0.02$0.79
8s input + 4s output at 768p + 1 reference audio12 × $0.125 + $0.02$1.52
20s input + 10s output at 1080p(15 + 10) × $0.25$6.25

Best Use Cases

  • Prompt-guided video edits — Apply text-based changes to an existing video.
  • Style and lighting changes — Restyle a clip while preserving its motion and composition.
  • Subject and object refinement — Use reference images to guide identity, objects, wardrobe, product details, or visual style.
  • Audio-aware edits — Use reference audio when the generated native audio needs a specific direction.
  • Creative prototyping — Test edit directions quickly at 480p, or at 540p for a sharper preview at 1.5x the price.
  • Native-canvas output — Use 768p when higher-resolution output is needed, or 1080p for full HD.

Pro Tips

  • Describe what should change and what should remain consistent.
  • Keep the edit instruction focused on a clear visual transformation.
  • Use reference images when identity, product details, or style consistency matters.
  • Use reference audio only when generate_audio is enabled.
  • Set generate_audio to false when you want to preserve the input video’s original audio.
  • Leave aspect_ratio empty when the output should follow the input video’s format.
  • Use 480p for quick testing, 540p for a step up, and 768p or 1080p for higher-quality output.
  • Use a fixed seed when comparing prompt or reference changes.

Notes

  • prompt and video are required.
  • reference_images supports up to 9 images.
  • reference_audios supports up to 3 audio references.
  • duration supports values from 3 to 15 seconds.
  • If duration is not specified, the output duration is auto-detected from the input video.
  • When generate_audio is false, the input video’s audio track is preserved.
  • Reference images and reference audios add separate per-item charges.

Authentication

For authentication details, please refer to the Authentication Guide.

API Endpoints

Submit Task & Query Result

set -euo pipefail

export WAVESPEED_API_KEY="your-api-key"

REQUEST_BODY=$(cat <<'JSON'
{
  "prompt": "A cinematic ocean wave at sunrise, highly detailed",
  "video": "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4",
  "resolution": "480p",
  "aspect_ratio": "16:9",
  "duration": 3,
  "generate_audio": true
}
JSON
)

# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
  -X POST "https://api.wavespeed.ai/api/v3/wavespeed-ai/minimax-h3/video-edit" \
  -H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
  -H "Content-Type: application/json" \
  -d "${REQUEST_BODY}")

TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
  printf 'Submission response did not contain a prediction id
' >&2
  exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"

# 2. Poll until the prediction finishes.
while true; do
  RESPONSE=$(curl --silent --show-error --fail-with-body \
    "${RESULT_URL}" \
    -H "Authorization: Bearer ${WAVESPEED_API_KEY}")
  RESULT=$(printf '%s' "${RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
  STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')

  case "${STATUS}" in
    completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
    failed|cancelled|timeout|deleted) printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
    *) sleep 2 ;;
  esac
done

Parameters

Task Submission Parameters

Request Parameters

ParameterTypeRequiredDefaultRangeDescription
promptstringYes-Describe the edit you want applied to the input video - change lighting, weather, style, environment, or specific elements.
videostringYes-URL of the input video to edit. It drives subject identity, composition, and motion while the prompt rewrites lighting, style, environment, or specific elements.
reference_imagesarray<string>No-0 ~ 9 itemsOptional reference image URLs to guide the edit (subject identity, style, etc.). Refer to them in the prompt as <Picture 1>..<Picture 9>.
reference_audiosarray<string>No-0 ~ 3 itemsOptional reference audio URLs to guide audio generation. Refer to them in the prompt as <Audio 1>..<Audio 3>.
resolutionstringNo480p480p, 540p, 768p, 1080pOutput video resolution. 768p is the model's native canvas; 480p is a faster, lower-cost tier; 540p is a mid tier at 1.5x the 480p price. 1080p is the highest-quality full-HD tier at 2x the 768p price (generation takes longer).
aspect_ratiostringNo-16:9, 9:16, 1:1, 4:3, 3:4, 21:9, 9:21Aspect ratio of the output video. Adapts to the input video if not specified.
durationintegerNo-3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15Output video duration in seconds. Auto-detected from the input video if not specified.
generate_audiobooleanNotrue-Whether to generate native audio for the edited output. When set to false, the input video's audio track is preserved on the output instead.
seedintegerNo--The random seed to use for the generation. A negative value means a random seed will be used.

Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
data.idstringUnique identifier for the prediction, Task Id
data.modelstringModel ID used for the prediction
data.outputsarrayOutput values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed)
data.urlsobjectObject containing related API endpoints
data.statusstringTask status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses.
data.created_atstringISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”)
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds

Result Request Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Task ID

Result Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
dataobjectThe prediction data object containing all details
data.idstringUnique identifier for the prediction
data.modelstringModel ID used for the prediction
data.outputsarray<string | object>Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model.
data.urlsobjectObject containing related API endpoints
data.statusstringStatus: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses
data.created_atstringISO timestamp of when the request was created
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds
© 2026 WaveSpeedAI. All rights reserved.