MindVideo API
Models / Video generation / minimax-hailuo-02

MiniMax Hailuo 02

MiniMax Hailuo 02 is a general video generation model, making it suitable for everyday creative shorts and dynamic scene generation.

General video
1

Calling the API

Submit a task to MindVideo with your platform model slug. The response includes a request ID, task ID, normalized status, and estimated cost.

For production retries, send a unique Idempotency-Key per business request. Reusing the same key with the same payload returns the original task without charging again; reusing it with different input returns 409.

Submit a request

curl -X POST https://api.mindvideo.ai/api/v1/tasks \
  -H "Authorization: Bearer mv_live_xxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: task_$(date +%s)" \
  -d '{
  "model": "minimax-hailuo-02",
  "input": {
    "prompt": "一只可爱的猫咪在草地上奔跑,阳光明媚,镜头轻微跟随",
    "resolution": "768p",
    "duration": 5,
    "prompt_optimizer": true
  }
}'
2

Authentication

Every server-side request must include an API key in the Authorization header. Keys can be created, disabled, and deleted from the dashboard.

Keep API keys server-sideDo not expose production API keys in browser code. Route user requests through your own backend before calling MindVideo.
3

Queue and polling

The platform maps runtime states into queued, processing, succeeded, failed, or cancelled so clients do not depend on model-specific fields.

Submit a request

Create an async generation task and poll the task endpoint for terminal status updates.

Fetch status

curl https://api.mindvideo.ai/api/v1/tasks/task_demo_model \
  -H "Authorization: Bearer mv_live_xxx"

Fetch task events

curl https://api.mindvideo.ai/api/v1/tasks/task_demo_model/events \
  -H "Authorization: Bearer mv_live_xxx"

Read the result

{
  "request_id": "req_demo_model",
  "task_id": "task_demo_model",
  "status": "succeeded",
  "cost_estimate": 0.225,
  "cost_actual": 0.225,
  "output": {
    "videos": [
      {
        "url": "https://example.com/output/demo.mp4"
      }
    ]
  }
}
4

Files

Inputs can reference hosted files or compact data URIs depending on model constraints. Production apps should prefer stable hosted URLs.

Data URI

Useful for small test assets and local playground experiments.

Hosted URL

Recommended for production workloads, retries, and larger image or video inputs.

5

Schema

Input

{
  "type": "object",
  "required": [
    "prompt"
  ],
  "properties": {
    "prompt": {
      "type": "string",
      "title": "Prompt",
      "minLength": 1,
      "description": "Video content description.",
      "x-playground": {
        "rows": 6,
        "widget": "textarea"
      }
    },
    "duration": {
      "enum": [
        5,
        10
      ],
      "type": "integer",
      "title": "Duration",
      "default": 5
    },
    "watermark": {
      "type": "boolean",
      "title": "Watermark",
      "default": false
    },
    "resolution": {
      "enum": [
        "512p",
        "768p",
        "1080p"
      ],
      "type": "string",
      "title": "Resolution",
      "default": "768p"
    },
    "last_frame_image": {
      "type": "string",
      "title": "Last frame image",
      "description": "Optional last-frame image URL or data URI for transition-style generation.",
      "x-playground": {
        "accept": "image/*",
        "widget": "file-upload",
        "advanced": true,
        "uploadKind": "image"
      }
    },
    "prompt_optimizer": {
      "type": "boolean",
      "title": "Prompt optimizer",
      "default": true
    },
    "fast_pretreatment": {
      "type": "boolean",
      "title": "Fast pretreatment",
      "default": false,
      "x-playground": {
        "advanced": true
      }
    },
    "first_frame_image": {
      "type": "string",
      "title": "First frame image",
      "description": "Optional first-frame image URL or data URI for image-to-video generation.",
      "x-playground": {
        "accept": "image/*",
        "widget": "file-upload",
        "advanced": true,
        "uploadKind": "image"
      }
    }
  },
  "additionalProperties": false
}

Output example

{
  "request_id": "req_demo_model",
  "task_id": "task_demo_model",
  "status": "succeeded",
  "cost_estimate": 0.225,
  "cost_actual": 0.225,
  "output": {
    "videos": [
      {
        "url": "https://example.com/output/demo.mp4"
      }
    ]
  }
}