> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phanedge.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# 视频生成

> 接口与 MiniMax 官网一致；含常见场景示例

* 路径 `/minimaxi/v1/video_generation`
* 与官网一致：本页所有请求体、字段命名与返回结构与 MiniMax 官网保持一致。
* 字段详解：请参考 [官网权威文档](https://platform.minimaxi.com/docs/api-reference/video-generation-intro)。

### 场景一：文生视频

```bash theme={null}
curl --request POST \
  --url https://models.phanedge.cloud/minimaxi/v1/video_generation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "MiniMax-Hailuo-2.3",
  "prompt": "A man picks up a book [Pedestal up], then reads [Static shot].",
  "duration": 6,
  "resolution": "1080P"
}'
```

示例响应（创建任务）

```json theme={null}
{
  "task_id": "106916112212032",
  "platform_id": "video_01JSGXXXXXXXXXXXXXXXXXX",
  "base_resp": {
    "status_code": 0,
    "status_msg": "success"
  }
}
```

<Note>
  `task_id` 为 MiniMax 上游原始任务 ID，可直接用于 MiniMax 官方查询接口。`platform_id` 为 PhanEdge 幻锋AI统一追踪 ID（`video_<ULID>`），可用于平台内查询、取消等操作。查询接口同时接受两种 ID。
</Note>

### 场景二：首帧图像驱动

```bash theme={null}
curl --request POST \
  --url https://models.phanedge.cloud/minimaxi/v1/video_generation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "A mouse runs toward the camera, smiling and blinking.",
  "first_frame_image": "https://cdn.hailuoai.com/prod/2024-09-18-16/user/multi_chat_file/9c0b5c14-ee88-4a5b-b503-4f626f018639.jpeg",
  "model": "MiniMax-Hailuo-2.3",
  "duration": 6,
  "resolution": "1080P"
}'
```

### 场景三：首帧+末帧

```bash theme={null}
curl --request POST \
  --url https://models.phanedge.cloud/minimaxi/v1/video_generation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "A little girl grow up.",
  "first_frame_image": "https://filecdn.minimax.chat/public/fe9d04da-f60e-444d-a2e0-18ae743add33.jpeg",
  "last_frame_image": "https://filecdn.minimax.chat/public/97b7cd08-764e-4b8b-a7bf-87a0bd898575.jpeg",
  "model": "MiniMax-Hailuo-02",
  "duration": 6,
  "resolution": "1080P"
}'
```

### 场景四：主体参考

```bash theme={null}
curl --request POST \
  --url https://models.phanedge.cloud/minimaxi/v1/video_generation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "A girl runs toward the camera and winks with a smile.",
  "subject_reference": [
    {
      "type": "character",
      "image": [
        "https://cdn.hailuoai.com/prod/2025-08-12-17/video_cover/1754990600020238321-411603868533342214-cover.jpg"
      ]
    }
  ],
  "model": "S2V-01"
}'
```


## OpenAPI

````yaml POST /minimaxi/v1/video_generation
openapi: 3.0.3
info:
  title: PhanEdge Core API
  version: '1.0'
  description: >-
    Core OpenAI-compatible and model-family endpoints used by the PhanEdge user
    docs.
servers:
  - url: https://models.phanedge.cloud
security:
  - BearerAuth: []
paths:
  /minimaxi/v1/video_generation:
    post:
      tags:
        - MiniMaxi
      summary: MiniMaxi video generation
      requestBody:
        $ref: '#/components/requestBodies/JsonObject'
      responses:
        '200':
          $ref: '#/components/responses/JsonObject'
components:
  requestBodies:
    JsonObject:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericObject'
  responses:
    JsonObject:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericObject'
  schemas:
    GenericObject:
      type: object
      additionalProperties: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'Authorization: Bearer <token>'

````