MiniMax H3 (Reference-to-Video)

Turns your images and audio into a 5 or 10 second video with matching stereo sound, guided by a text prompt.

MiniMax H3 (ref2va) makes a short video with stereo sound from your own references: up to 9 images and 3 audio files, in the order you give them, plus a prompt that describes the scene.

Good for talking or singing characters from a photo and a voice track, product shots that move to a jingle, and short scenes built from a few stills.

Inputs: prompt (up to 16000 characters), conditions (1 to 12 references), duration_seconds (5 or 10, 10 by default), aspect_ratio (16:9, 9:16, 1:1, 4:3, 3:4 or 21:9) and seed. The result is an MP4 with H.264 video at 24 fps and AAC audio; at 16:9 the frame is 1344x768.

Runs on a dedicated B200 GPU. The first request after a quiet period waits for the GPU to start, usually several minutes; requests that follow are faster. There is no streaming, and it does not edit an existing video.

Price: $0.45 per second of video: $2.25 for 5 seconds, $4.50 for 10 seconds.

Price: $4.50 for a 10-second video.

Run MiniMax H3 (Reference-to-Video) via API

MiniMax H3 (Reference-to-Video) is a native model: it runs through the native operations API, not the predict route. Read the current contract revision, create one operation under your own Idempotency-Key, then read that operation until it finishes. The account of the API key pays.

References are your own uploaded files: 1 to 12 in order, up to 9 images and 3 audio files. A video is 5 or 10 seconds long. A video costs from $2.25 to $4.50, depending on its duration.

API="https://backend.flymy.ai/api/v1"
# Your own reference image. Its name starts with its digest, so no other file of yours changes.
NAME="model-references/$( (sha256sum reference.jpg 2>/dev/null || shasum -a 256 reference.jpg) | cut -c1-16)-reference.jpg"
ARTIFACT=$(curl -s "$API/agents/files/" -H "X-API-KEY: $FLYMYAI_API_KEY" \
  -F "file=@reference.jpg" -F "name=$NAME" | jq -c '.artifact')
# The model's current contract revision.
REVISION=$(curl -s "$API/model-proxy/catalog/?endpoint_id=flymyai/minimax-h3-ref2va" \
  -H "X-API-KEY: $FLYMYAI_API_KEY" | jq -r '.items[0].contract_revision')
jq -n --arg revision "$REVISION" --argjson artifact "$ARTIFACT" \
  '{contract_revision: $revision, inputs: {prompt: "The person from the reference waves at the camera", conditions: [{type: "image", artifact: $artifact}], duration_seconds: 5}}' > request.json
# One key per request. After a lost response send the same key again: the model never runs twice.
OPERATION_KEY=$(uuidgen)
OPERATION_ID=$(curl -s "$API/model-proxy/operations/" \
  -H "X-API-KEY: $FLYMYAI_API_KEY" \
  -H "Idempotency-Key: $OPERATION_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @request.json | jq -r '.operation.operation_id')
# Read it until its status is succeeded or failed. Waiting for capacity is not an error: do not send it again.
curl -s "$API/model-proxy/operations/$OPERATION_ID/" -H "X-API-KEY: $FLYMYAI_API_KEY"

The example needs curl and jq. Native model API guide

API documentation · Create a free account · Pricing

Related models