GLM-5.2 is live — Z.AI's flagship with a 1M-token lossless contextfrom $0.900 per 1M tokens
rreAPI Docs

minimax-h3

MiniMax H3 (Hailuo 03) — one async video endpoint that auto-routes text-to-video, image-to-video, and reference-to-video (images + videos + audio) by request shape. 2K output with native stereo audio.

MiniMax H3 (also released as Hailuo 03) — a single async video endpoint that auto-routes between T2V / I2V / R2V based on which media fields your request carries. Up to 2K output with native stereo audio, 4–15 second clips. See current pricing on the model page.

Generation is asynchronous: the POST returns a task id, then poll GET /api/v1/tasks/{id} until status is completed.

Quick example

curl https://reapi.ai/api/v1/videos/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-h3",
    "prompt": "A cat walking slowly on the beach at sunset, cinematic shot, waves gently lapping the shore",
    "aspect_ratio": "16:9",
    "duration": 6
  }'
import requests

resp = requests.post(
    "https://reapi.ai/api/v1/videos/generations",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "model": "minimax-h3",
        "prompt": "A cat walking slowly on the beach at sunset, cinematic shot",
        "aspect_ratio": "16:9",
        "duration": 6,
    },
    timeout=30,
)
print(resp.json())
const r = await fetch("https://reapi.ai/api/v1/videos/generations", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "minimax-h3",
    prompt: "A cat walking slowly on the beach at sunset, cinematic shot",
    aspect_ratio: "16:9",
    duration: 6,
  }),
});
console.log(await r.json());
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
)

func main() {
	body, _ := json.Marshal(map[string]any{
		"model":        "minimax-h3",
		"prompt":       "A cat walking slowly on the beach at sunset, cinematic shot",
		"aspect_ratio": "16:9",
		"duration":     6,
	})
	req, _ := http.NewRequest("POST",
		"https://reapi.ai/api/v1/videos/generations", bytes.NewReader(body))
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	req.Header.Set("Content-Type", "application/json")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
	var out map[string]any
	json.NewDecoder(resp.Body).Decode(&out)
	fmt.Println(out)
}

Endpoint

POST /api/v1/videos/generations
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Submitting returns a task id; poll GET /api/v1/tasks/{id} for the result. Polling does not consume credits.

Parameters

ParameterTypeRequiredDefaultDescription
modelstringyesminimax-h3
promptstringyes1–7,000 characters. Describe visuals and audio (dialogue, music, ambience, SFX) in the same prompt.
first_frame_urlstringI2V*First-frame image URL. Presence selects image-to-video. JPG/JPEG/PNG/WEBP/HEIC/HEIF, ≤30MB, sides 256–5760px, ratio 0.4–2.5.
last_frame_urlstringI2V*Last-frame image URL. Same limits as first_frame_url.
reference_image_urlsstring[]R2V**Up to 9 reference image URLs. Presence selects reference-to-video. Same image limits as above. First 5 are free; images 6–9 bill per image.
reference_video_urlsstring[]R2V**Up to 3 reference video URLs. MP4/MOV (H.264/H.265; AAC/MP3 audio), ≤50MB each, each clip 2–15s, all clips together ≤15s, sides 256–5760px, ratio 0.4–2.5, 23.976–60 fps. Their probed duration bills on top of the output duration.
reference_audio_urlsstring[]noUp to 3 reference audio URLs. WAV/MP3, ≤15MB each, each 2–15s, total ≤15s. Free. Cannot be used alone — requires an image or video reference.
aspect_ratioenumT2V: yesR2V: adaptive21:9 16:9 4:3 1:1 3:4 9:16 (+ adaptive, reference mode only). Required in T2V (adaptive rejected); not accepted in I2V (orientation derives from the source image).
durationintegerno6Output length in whole seconds, 415.

* In I2V, provide first_frame_url, last_frame_url, or both. ** In R2V, provide reference_image_urls or reference_video_urls (audio alone is not accepted).

Frames (first_frame_url / last_frame_url) and reference inputs (reference_*_urls) are mutually exclusive. All media inputs must be public HTTP(S) URLs — base64 / data: URIs are rejected.

Modes

Mode is implicit — selected by which inputs you send:

ModeTriggerpromptaspect_ratio
Text-to-video (T2V)no mediarequiredrequired, no adaptive
Image-to-video (I2V)first_frame_url / last_frame_urlrequirednot accepted (from image)
Reference-to-video (R2V)reference_*_urlsrequiredoptional, default adaptive
// I2V — animate between two frames
{ "model": "minimax-h3", "prompt": "the character turns and smiles, camera pushes in", "first_frame_url": "https://…/first.jpg", "last_frame_url": "https://…/last.jpg", "duration": 6 }

// R2V — identity from images, motion from a clip, voice from audio
{ "model": "minimax-h3", "prompt": "a continuous cinematic scene using the referenced character, motion, and voice", "reference_image_urls": ["https://…/id.jpg"], "reference_video_urls": ["https://…/motion.mp4"], "reference_audio_urls": ["https://…/voice.mp3"], "duration": 8 }

Pricing

Billed per second at one flat 2K rate; the routing mode does not change the rate. Three components:

  • Output seconds — the requested duration.
  • Input video seconds — the server-probed total duration of reference_video_urls is added to the billable seconds (the vendor processes input and output footage alike).
  • Extra reference images — the first 5 are free; images 6–9 bill a flat per-image rate. Audio input is free.

See the model page for current rates.

Bill formula (1 credit = $0.001):

credits = ceil((per_second_usd × (duration + input_video_seconds)
        + extra_image_usd × max(0, reference_images − 5)) × 1000)

If a reference video URL cannot be probed for duration, the request is rejected before any charge — billing never falls back to client-stated values.

Output

On success, GET /api/v1/tasks/{id} returns:

{
  "id": "task_…",
  "model": "minimax-h3",
  "status": "completed",
  "output": { "video_urls": ["https://cdn.reapi.ai/media/tasks/…/0.mp4"] },
  "error": null
}

The clip includes its native stereo audio track in the MP4.

Errors

HTTPcodeWhen
40020002Missing / invalid parameter (e.g. aspect_ratio missing in T2V, frames mixed with references, audio reference used alone)
40030002Pricing unavailable (e.g. a reference video's duration could not be probed)
4011000110005Auth missing / invalid / revoked
40230001Insufficient credits
42950001Per-user rate limit exceeded

Failed generations are surfaced under error in the polling response and are refunded automatically. Full catalog: Errors.

Tips

  • Direct the audio in the prompt. MiniMax H3 renders sound with the picture — describe dialogue lines, music mood, ambience, and effect cues alongside the visual action for the tightest sync.
  • Assign roles to references. In R2V, say what each asset controls (identity, motion, camera language, voice); it reduces conflicts between reference materials.
  • Watch reference-video length. Input clips bill their own seconds on top of the output — a 12s reference plus a 10s output bills as 22s.
  • aspect_ratio is rejected in I2V — crop your frames to the orientation you want instead.
  • Longer duration scales the bill linearly; start at the 6s default while iterating.
  • Tasks — universal polling endpoint
  • Errors — full error catalog
  • seedance-2-0 — sibling multimodal video family
  • veo3-1 — premium video generation with optional audio

Table of Contents