Video Series
MiniMax H3 API
- One model for three modes: text-to-video with only
prompt; first/last-frame video withfirst_image_urland an optionallast_image_url; or video from reference images, videos and audio. Frames and references cannot be mixed in one request. - Videos of 4 to 15 seconds at 480p, 768p or 2K, 24 fps.
- Every video comes with a stereo soundtrack generated with the picture; there is no switch to turn sound off. Describe the sound you want in the prompt.
- This is MiniMax H3, also called Hailuo 03. MiniMax H3 Max and video editing (Video Regeneration) are not offered through this API.
- Asynchronous:
POST /v1/videosreturns a task id; pollGET /v1/videos/{id}orGET /v1/tasks/{id}until the task completes, then download/v1/videos/{id}/content. - Result links are APIKO-signed and kept for 24 hours; download anything you need to keep.
- Billing
- Charged per second at the price of the chosen
resolution; prices are on the model page. - Without reference videos, billed seconds = output duration.
- With reference videos, billed seconds = output duration + the total length of the reference videos, at the same per-second price. Submission holds output + 15 seconds; the difference is refunded when the task settles.
- The first five input images of a task (frames included) are free; each image after that is billed once at the per-image price on the model page. Reference audio is not billed.
- A task that fails is refunded in full.
- Charged per second at the price of the chosen
POST
Authorizations
All requests use Bearer authentication:
Authorization: Bearer <API_KEY>.Create a key in Console → API Keys.
Routes
string
POST /v1/videos— create a video taskGET /v1/videos/{id}— query the task and readvideo_urlGET /v1/tasks/{id}— query the same task in the shared task format
Body
application/json
model
stringdefault:minimax-h3required
Use this exact public model id.
Available options:
minimax-h3Example:
"minimax-h3"prompt
stringrequired
Video description, at most 7,000 characters.
- Up to 10,000 characters. Describe the subject, the action, the camera movement and the sound.
- Refer to references in list order; MiniMax's H3 prompt guide labels them
<Picture 1>,<Video 1>and<Audio 1>.
Minimum length:
1Maximum length:
7000Example:
"A paper boat drifting across a calm lake at sunrise"aspect_ratio
enum<string>
Defaults to adaptive with an image or video input, else 16:9; adaptive needs an image or video input.
adaptive follows the input image or video and needs one: without any, it is rejected before any charge.Available options:
adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16Example:
"adaptive"resolution
enum<string>default:768p
Output resolution of the video. Values are matched case-insensitively.
768pis the default (a 16:9 clip is 1344×768);2kis 2560×1440 at 16:9.480p(832×480 at 16:9) is the cheapest, a draft tier APIKO adds: MiniMax itself lists only 768P and 2K.- Each resolution has its own per-second price; see the model page.
Available options:
480p, 768p, 2kExample:
"768p"duration
integerdefault:5
- Length of the output video in seconds: any integer from 4 to 15; 5 when omitted.
seconds(a string such as"10", as in the OpenAI video API) is accepted as an alias; send one of the two.
Range:
4 ≤ x ≤ 15Example:
5first_image_url
string<uri>
First frame; cannot be combined with reference media.
- Used as the first frame of the video.
- Public HTTPS URLs only; files and base64 are not accepted.
Example:
"https://example.com/first-frame.png"last_image_url
string<uri>
Last frame; requires first_image_url.
- Used as the last frame of the video.
- Public HTTPS URLs only; files and base64 are not accepted.
Requires
first_image_url.Example:
"https://example.com/last-frame.png"reference_image_urls
string<uri>[]
Reference image HTTPS URLs; images past the fifth are billed.
- Up to 9 images: characters, products, scenes or a target frame.
- Cannot be combined with
first_image_urlorlast_image_url. - Public HTTPS URLs only; files and base64 are not accepted.
Items:
1–9Example:
["https://example.com/reference.png"]reference_videos
string<uri>[]
Reference video HTTPS URLs, 15 seconds in total; their seconds are billed at the output rate.
- Up to 3 clips, 15 seconds in total, for motion, camera work or the structure of a source video.
- Cannot be combined with
first_image_urlorlast_image_url. - Public HTTPS URLs only; files and base64 are not accepted.
Items:
1–3Example:
["https://example.com/reference.mp4"]reference_audios
string<uri>[]
Reference audio HTTPS URLs, 15 seconds in total.
- Up to 3 clips, 15 seconds in total, for the sound, voice or music the video should follow. Not billed.
- Cannot be combined with
first_image_urlorlast_image_url. - Public HTTPS URLs only; files and base64 are not accepted.
Items:
1–3Example:
["https://example.com/reference.mp3"]callback_url
string<uri>
Optional public HTTPS URL notified when the task finishes.
- When the task finishes, APIKO POSTs the same JSON as
GET /v1/tasks/{id}with headerX-Apiko-Task-Id, retrying up to 3 times. - Callbacks are not signed: re-fetch the task to confirm the result.
Example:
"https://your-domain.com/webhooks/apiko-task"Response
200 - application/json
Charged when the request is accepted; a task that ends in failed is refunded in full.
id
string
Video task id. Query it with
GET /v1/videos/{id} or GET /v1/tasks/{id}.Example:
"task_abc123"status
enum<string>
Task status. Poll every 5–10 seconds until it is
completed or failed.Available options:
queued, in_progress, completed, failedprogress
integer
Progress from
0 to 100.video_url
string<uri>
Present on
GET /v1/videos/{id} when the task is completed: an APIKO-signed link kept for 24 hours. GET /v1/tasks/{id} returns the same link as data[0].url.Errors
application/json
Errors use the shape { "error": { "message", "type", "param", "code" } }; most messages end with a request id to quote when you contact support.
400
error
Invalid request. Fix the request instead of retrying it; it is not charged.
- A field this page does not list, e.g.
seed is not supported. - A value outside the listed options or range, e.g.
duration must be an integer from …. - A missing or empty
prompt(prompt is required). - A reference URL that is not public HTTPS (
… must be a public HTTPS URL). last_image_urlwithoutfirst_image_url(last_image_url requires first_image_url).
401
error
Missing or invalid API key (
Invalid token).403
error
Insufficient balance (
code: "insufficient_user_quota"). Add credit in Console → Billing.404
error
GET /v1/videos/{id} or GET /v1/tasks/{id} for a task that does not exist or belongs to another account (Task not found).503
error
The model exists but none of its routes can take the request right now:
No available channel for model … (code: "model_not_found"). Retry later with backoff, or pick another model. A missing or misspelled model returns 404 with the same message; check the id instead of retrying.