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
Usegenerate_audioto 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
| Parameter | Required | Description |
|---|---|---|
| prompt | Yes | Describe the edit you want applied to the input video. |
| video | Yes | 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_images | No | Optional reference image URLs to guide the edit, such as subject identity, visual style, objects, or scene details. Supports up to 9 images. |
| reference_audios | No | Optional reference audio URLs to guide audio generation. Refer to them in the prompt as <Audio 1>..<Audio 3>. Supports up to 3 audio references. |
| resolution | No | Output 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_ratio | No | Output 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. |
| duration | No | Output video duration in seconds. Options: 3 to 15. If not specified, duration is auto-detected from the input video. |
| generate_audio | No | 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. Default: true. |
| seed | No | Random seed for generation. A negative value means a random seed will be used. |
How to Use
- Write your edit prompt — Describe what should change in the input video, such as lighting, style, environment, subject details, or specific elements.
- Upload the input video — Provide the source video that should guide subject identity, composition, and motion.
- Add reference images optional — Use
reference_imageswhen identity, object, style, or scene consistency matters. - Add reference audio optional — Use
reference_audioswhen native audio generation should follow a specific sound direction. - Choose resolution — Use
480pfor faster, lower-cost editing,540pfor a mid-price step up,768pfor the native canvas, or1080pfor full-HD output. - Set aspect ratio optional — Select an aspect ratio, or leave it empty to adapt to the input video.
- Set duration optional — Choose a duration from
3to15seconds, or leave it empty to follow the input video duration. - Configure audio — Keep
generate_audioenabled for native audio generation, or disable it to preserve the input video’s audio track. - Set seed optional — Use a fixed seed for reproducible results, or a negative value for random generation.
- 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.
| Resolution | Per counted second | 5s in + 5s out | 10s in + 10s out | 15s 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
| Configuration | Calculation | Cost |
|---|---|---|
| 5s input, default output, 480p | 10 × $0.05 | $0.50 |
| 5s input + 5s output at 540p + 2 reference images | 10 × $0.075 + 2 × $0.02 | $0.79 |
| 8s input + 4s output at 768p + 1 reference audio | 12 × $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 at540pfor a sharper preview at 1.5x the price. - Native-canvas output — Use
768pwhen higher-resolution output is needed, or1080pfor 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_audiois enabled. - Set
generate_audiotofalsewhen you want to preserve the input video’s original audio. - Leave
aspect_ratioempty when the output should follow the input video’s format. - Use
480pfor quick testing,540pfor a step up, and768por1080pfor higher-quality output. - Use a fixed
seedwhen comparing prompt or reference changes.
Notes
promptandvideoare required.reference_imagessupports up to9images.reference_audiossupports up to3audio references.durationsupports values from3to15seconds.- If
durationis not specified, the output duration is auto-detected from the input video. - When
generate_audioisfalse, the input video’s audio track is preserved. - Reference images and reference audios add separate per-item charges.
Related Models
- MiniMax H3 Text-to-Video Open Weights — Generate video with native stereo audio directly from a text prompt.
- MiniMax H3 Image-to-Video Open Weights — Animate a first-frame image with prompt-guided motion and audio.
- MiniMax H3 Reference-to-Video Open Weights — Generate video from image, video, or audio references with prompt guidance.
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
doneParameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| prompt | string | Yes | - | Describe the edit you want applied to the input video - change lighting, weather, style, environment, or specific elements. | |
| video | string | Yes | - | 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_images | array<string> | No | - | 0 ~ 9 items | Optional reference image URLs to guide the edit (subject identity, style, etc.). Refer to them in the prompt as <Picture 1>..<Picture 9>. |
| reference_audios | array<string> | No | - | 0 ~ 3 items | Optional reference audio URLs to guide audio generation. Refer to them in the prompt as <Audio 1>..<Audio 3>. |
| resolution | string | No | 480p | 480p, 540p, 768p, 1080p | Output 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_ratio | string | No | - | 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, 9:21 | Aspect ratio of the output video. Adapts to the input video if not specified. |
| duration | integer | No | - | 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 | Output video duration in seconds. Auto-detected from the input video if not specified. |
| generate_audio | boolean | No | true | - | 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. |
| seed | integer | No | - | - | The random seed to use for the generation. A negative value means a random seed will be used. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Output values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Task status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses. |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction |
| data.model | string | Model ID used for the prediction |
| data.outputs | array<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.urls | object | Object containing related API endpoints |
| data.status | string | Status: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses |
| data.created_at | string | ISO timestamp of when the request was created |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |