MiniMax H3
Text-to-video, first/last frames and multimodal references with 768p or 2K output.
/api/v1/jobs/createTaskSet model to hailuo-h3 for 5 to 15 seconds of 768p or 2K video. Save the returned taskId and query the result, or configure a customer callback.
Request example
curl -X POST https://api.xbaiapi.com/api/v1/jobs/createTask \
-H "Authorization: Bearer xb-xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "hailuo-h3",
"input": {
"prompt": "a cat stretching on a sunlit windowsill",
"resolution": "768p",
"duration": 5,
"ratio": "16:9"
},
"callBackUrl": "https://your-server.com/webhook"
}'Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
model | string | Yes | Fixed value hailuo-h3 |
input.prompt | string | Conditional | Video description; optional when a first frame is supplied |
input.resolution | string | No | 768p or 2K, case insensitive; defaults to 2K |
input.duration | number | No | Integer from 5 to 15 seconds; defaults to 5 |
input.ratio | string | No | adaptive, 16:9, 9:16, 1:1, 4:3, 3:4, 21:9. Defaults to adaptive; text-only input uses 16:9 |
input.firstFrameUrl | string | No | First frame; cannot be combined with reference lists |
input.lastFrameUrl | string | No | Last frame; requires a first frame |
input.imageUrls | string[] | No | Up to 9 reference images |
input.videoUrls | string[] | No | Up to 3 MP4/MOV reference videos, 50 MB each |
input.audioUrls | string[] | No | Up to 3 reference audio clips; input audio is free |
callBackUrl | string | No | Customer HTTP(S) endpoint for terminal task notifications |
Media must use publicly reachable HTTP(S) URLs. Reference videos must be MP4 or MOV files (not fragmented) at https URLs on a domain name that return the file directly (HTTP 200, no redirect) with Content-Length, up to 50 MB each. The server copies each reference video to xbaiapi storage, hands the copy to the upstream and bills the longest duration found in the file, including the actual frame timing. Videos that cannot be downloaded or measured return 422 before billing. Client-supplied duration is not used for billing. First/last frames cannot be combined with reference image, video or audio lists.
Billing
| Resolution | Input and output video rate | USD per second |
|---|---|---|
| 768p | 6.4 credits | $0.032 |
| 2K | 10.4 credits | $0.052 |
Total = rate × (output video seconds + input video seconds) + additional image cost.
Total input video duration is rounded up to a whole second. The first 5 images are free; each additional image costs 3.2 credits ($0.016). Input audio is free. Text-to-video, first/last frames and multimodal requests use the same resolution rate.
Example: 5 seconds of 768p output, 3 seconds of reference video and 7 reference images cost 6.4 × (5 + 3) + 3.2 × 2 = 57.6 credits, or $0.288. Failed tasks are refunded in full.
Response
{
"code": 200,
"msg": "success",
"data": {
"taskId": "xb_a1b2c3d4e5f6...",
"creditsCharged": 32
}
}Task state is synchronized by scheduled polling, normally every 2 minutes. On success, resultJson.resultUrls in the query response contains the video URL. Results are retained for 30 days.