9.5 KiB
name, description, license, version, type, risk_level, status, disable-model-invocation, provider, tags, requires, metadata, market
| name | description | license | version | type | risk_level | status | disable-model-invocation | provider | tags | requires | metadata | market | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| minimax-video-gen | Use this skill when the user wants to generate videos using MiniMax's Hailuo model. Supports text-to-video, image-to-video, and subject reference. The API is asynchronous — submit a task, poll for status, then download. Use when 用户提到 生成视频、文生视频、AI 视频、创建视频、视频生成、 动画生成、MiniMax 视频、海螺、Hailuo、图片变视频、图生视频。 | Complete terms in LICENSE.txt | 1.3.1 | procedural | low | enabled | true | minimax |
|
|
|
|
minimax-video-gen Skill
Mandatory Rules (violation will cause failure)
- Must use HTTPS to access agent-service —
https://127.0.0.1:${PORT}with-kto skip certificate verification - Use Bash curl throughout — do not use the HttpRequest tool or Python
- Polling interval is 10 seconds — use
sleep 10to wait - Must use
providerId— do not useprovider, or requests will route to the wrong upstream
Full Execution Flow
Prerequisites
- The user has already configured and enabled a Provider with
video_genservice in Resource Manager → Compute and entered the API Key - agent-service is running
Core Concept: Four-Step Asynchronous Flow
Video generation uses an asynchronous task model via the NewAPI gateway:
- Submit task: POST
/video/generationsto create a task, receive atask_id - Poll status: GET
/videos/{task_id}untilstatusis"completed" - Download & upload: download from
data.metadata.url, upload to media-store - Display: use
dc-media://protocol to show the video
Provider Selection (Important)
Use providerId (not provider) to target the correct gateway. When the provider is a NewAPI gateway (e.g. desirecore-cloud), use providerId. Do not use provider: "minimax" — this would route to the MiniMax native host, which does not support the NewAPI /video/generations path.
{
"providerId": "desirecore-cloud",
"serviceType": "video_gen",
"endpoint": "/video/generations",
...
}
Model Selection and Fallback Strategy
| Model | Supported Modes | Characteristics | Use Case |
|---|---|---|---|
| MiniMax-Hailuo-2.3 | Text-to-video + image-to-video | Highest quality, default first choice | Default when the user doesn't specify |
| MiniMax-Hailuo-2.3-fast | Image-to-video only | Fast, 50% lower cost | Fallback when quota is insufficient in image-to-video scenarios |
Fallback rules (mandatory):
- Use
MiniMax-Hailuo-2.3by default - When text-to-video (T2V) quota is insufficient:
MiniMax-Hailuo-2.3-fastdoes not support text-to-video and cannot be used as a fallback. Inform the user directly that the quota is insufficient and suggest waiting for the quota to reset or switching to another video generation service (such as Kling) - When image-to-video (I2V) quota is insufficient: fall back to
MiniMax-Hailuo-2.3-fastand inform the user "switched to the fast model for generation" - If the user is doing image-to-video and explicitly requests fast generation, use
MiniMax-Hailuo-2.3-fastdirectly
Step 1: Submit a Text-to-Video Task
Important: The endpoint is /video/generations (with an "s"), NOT /video_generation.
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
-H "Content-Type: application/json" \
-d '{
"providerId": "desirecore-cloud",
"serviceType": "video_gen",
"endpoint": "/video/generations",
"body": {
"model": "MiniMax-Hailuo-2.3",
"prompt": "Video content described by the user",
"size": "768P",
"duration": 6
},
"responseType": "json"
}'
Optional parameters (add to the body):
"duration": video length in seconds (6 or 10)"size":"768P"or"1080P"(usesize, notresolution)
Extract data.task_id from the JSON response.
Successful response example:
{
"success": true,
"data": {
"id": "task_xxx",
"task_id": "task_xxx",
"object": "video",
"model": "MiniMax-Hailuo-2.3",
"status": "queued",
"progress": 0,
"created_at": 1780995870
},
"statusCode": 200
}
Step 1 (alternative): Image-to-Video
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
-H "Content-Type: application/json" \
-d '{
"providerId": "desirecore-cloud",
"serviceType": "video_gen",
"endpoint": "/video/generations",
"body": {
"model": "MiniMax-Hailuo-2.3",
"prompt": "Describe the dynamic changes of the scene in the image",
"first_frame_image": "https://image-URL",
"size": "768P"
},
"responseType": "json"
}'
Step 2: Poll the Task Status
Call once every 10 seconds until status is "completed" or "failed". Replace TASK_ID with the task_id returned in Step 1.
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
TASK_ID="task_id returned from step 1"
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
-H "Content-Type: application/json" \
-d "{
\"providerId\": \"desirecore-cloud\",
\"serviceType\": \"video_gen\",
\"endpoint\": \"/videos/${TASK_ID}\",
\"method\": \"GET\",
\"responseType\": \"json\"
}"
In-progress statuses may be: "queued" or "in_progress".
Polling response (in progress):
{
"success": true,
"data": {
"id": "task_xxx",
"status": "in_progress",
"progress": 42
}
}
Polling response (completed):
{
"success": true,
"data": {
"id": "task_xxx",
"status": "completed",
"progress": 100,
"metadata": {
"url": "https://.../output_aigc.mp4?..."
}
}
}
Step 3: Download and Upload to media-store
Extract the video download URL from data.metadata.url in the completed Step 2 response. The URL is valid for 24 hours; download immediately.
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
VIDEO_URL="data.metadata.url from step 2"
curl -sL "$VIDEO_URL" -o /tmp/minimax-video.mp4 && \
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media/upload" \
-F "file=@/tmp/minimax-video.mp4;type=video/mp4"
Extract the mediaId field from the JSON response.
Step 4: Display the Video Using the dc-media Protocol
Write Markdown image syntax directly in your reply (the frontend will automatically recognize the video extension and render a player):

Error Handling
status: "failed": video generation failed; explain to the usersuccess: false+error: "No matching provider found": No enabled provider withvideo_genservice foundsuccess: false+error: "API Key not configured": API Key has not been entered- Insufficient quota (errors related to
statusCode: 429,insufficient_quota,balance): text-to-video cannot fall back (the Fast model does not support T2V); inform the user of insufficient quota; image-to-video can switch toMiniMax-Hailuo-2.3-fastand retry from Step 1 - Polling exceeds 10 minutes without completion: inform the user that the task may have timed out
Notes
- Video generation is asynchronous and typically takes 2–10 minutes
- A polling interval of 10 seconds is recommended
- The download URL is valid for 24 hours
- If the user does not explicitly request otherwise, by default pass
"size": "768P"and"duration": 6 - Do not proxy the download URL through media-proxy — use
curl -sL "$VIDEO_URL"to download directly