von MiniMax
MiniMax H3 Highspeed (Hailuo) video generation, faster and cheaper than H3: text-to-video, first/last-frame, and up to 9 reference images. 4–15 second clips at 480P or 768P. Billed per second of output at its resolution; reference images beyond five are charged per image.
ab $0.04
pro generierter Sekunde
480p · 768p
Abrechnungsstufen – nicht die Größe, die Sie senden
Async-API — Die Videogenerierung verwendet einen asynchronen Ablauf: Reichen Sie einen Auftrag ein, fragen Sie ab, bis er abgeschlossen ist, und laden Sie die Datei dann von einem separaten Endpunkt herunter. Die Generierung dauert Minuten, fragen Sie also alle 3–5 Sekunden ab. Die folgenden Beispiele zeigen alle drei Schritte.
# 1. Submit the job. model, prompt and seconds are required. Each account may hold only a small number of
# unfinished jobs at once — 5 by default, set per deployment — and one over that returns 429
# video_jobs_in_flight_limit.
#
# The model's own options go under "metadata"; every field and the values it accepts are listed below.
# Images go in metadata.content as {type: image_url, image_url: {url}, role}, each a URL or a base64 data: URI.
# No image is text-to-video, a first_frame is image-to-video, first_frame + last_frame is first/last-frame, and
# 1–9 reference_image items are reference-to-video (not combined with frames). Every request needs a prompt. An
# image-led clip follows its image's aspect ratio (a ratio sent with it is ignored); text-to-video takes one of
# 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 (16:9 when none is sent), and reference images also take adaptive (what they
# get when no ratio is sent).
curl "https://router-api.0g.ai/v1/videos" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-d '{
"model": "minimax-video-h3-highspeed",
"prompt": "A cat surfing a wave at sunset",
"seconds": 5,
"metadata": {
"resolution": "768P",
"ratio": "16:9",
"aigc_watermark": false
}
}'
# Response: {"id": "v0_426354818031858", "status": "queued", "provider_address": "0x..."}
# 2. Poll until status is "completed". Generation takes minutes — 3-5s is a sane interval. The poll answers
# 200 and reports the job's own status, so a failure arrives as 200 + {"status":"failed"}, NOT as an error
# code. The SUBMIT response echoes what you sent; the POLL response reports what was actually rendered — so
# reconcile against the poll. Which fields carry that answer depends on the upstream:
# usage.output_video_duration when the provider reported a duration, size/seconds on some providers and not
# others. Read what is present rather than assuming a particular field.
curl "https://router-api.0g.ai/v1/videos/<VIDEO_ID>" \
-H "Authorization: Bearer <YOUR_API_KEY>"
# 3. Download the finished file. This is where 409 / 424 / 429 live: 409 = not ready yet, 429 = too many
# concurrent downloads (both retryable), 424 = the job failed and has no output (terminal).
curl "https://router-api.0g.ai/v1/videos/<VIDEO_ID>/content" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-o video.mp4
| Eingabe | Rolle | Typ | Max. | Szenario |
|---|---|---|---|---|
| Erstes Frame | first_frame | Bild | 1 | Erstes / letztes Frame |
| Letztes FrameErfordert Erstes Frame | last_frame | Bild | 1 | Erstes / letztes Frame |
| Referenzbild | reference_image | Bild | 9 | Multimodale Referenz |
Images go in metadata.content as {type: image_url, image_url: {url}, role}, each a URL or a base64 data: URI. No image is text-to-video, a first_frame is image-to-video, first_frame + last_frame is first/last-frame, and 1–9 reference_image items are reference-to-video (not combined with frames). Every request needs a prompt. An image-led clip follows its image's aspect ratio (a ratio sent with it is ignored); text-to-video takes one of 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 (16:9 when none is sent), and reference images also take adaptive (what they get when no ratio is sent).
| Feld | Werte | Standard |
|---|---|---|
| metadata.resolution | 480P · 768P | 768P |
| metadata.ratio | adaptive · 21:9 · 16:9 · 4:3 · 1:1 · 3:4 · 9:16 | 16:9 |
| seconds | 4–15s | 5 |
| metadata.aigc_watermark | true · false | false |
Billed on the tokens the vendor meters for the clip, $1.6 per 1M; the per-second prices are that rate at each resolution. Reference images beyond five add $0.03 each.
Anbieter-Routing
Steuern Sie, welcher Anbieter Ihre Anfrage bearbeitet, mit den X-0G-Provider-*-Anfrage-Headern.
X-0G-Provider-Address legt einen Anbieter fest; X-0G-Provider-Identity legt fest, welcher seiner vorgelagerten Dienste für das Routing verwendet wird – beide Werte stammen aus den Feldern address und provider_identity von GET /v1/providers. Zusammen adressieren sie einen bestimmten vorgelagerten Dienst eines Anbieters. Werden beide nicht gesendet, wählt der Router genau wie zuvor anhand von Preis und Zustand aus.
curl "https://router-api.0g.ai/v1/videos" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-H "X-0G-Provider-Address: <PROVIDER_ADDRESS>" \
-H "X-0G-Provider-Identity: <UPSTREAM>" \
-H "X-0G-Provider-Sort: latency" \
-H "X-0G-Provider-Allow-Fallbacks: true" \
-d '{
"model": "minimax-video-h3-highspeed",
"prompt": "A cat surfing a wave at sunset",
"seconds": 6
}'