---
title: "Video Generation"
method: POST
path: "/v1/video_generation"
tags: ["Video"]
---

# Video Generation

`POST /v1/video_generation`

## Request

- Base URL: `https://api.minimax.io`
- URL: `https://api.minimax.io/v1/video_generation`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/minimax/apis/minimax-api-2/docs/v1/video_generation/post.ts> (a function with typed inputs; its response is checked against the schema)

Generate video from text prompt

## Request body

- VideoGenerationReq
  - `prompt` string: Text prompt for video generation
  - `model` 'MiniMax-Hailuo-02' | 'T2V-01-Director' | 'T2V-01', required: Model to use for video generation
  - `prompt_optimizer` boolean: Whether to optimize the prompt
  - `seed` integer: Random seed for generation
  - `callback_url` string: Callback URL for completion notification
  - `first_frame_image` string: First frame image URL
  - `watermark` string: Watermark settings
  - `subject_reference` SubjectReference[]: Subject reference images
    - `type` string, required: Reference type
    - `image` string[], required: Reference image URLs
  - `duration` integer: Video duration in seconds
  - `resolution` string: Video resolution
  - `aigc_watermark` boolean: Whether to add AIGC watermark
  - `fast_pretreatment` boolean: Whether to use fast pretreatment
  - `ignore_pretreatment_error` boolean: Whether to ignore pretreatment errors
  - `user_translate` boolean: Whether to use user translation
  - `last_frame_image` string: Last frame image URL
  - `priority` integer: Task priority

## Response `200`

Successful response

- VideoGenerationResp
  - `task_id` string: Task ID for tracking video generation

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `500`: Internal server error

---

[API](https://skmtc.dev/minimax/apis/minimax-api-2.md) - [All operations](https://skmtc.dev/minimax/apis/minimax-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/minimax/apis/minimax-api-2/revisions/b18c2ab45c0e?raw)
