|
| 1 | +--- |
| 2 | +description: Create a MiniMax-Hailuo-2.3 video-generation task from a first-frame image and return its task id. |
| 3 | +category: integration-sync |
| 4 | +argument-hint: <first_frame_image_url_or_base64> [prompt] [--model MiniMax-Hailuo-2.3] [--region global|cn] |
| 5 | +allowed-tools: Bash |
| 6 | +--- |
| 7 | + |
| 8 | +# Image to Video (MiniMax-Hailuo) |
| 9 | + |
| 10 | +Animate a still image with the MiniMax video-generation endpoint. The image is |
| 11 | +supplied as the `first_frame_image` (a public URL or a `data:` base64 string) and |
| 12 | +becomes the opening frame of the clip. Returns the `task_id` for polling. |
| 13 | + |
| 14 | +## Instructions |
| 15 | + |
| 16 | +1. Parse `$ARGUMENTS`: the first token is the `first_frame_image`; any remaining |
| 17 | + text is an optional `prompt` describing the motion. |
| 18 | +2. Choose the endpoint host by region: |
| 19 | + - `global` (default): `https://api.minimax.io/v1/video_generation` |
| 20 | + - `cn`: `https://api.minimaxi.com/v1/video_generation` |
| 21 | +3. Authenticate with a Bearer token from the `MINIMAX_API_KEY` environment variable. |
| 22 | +4. Default `model` to `MiniMax-Hailuo-2.3`. Other accepted models: `MiniMax-Hailuo-2.3-Fast`, |
| 23 | + `MiniMax-Hailuo-02`, `I2V-01-Director`, `I2V-01-live`, `I2V-01`. |
| 24 | +5. `model` and `first_frame_image` are required. Optional fields: `prompt`, |
| 25 | + `prompt_optimizer`, `fast_pretreatment`, `duration`, `resolution`, `callback_url`. |
| 26 | +6. POST the request, then report the `task_id` (check `base_resp.status_code == 0`). |
| 27 | + |
| 28 | +## Request |
| 29 | + |
| 30 | +```bash |
| 31 | +# region=global -> https://api.minimax.io ; region=cn -> https://api.minimaxi.com |
| 32 | +curl -sS -X POST "https://api.minimax.io/v1/video_generation" \ |
| 33 | + -H "Authorization: Bearer $MINIMAX_API_KEY" \ |
| 34 | + -H "Content-Type: application/json" \ |
| 35 | + -d '{ |
| 36 | + "model": "MiniMax-Hailuo-2.3", |
| 37 | + "first_frame_image": "https://example.com/first-frame.jpg", |
| 38 | + "prompt": "Slow push-in as the character turns toward the camera", |
| 39 | + "prompt_optimizer": true, |
| 40 | + "duration": 6, |
| 41 | + "resolution": "1080P" |
| 42 | + }' |
| 43 | +``` |
| 44 | + |
| 45 | +## Response |
| 46 | + |
| 47 | +```json |
| 48 | +{ |
| 49 | + "task_id": "176843928495987", |
| 50 | + "base_resp": { "status_code": 0, "status_msg": "success" } |
| 51 | +} |
| 52 | +``` |
| 53 | + |
| 54 | +Pass the returned `task_id` to `/minimax-video:query-video`. |
0 commit comments