Text to Video
minimax-hailuo-2
Hailuo 02 video generation.
Quick start
Submit a request with this public model ID. The API immediately returns a normalized job; poll GET /v1/jobs/{jobId} while its status is queued or running.
curl -X POST "https://api.artany.ai/v1/videos/generations" \
-H "Authorization: Bearer $ARTANY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-request-id" \
-d '{"model":"minimax-hailuo-2","prompt":"Ocean waves at sunrise","duration":5,"resolution":"768p","prompt_optimizer":true,"fast_pretreatment":false}'Request
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer token for an Artany API key. |
| Content-Type | Yes | Must be application/json. |
| Idempotency-Key | Recommended | 8–128 characters. Reusing it with an identical request prevents duplicate jobs and charges. |
Body
{
"model": "minimax-hailuo-2",
"prompt": "Ocean waves at sunrise",
"duration": 5,
"resolution": "768p",
"prompt_optimizer": true,
"fast_pretreatment": false
}Request Parameters
Only fields in this model’s public request contract are shown. Defaults are applied before validation and quoting.
Note:Use prompt-only text-to-video, first-frame image-to-video, or first-and-last-frame generation.
Stable public model ID for this request.
Video content description. Include subject movement, environment, and camera action.
Target video duration in seconds.
Allowed: 5, 10
Note:Only 5 and 10 second durations are supported.
Output resolution tier.
Allowed: 512p, 768p, 1080p
Whether to apply supported automatic prompt optimization before generation.
Whether to apply supported fast preprocessing to the supplied request.
Opening image for image-to-video generation.
"https://example.com/first-frame.jpg"
Ending image for first-and-last-frame generation.
"https://example.com/last-frame.jpg"
Note:Use this only with first_frame_image.
Use Cases
Choose the request shape that matches the source media you provide. The examples use the public model ID and accepted public fields.
Text-to-video
Create a clip from a prompt.
{
"model": "minimax-hailuo-2",
"prompt": "Ocean waves at sunrise",
"duration": 5,
"resolution": "768p"
}First-frame video
Use an opening image and a motion prompt.
{
"model": "minimax-hailuo-2",
"prompt": "Gentle camera push-in",
"first_frame_image": "https://example.com/first-frame.jpg",
"duration": 5
}First/last-frame video
Provide both endpoints of the clip.
{
"model": "minimax-hailuo-2",
"prompt": "The sunset fades into a starry sky",
"first_frame_image": "https://example.com/day.jpg",
"last_frame_image": "https://example.com/night.jpg",
"duration": 5
}Response and task status
A successful asynchronous submission returns HTTP 202 with a supplier-neutral job.
{
"id": "job_…",
"object": "generation.job",
"model": "minimax-hailuo-2",
"status": "queued",
"progress": 0,
"output": null,
"error": null,
"billing": {
"estimated_credits": "…",
"frozen_credits": "…",
"charged_credits": "0",
"state": "frozen",
"price_version": "2026-07-18.picverse-parity"
},
"created_at": "2026-07-21T00:00:00.000Z",
"completed_at": null
}- queued / running: continue polling.
- succeeded: retrieve media URLs from
output; billing has settled. - failed / canceled: inspect
error; frozen Credits are released.