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

# First Frame to Video Generation

> Video generation V2 API. Input via multimodal content array (text / image / video / audio). Supports text-to-video, image-to-video (first/last frame), and multimodal reference-to-video with 2K output.



## OpenAPI

````yaml api-reference/en/zmodelVideo/minimax/minimax-h3/first-frame-to-video.json POST /minimax/v2/video_generation
openapi: 3.0.1
info:
  title: MiniMax API
  description: Create a video generation task.
  version: 1.0.0
servers:
  - url: https://baze-api.powerbuyin.top
security: []
paths:
  /minimax/v2/video_generation:
    post:
      summary: Image-to-video (t2va)
      description: >-
        Video generation V2 API. Input via multimodal content array (text /
        image / video / audio). Supports text-to-video, image-to-video
        (first/last frame), and multimodal reference-to-video with 2K output.
      operationId: videoGeneration
      parameters:
        - name: Content-Type
          in: header
          required: true
          description: Media type of the request body. Set to `application/json`.
          schema:
            type: string
            enum:
              - application/json
            default: application/json
      requestBody:
        required: true
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoGenerationReq'
            examples:
              Image-to-video (t2va):
                summary: Image-to-video (t2va)
                value:
                  model: MiniMax-H3
                  content:
                    - type: text
                      text: >-
                        Pull focus to the people in the background and add more
                        steam to the ramen bowl.
                    - type: image_url
                      image_url:
                        url: >-
                          https://cdn.hailuoai.com/prod/hailuo_demo/testsets/H3_AA_I2VA/gallery/sr_v17_variants_seed42_43_20260724/inputs/4a3a90bf9100_KDmcbkhzYo5sjjxr9FqcVmWVnzb.png
                      role: first_frame
                  resolution: 2K
                  duration: 5
                  ratio: adaptive
      responses:
        '200':
          description: >-
            Returns task_id upon successful creation. Use this task_id to call
            the query task API to retrieve task status and results.


            Query task success response example

            ```json

            {
              "task": {
                "id": "424010985738629",
                "model": "MiniMax-H3",
                "status": "succeeded",
                "created_at": 1785125529,
                "updated_at": 1785125946,
                "content": {
                  "url": "https://your-cdn.example.com/h3-generated-2k-output.mp4"
                },
                "resolution": "2K",
                "duration": 5,
                "usage": {
                  "total_seconds": 5,
                  "input_seconds": 0,
                  "output_seconds": 5,
                  "input_image_count": 0
                },
                "ratio": "16:9",
                "task_type": "generation",
                "modality": "video"
              }
            }
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoGenerationResp'
              example:
                output:
                  task_id: '424010985738629'
      security:
        - bearerAuth: []
components:
  schemas:
    VideoGenerationReq:
      type: object
      required:
        - model
        - content
        - resolution
        - duration
      properties:
        model:
          type: string
          description: 'Model name. Currently available: `MiniMax-H3`.'
          enum:
            - MiniMax-H3
        content:
          type: array
          description: >
            Multimodal input content array describing the information used to
            generate the video. Each element is distinguished by type (text /
            image_url / video_url / audio_url) and can be annotated with a role.


            Each request must contain a non-empty text item (prompt is
            required); omission will return a parameter error.

            Supported input combinations (corresponding to different generation
            scenarios):


            Image-to-video (first frame): text + 1 image_url (role=first_frame
            or omitted).

            Image-to-video (last frame): text + 1 image_url (role=last_frame).

            Image-to-video (first-last frame): text + 2 image_url (roles
            first_frame and last_frame respectively).

            Image-to-video and multimodal reference-to-video are mutually
            exclusive: if any of reference_image / reference_video /
            reference_audio roles appear in content, first_frame / last_frame
            must not appear (and vice versa); they cannot be mixed.


            Input media limits (total request body size ≤ 64 MB; use public URLs
            for large files, do not use Base64)


            Image image_url:


            | Item | Limit |

            | :--- | :--- |

            | Format | JPG, JPEG, PNG, WEBP, HEIC, HEIF |

            | Single file size | ≤ 30 MB |

            | Width/height range | [256, 5760] px |

            | Aspect ratio (w/h) | [0.4, 2.5] |

            | Count | first frame ≤ 1, last frame ≤ 1, reference images ≤ 9 |
          items:
            type: object
            required:
              - type
            properties:
              type:
                type: string
                description: Type of the input content.
                enum:
                  - text
              text:
                type: string
                description: >-
                  Text prompt. All scenarios require a non-empty text describing
                  the expected video. Single text max 7000 characters.
              image_url:
                type: object
                description: >-
                  Image object when type=image_url (format / size / dimension /
                  count limits see content description above).
                required:
                  - url
                properties:
                  url:
                    type: string
                    description: >-
                      Image address. Supports: public URL; mm_file://{file_id}
                      (reference platform existing files, such as uploaded or
                      historical output file_id);
                      data:image/<format>;base64,<Base64> data URI (<format> in
                      lowercase).
              role:
                type: string
                description: >-
                  The position or purpose of the content, conditionally
                  required:


                  - first_frame: First frame image (image-to-video; if only one
                  image is provided and role is not set, it defaults to
                  first_frame).

                  - last_frame: Last frame image (image-to-video first-last
                  frame; must be paired with first_frame).

                  - reference_image: Reference image (multimodal
                  reference-to-video).

                  - reference_video: Reference video (multimodal
                  reference-to-video).

                  - reference_audio: Reference audio (multimodal
                  reference-to-video).
                enum:
                  - first_frame
                  - last_frame
                  - reference_image
                  - reference_video
                  - reference_audio
        resolution:
          type: string
          description: 'Video resolution. Currently available: 768P, 2K.'
          enum:
            - 768P
            - 2K
        duration:
          type: integer
          description: 'Video duration in seconds. Required, integer. Available: 4~15.'
          enum:
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - 10
            - 11
            - 12
            - 13
            - 14
            - 15
        ratio:
          type: string
          description: >-
            Output video aspect ratio, default adaptive (automatically selects
            the most suitable aspect ratio based on input; the actual ratio can
            be retrieved from the ratio field in the query API).


            Text-to-video (t2va, content contains only text): ratio is required
            and cannot be adaptive; available values: 21:9, 16:9, 4:3, 1:1, 3:4,
            9:16.
          enum:
            - '21:9'
            - '16:9'
            - '4:3'
            - '1:1'
            - '3:4'
            - '9:16'
        callback_url:
          type: string
          description: >-
            Callback notification URL for task status changes. After
            configuration, the MiniMax server will first send a verification
            request containing a challenge field (must return the challenge
            value unchanged within 3 seconds to complete verification). Once
            verified, whenever the task status changes, a POST push will be sent
            to this URL, with the push body structure matching the query task
            API response.


            Callback status values: queued, running, succeeded, failed,
            cancelled.
        aigc_watermark:
          type: boolean
          description: >-
            Whether to add an AIGC watermark to the generated video. Default
            false.
    VideoGenerationResp:
      type: object
      properties:
        task_id:
          type: string
          description: Task ID, used to query task status and results.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Pass `Authorization: Bearer <token>` in the request header.'

````