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

# MiniMax-H3-Flex

> MiniMax-H3-Flex is a faster MiniMax H3: same inputs, same price, and in our tests each video finishes in about 70% of the time `hailuo_h3` takes. It follows motion and action in the prompt more closely (spins, jumps, a move between the first and last frame), while keeping the same text-to-video, first / last frame and audio-driven lip sync features.

Pass `image_url` for a first frame, optionally with `image_end_url` for a last frame. For reference-driven generation use the `hailuo_h3_refs` model instead.

**Pricing** — billed per second, by resolution:

| Resolution | Tokens / sec | USD / sec |
|---|---|---|
| 480p | 1.5 | $0.03 |
| 720p | 3 | $0.06 |
| 2K | 4.5 | $0.09 |

All resolutions support 5–15 seconds.

**Audio-driven lip sync** — pass `audio_url` (optionally with `audio_start`) and the characters sing or speak along with your audio. The model generates only the picture; the video's soundtrack is your audio clip, and the video lasts exactly `duration` seconds as long as the audio covers it. It works with text-to-video, a first frame, or first + last frames. Billed the same as without audio.

Returns an `img_uuid`; poll GET /api/v1/jobs/detail (or use `custom_callback_url`) to get the generated video.



## OpenAPI

````yaml api-reference/video-generations/openapi-minimax-h3-flex.json POST /api/v1/videos/generations
openapi: 3.1.0
info:
  title: GoEnhance API - MiniMax H3 Flex
  description: Video generation with MiniMax H3 Flex.
  version: 1.0.0
servers:
  - url: https://api.goenhance.ai
security: []
paths:
  /api/v1/videos/generations:
    post:
      tags:
        - VideoGenerations
      summary: MiniMax-H3-Flex
      description: >-
        MiniMax-H3-Flex is a faster MiniMax H3: same inputs, same price, and in
        our tests each video finishes in about 70% of the time `hailuo_h3`
        takes. It follows motion and action in the prompt more closely (spins,
        jumps, a move between the first and last frame), while keeping the same
        text-to-video, first / last frame and audio-driven lip sync features.


        Pass `image_url` for a first frame, optionally with `image_end_url` for
        a last frame. For reference-driven generation use the `hailuo_h3_refs`
        model instead.


        **Pricing** — billed per second, by resolution:


        | Resolution | Tokens / sec | USD / sec |

        |---|---|---|

        | 480p | 1.5 | $0.03 |

        | 720p | 3 | $0.06 |

        | 2K | 4.5 | $0.09 |


        All resolutions support 5–15 seconds.


        **Audio-driven lip sync** — pass `audio_url` (optionally with
        `audio_start`) and the characters sing or speak along with your audio.
        The model generates only the picture; the video's soundtrack is your
        audio clip, and the video lasts exactly `duration` seconds as long as
        the audio covers it. It works with text-to-video, a first frame, or
        first + last frames. Billed the same as without audio.


        Returns an `img_uuid`; poll GET /api/v1/jobs/detail (or use
        `custom_callback_url`) to get the generated video.
      parameters:
        - name: Authorization
          in: header
          description: ''
          required: false
          example: '{{Authorization}}'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  enum:
                    - minimax-h3-flex
                  description: Model name. Must be `minimax-h3-flex`.
                prompt:
                  type: string
                  maxLength: 7000
                  description: >-
                    Text prompt describing the video. Required. Max 7000
                    characters.
                image_url:
                  type: string
                  format: uri
                  description: >-
                    Optional first-frame image. JPG/PNG/WEBP/AVIF, ≤10MB,
                    shortest side ≥300px. When provided, runs image-to-video and
                    the output ratio follows the image.
                image_end_url:
                  type: string
                  format: uri
                  description: >-
                    Optional last-frame image (same limits as image_url). Must
                    be used together with image_url.
                resolution:
                  type: string
                  enum:
                    - 480p
                    - 720p
                    - 2K
                  default: 2K
                  description: >-
                    Output resolution. Also sets the price — see the pricing
                    table above. 2K takes longer than 720p.
                duration:
                  type: integer
                  minimum: 5
                  maximum: 15
                  default: 5
                  description: Video duration in seconds. Any integer from 5 to 15.
                ratio:
                  type: string
                  enum:
                    - '21:9'
                    - '16:9'
                    - '4:3'
                    - '1:1'
                    - '3:4'
                    - '9:16'
                  default: '16:9'
                  description: >-
                    Aspect ratio. Text-to-video only; ignored when image_url is
                    provided (the ratio then follows the input image).
                audio_url:
                  type: string
                  format: uri
                  description: >-
                    Optional. Drives the video with this audio: the characters
                    lip-sync to it, and the output's soundtrack is the audio
                    clip from `audio_start` to `audio_start + duration`. Pass
                    the whole song or speech track; it does not need to be
                    pre-cut. MP3/WAV/M4A/AAC/FLAC/OGG, ≤50MB. Works with
                    text-to-video, image-to-video and first/last frame. No extra
                    charge.
                audio_start:
                  type: number
                  minimum: 0
                  default: 0
                  description: >-
                    Optional. Where to start reading `audio_url`, in seconds
                    (decimals allowed). Must be used together with `audio_url`.
                    The audio left after `audio_start` must cover `duration`: a
                    shortfall of less than one second is accepted (the video
                    then ends with the audio); anything more is rejected before
                    tokens are charged.
                custom_callback_url:
                  type: string
                  format: uri
                  description: >-
                    Optional. A publicly accessible HTTPS URL. When the task
                    status changes (processing / success / failed), GoEnhance
                    sends a POST request to this URL. The request body is
                    identical to the response of GET /api/v1/jobs/detail. If
                    your server does not respond with HTTP 200, the notification
                    is retried up to 3 times, with a 3-second timeout per
                    attempt.
                  example: https://your-server.com/goenhance/callback
              required:
                - model
                - prompt
            examples:
              textToVideo:
                summary: Text-to-video
                value:
                  model: minimax-h3-flex
                  prompt: A boy playing basketball by the sea
                  duration: 5
                  ratio: '16:9'
              firstLastFrame:
                summary: First and last frame
                value:
                  model: minimax-h3-flex
                  prompt: >-
                    She bites the paper pizza, spins once on the spot, then
                    jumps through the torn red paper and lands laughing with the
                    pizza held overhead
                  image_url: https://example.com/first.jpg
                  image_end_url: https://example.com/last.jpg
                  duration: 5
                  resolution: 720p
              lipSyncShot:
                summary: First and last frame + audio (lip sync)
                value:
                  model: minimax-h3-flex
                  prompt: >-
                    The woman sings to the camera with emotion, the camera
                    slowly pushes in to a close-up, the background stays the
                    same
                  image_url: https://example.com/first.jpg
                  image_end_url: https://example.com/last.jpg
                  audio_url: https://example.com/song.mp3
                  audio_start: 13
                  duration: 10
                  resolution: 720p
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  msg:
                    type: string
                  data:
                    type: object
                    properties:
                      img_uuid:
                        type: string
                      cost:
                        type: number
                        description: >-
                          Tokens deducted for this request. This is the amount
                          actually charged, so it already reflects any discount
                          active on your account and can be lower than the
                          listed price. Tokens are deducted when the task is
                          accepted, and refunded automatically if the generation
                          ends in failure.
                        example: 5.82
                    required:
                      - img_uuid
                      - cost
                required:
                  - code
                  - msg
                  - data
              examples:
                '1':
                  summary: Success
                  value:
                    code: 0
                    msg: Success
                    data:
                      img_uuid: c12b656c-747a-44fd-9c80-add79b0c52d5
                      cost: 5.82
                '2':
                  summary: Insufficient tokens
                  value:
                    code: 100
                    msg: tokens is not enough
                quota:
                  summary: API key quota exceeded
                  value:
                    code: 101
                    msg: 'API key quota exceeded: 4990 of 5000 tokens used (monthly)'
          headers: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  msg:
                    type: string
                required:
                  - code
                  - msg
          headers: {}
      deprecated: false
      security: []

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.