Minimax H3 Highspeed Reference To Video API Documentation

Minimax H3 Highspeed Reference To Video API Documentation

Playground

Try it on WaveSpeedAI!

MiniMax H3 Highspeed Reference-to-Video generates fast 768P videos from multimodal references with flexible 4-15 second duration, making it suitable for reference-guided character consistency, motion control, creative videos, social content, ads, and production workflows. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

Features

MiniMax H3 Highspeed Reference-to-Video generates videos from multimodal references, including images, video clips, and audio. Use references to guide characters, objects, environments, motion, and sound while generating 4–15 second videos at 768p.


Why Choose This?

  • Multimodal reference support — Guide generation with images, videos, and audio.
  • Multiple visual references — Use up to 9 reference images and 3 reference videos.
  • Optional audio guidance — Add up to 3 audio clips alongside visual references.
  • Flexible duration — Generate videos from 4 to 15 seconds.
  • 768p output — Generate reference-guided videos at 768p.

Parameters

ParameterRequiredDescription
promptYesDescribe the desired scene, action, camera movement, and how the references should be used. Supports 1–7000 characters.
reference_imagesConditionalUp to 9 reference images. At least one image or video reference is required.
reference_videosConditionalUp to 3 reference video clips. Clips are adjusted to 2–15 seconds each and no more than 15 seconds combined.
reference_audiosNoUp to 3 reference audio clips. Each clip must be 2–15 seconds, with a combined duration of up to 15 seconds. Audio cannot be used without an image or video reference.
aspect_ratioNoOutput aspect ratio: 21:9, 16:9, 4:3, 1:1, 3:4, or 9:16. Default: 16:9.
resolutionNoOutput resolution: 768p. Default: 768p.
durationNoOutput video duration in whole seconds from 4 to 15. Default: 5.

At least one reference image or reference video must be provided. Audio-only requests are not supported.


How to Use

  1. Add visual references — Provide at least one reference image or video.
  2. Write a prompt — Describe the desired scene and explain how the references should influence the result.
  3. Add audio optional — Supply reference audio when sound or voice guidance is needed.
  4. Choose duration — Select an output length from 4 to 15 seconds.
  5. Choose framing — Select the desired aspect ratio.
  6. Submit — Generate and retrieve the completed video.

Pricing

ItemPrice
Requested video$0.06/s
Reference video$0.06/s
First 5 reference imagesFree
Each additional reference image$0.03
Reference audioFree

Reference videos are billed with a 2-second minimum per clip and a 15-second combined maximum. Their combined duration is rounded up to the next whole second. The generated video is charged by the requested duration.


Best Use Cases

  • Character consistency — Use reference images to guide recurring people or characters.
  • Product videos — Keep products and visual details consistent across generated scenes.
  • Motion reference — Use video clips to guide movement and action.
  • Audio-guided generation — Add audio references for voice or sound direction.
  • Multi-reference storytelling — Combine several references into a single generated scene.

Pro Tips

  • Clearly explain the role of each reference in the prompt.
  • Use visually consistent references when maintaining a character or product identity.
  • Keep reference videos focused on the motion or action you want to guide.
  • Start with fewer references when testing a new concept.
  • Keep the requested action achievable within the selected output duration.

Notes

  • prompt is required.
  • Supported aspect ratios are 21:9, 16:9, 4:3, 1:1, 3:4, or 9:16. Default: 16:9.
  • At least one reference image or video is required.
  • Audio cannot be supplied alone.
  • Up to 9 reference images are supported.
  • Up to 3 reference videos are supported.
  • Up to 3 reference audio clips are supported.
  • Reference videos longer than the allowed duration are trimmed from the end; short clips are extended to 2 seconds. The combined processed duration is limited to 15 seconds.
  • Reference audio clips must each be 2–15 seconds.
  • Combined reference audio duration is limited to 15 seconds.
  • Use MP4 or MOV reference videos, no larger than 50 MB.
  • Reference audio must be WAV or MP3, no larger than 15 MB per file.

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",
  "aspect_ratio": "16:9",
  "resolution": "768p",
  "duration": 5
}
JSON
)

# 1. Submit the prediction once. Never retry this request automatically:
# a retry after an unclear failure can create a second, billed task.
CHECK='The task may already exist. Check History or the predictions list before submitting again.'
if ! SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
  --connect-timeout 10 --max-time 60 \
  -X POST "https://api.wavespeed.ai/api/v3/minimax/h3-highspeed/reference-to-video" \
  -H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
  -H "Content-Type: application/json" \
  -d "${REQUEST_BODY}"); then
  printf 'Submit failed. %s\n' "${CHECK}" >&2
  exit 1
fi

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. %s\n' "${CHECK}" >&2
  exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"

# 2. Poll until the prediction reaches a final status.
BODY_FILE=$(mktemp)
trap 'rm -f "${BODY_FILE}"' EXIT
while true; do
  # Transient errors (429, 5xx) are retried, honoring Retry-After.
  HTTP_CODE=$(curl --silent --show-error --fail-with-body \
    --connect-timeout 10 --max-time 60 --retry 5 --retry-delay 2 \
    --output "${BODY_FILE}" --write-out '%{http_code}' \
    "${RESULT_URL}" \
    -H "Authorization: Bearer ${WAVESPEED_API_KEY}" || true)
  case "${HTTP_CODE}" in
    2??) ;;
    000|429|5??)  # dropped connection or temporary error: keep polling
      printf 'Task %s: HTTP %s, polling again in 10s\n' "${PREDICTION_ID}" "${HTTP_CODE}" >&2
      sleep 10; continue ;;
    *) printf 'Task %s: HTTP %s\n' "${PREDICTION_ID}" "${HTTP_CODE}" >&2
      cat "${BODY_FILE}" >&2; exit 1 ;;
  esac
  RESULT=$(jq 'if type == "object" and has("data") then .data else . end' "${BODY_FILE}")
  STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')

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

Retry temporary errors only while polling, never the submit request. Errors, retries and timeouts

Parameters

Task Submission Parameters

Request Parameters

ParameterTypeRequiredDefaultRangeDescription
promptstringYes1 ~ 7000 charactersText description of the desired video scene and interactions.
reference_imagesarray<string>No-0 ~ 9 itemsUp to 9 reference image URLs. At least one reference image or video is required. Images must be 256-5760 pixels per side, with a width-to-height ratio of 0.4-2.5.
reference_videosarray<string>No-0 ~ 3 itemsUp to 3 reference video URLs. Clips are adjusted to 2-15 seconds each, with a combined maximum of 15 seconds; longer clips are trimmed and shorter clips are extended. Use MP4 or MOV, up to 50 MB per file, 256-5760 pixels per side, width-to-height ratio 0.4-2.5, and 23.976-60 FPS. At least one image or video is required.
reference_audiosarray<string>No-0 ~ 3 itemsUp to 3 optional WAV or MP3 reference audio URLs, up to 15 MB per file. Each clip must be 2-15 seconds, with a combined maximum of 15 seconds. Audio is not automatically trimmed and cannot be provided alone.
aspect_ratiostringNo16:921:9, 16:9, 4:3, 1:1, 3:4, 9:16Output aspect ratio.
resolutionstringNo768p768pOutput video resolution.
durationintegerNo54, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15Output video duration in seconds.

Every model also accepts the global request options enable_sync_mode and enable_base64_output; see their pages for details.

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.