antrophiclove
← Kütüphaneye dön
Kurulum
mkdir -p .claude/commands && curl -sL https://www.antrophiclove.com/api/kaynak/text-to-video/raw -o .claude/commands/text-to-video.md

Hedef dosya: .claude/commands/text-to-video.md

Text to Video (MiniMax-Hailuo)

Submit a text prompt to the MiniMax video-generation endpoint and return the task_id that identifies the asynchronous job. Follow up with /minimax-video:query-video to poll status and /minimax-video:download-video to fetch the result.

Instructions

  1. Read the user's prompt from $ARGUMENTS. Choose the endpoint host by region:
    • global (default): https://api.minimax.io/v1/video_generation
    • cn: https://api.minimaxi.com/v1/video_generation
  2. Authenticate with a Bearer token from the MINIMAX_API_KEY environment variable.
  3. Default model to MiniMax-Hailuo-2.3. Other accepted models: MiniMax-Hailuo-2.3-Fast, MiniMax-Hailuo-02, T2V-01-Director, T2V-01.
  4. model and prompt are required. Optional fields: prompt_optimizer, fast_pretreatment, duration, resolution, callback_url.
  5. POST the request, then report the task_id from the response (also check base_resp.status_code, where 0 means success).

Request

# region=global -> https://api.minimax.io ; region=cn -> https://api.minimaxi.com
curl -sS -X POST "https://api.minimax.io/v1/video_generation" \
  -H "Authorization: Bearer $MINIMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-Hailuo-2.3",
    "prompt": "A neon koi swimming through a rainy Tokyo alley at night",
    "prompt_optimizer": true,
    "fast_pretreatment": false,
    "duration": 6,
    "resolution": "1080P"
  }'

Response

{
  "task_id": "176843928495123",
  "base_resp": { "status_code": 0, "status_msg": "success" }
}

Pass the returned task_id to /minimax-video:query-video.