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

# Create video regeneration task

> Regenerates a MiniMax-H3 768P video as 2K, either by task (`source_task_id`) or from a source video (`base_video` in `content`); provide exactly one. Query the returned `task_id` with the query endpoint; its `task_type` is `regeneration`.



## OpenAPI

````yaml /openapi/en/minimax-h3.json post /v2/video_regeneration
openapi: 3.1.0
info:
  description: >-
    MiniMax H3 video generation: create generation, regeneration (768P → 2K) and
    H3 Context IR tasks, and query their results.
  title: MiniMax H3 Video API
  version: v2
servers:
  - url: https://api.dreamto.ai
security:
  - bearerAuth: []
tags:
  - name: MiniMax H3
paths:
  /v2/video_regeneration:
    post:
      tags:
        - MiniMax H3
      summary: Create video regeneration task
      description: >-
        Regenerates a MiniMax-H3 768P video as 2K, either by task
        (`source_task_id`) or from a source video (`base_video` in `content`);
        provide exactly one. Query the returned `task_id` with the query
        endpoint; its `task_type` is `regeneration`.
      operationId: minimaxCreateVideoRegeneration
      requestBody:
        content:
          application/json:
            examples:
              Regenerate by task ID:
                description: >-
                  Use the `task_id` of a 768P generation task that succeeded
                  within 7 days.
                summary: Regenerate by task ID
                value:
                  model: MiniMax-H3
                  source_task_id: task_7Rk2mQ9vXc4LpT8nWb3sYh6dZf1aGe5J
                  resolution: 2K
              Regenerate from a video:
                description: Send the source video and the final prompt that produced it.
                summary: Regenerate from a video
                value:
                  model: MiniMax-H3
                  content:
                    - type: text
                      text: <the final prompt used for the source video>
                    - type: video_url
                      video_url:
                        url: https://your-cdn.example.com/h3-768p.mp4
                      role: base_video
                  resolution: 2K
              Regenerate from a video (image to video):
                description: >-
                  When the source came from image-to-video, also send the
                  first-frame image.
                summary: Regenerate from a video (image to video)
                value:
                  model: MiniMax-H3
                  content:
                    - type: text
                      text: <the final prompt used for the source video>
                    - type: image_url
                      image_url:
                        url: https://your-cdn.example.com/first-frame.jpg
                      role: first_frame
                    - type: video_url
                      video_url:
                        url: https://your-cdn.example.com/h3-768p.mp4
                      role: base_video
                  resolution: 2K
            schema:
              $ref: '#/components/schemas/MiniMaxV2VideoRegenerationRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                example:
                  value:
                    task_id: task_7Rk2mQ9vXc4LpT8nWb3sYh6dZf1aGe5J
              schema:
                $ref: '#/components/schemas/MiniMaxV2CreateTaskResponse'
          description: Task created.
          headers:
            X-Request-Id:
              description: Request ID. Include it when contacting support.
              schema:
                type: string
        '400':
          content:
            application/json:
              examples:
                example:
                  value:
                    type: error
                    error:
                      type: bad_request_error
                      message: >-
                        invalid params, content must include a non-empty text
                        item (prompt is required) (2013)
                      http_code: '400'
                    request_id: 20261205112532258615475826d9d6AbCdEfGh
              schema:
                $ref: '#/components/schemas/MiniMaxV2ErrorResponse'
          description: Invalid parameters, or an invalid task ID.
        '401':
          content:
            application/json:
              examples:
                example:
                  value:
                    type: error
                    error:
                      type: authorized_error
                      message: >-
                        login fail: Please carry the API secret key in the
                        'Authorization' field of the request header (1004)
                      http_code: '401'
                    request_id: 20261205112532258615475826d9d6AbCdEfGh
              schema:
                $ref: '#/components/schemas/MiniMaxV2ErrorResponse'
          description: Missing or invalid API Key.
        '402':
          content:
            application/json:
              examples:
                example:
                  value:
                    type: error
                    error:
                      type: insufficient_balance_error
                      message: insufficient balance (1008)
                      http_code: '402'
                    request_id: 20261205112532258615475826d9d6AbCdEfGh
              schema:
                $ref: '#/components/schemas/MiniMaxV2ErrorResponse'
          description: Insufficient balance.
        '422':
          content:
            application/json:
              examples:
                example:
                  value:
                    type: error
                    error:
                      type: unprocessable_entity_error
                      message: video description contains sensitive content (1026)
                      http_code: '422'
                    request_id: 20261205112532258615475826d9d6AbCdEfGh
              schema:
                $ref: '#/components/schemas/MiniMaxV2ErrorResponse'
          description: The input contains sensitive content.
        '429':
          content:
            application/json:
              examples:
                example:
                  value:
                    type: error
                    error:
                      type: rate_limit_error
                      message: rate limit, please retry later (1002)
                      http_code: '429'
                    request_id: 20261205112532258615475826d9d6AbCdEfGh
              schema:
                $ref: '#/components/schemas/MiniMaxV2ErrorResponse'
          description: Rate limited; retry later.
        '500':
          content:
            application/json:
              examples:
                example:
                  value:
                    type: error
                    error:
                      type: server_error
                      message: internal error (1000)
                      http_code: '500'
                    request_id: 20261205112532258615475826d9d6AbCdEfGh
              schema:
                $ref: '#/components/schemas/MiniMaxV2ErrorResponse'
          description: Server error; retry later.
        '529':
          content:
            application/json:
              examples:
                example:
                  value:
                    type: error
                    error:
                      type: overloaded_error
                      message: the service is overloaded, please retry later (1000)
                      http_code: '529'
                    request_id: 20261205112532258615475826d9d6AbCdEfGh
              schema:
                $ref: '#/components/schemas/MiniMaxV2ErrorResponse'
          description: Overloaded; retry later.
components:
  schemas:
    MiniMaxV2VideoRegenerationRequest:
      additionalProperties: false
      description: >-
        Request body of a regeneration task, which regenerates a video matching
        the MiniMax-H3 768P output spec as 2K. Provide exactly one of
        `source_task_id` and `content`.
      properties:
        model:
          default: MiniMax-H3
          description: |-
            Model name. Must be `MiniMax-H3`.

            **Allowed values:**
            - `MiniMax-H3`: MiniMax H3 flagship model.
          enum:
            - MiniMax-H3
          type: string
        source_task_id:
          description: >-
            Regenerate by task: the `task_id` of a `succeeded`
            `/v2/video_generation` task of your account created within the last
            7 days. Do not combine with `content`.
          type: string
        content:
          description: >-
            Regenerate from a source video: exactly one `video_url` with `role`
            `base_video`, plus the final prompt and all inputs used to generate
            that video, unchanged. The source needs an audio track, 24 fps,
            sides divisible by 32, 768×768 to 768×1344 pixels and 107–362
            frames. Do not combine with `source_task_id`.
          items:
            $ref: '#/components/schemas/MiniMaxV2RegenerationContentItem'
          type: array
        resolution:
          default: 2K
          description: |-
            Output resolution. Must be `2K`.

            **Allowed values:**
            - `2K`: 2K.
          enum:
            - 2K
          type: string
        aigc_watermark:
          default: false
          description: Whether to add an AIGC watermark to the video. Defaults to `false`.
          type: boolean
      required:
        - model
        - resolution
      type: object
    MiniMaxV2CreateTaskResponse:
      additionalProperties: false
      description: Response of a successful create call.
      properties:
        task_id:
          description: Task ID, used to query the task.
          type: string
      required:
        - task_id
      type: object
    MiniMaxV2ErrorResponse:
      additionalProperties: false
      description: Error response. The HTTP status is the error code.
      properties:
        type:
          description: Always `error`.
          type: string
        error:
          $ref: '#/components/schemas/MiniMaxV2ErrorDetail'
          description: Error details.
        request_id:
          description: >-
            Request ID, equal to the `X-Request-Id` header. Include it when
            contacting support.
          type: string
      required:
        - type
        - error
        - request_id
      type: object
    MiniMaxV2RegenerationContentItem:
      additionalProperties: false
      description: A regeneration input; adds the `base_video` role to the regular roles.
      properties:
        type:
          description: |-
            Item type.

            **Allowed values:**
            - `text`: Text prompt in `text`.
            - `image_url`: Image in `image_url.url`.
            - `video_url`: Video in `video_url.url`.
            - `audio_url`: Audio in `audio_url.url`.
          enum:
            - text
            - image_url
            - video_url
            - audio_url
          type: string
        text:
          description: >-
            The prompt; required and non-empty when `type` is `text`. Up to 7000
            characters for generation and Context IR, 40000 for regeneration.
          type: string
        image_url:
          $ref: '#/components/schemas/MiniMaxV2MediaURL'
          description: >-
            The image; required when `type` is `image_url`. JPG / JPEG / PNG /
            WEBP / HEIC / HEIF, up to 30 MB, 256–5760 px per side, aspect ratio
            0.4–2.5.
        video_url:
          $ref: '#/components/schemas/MiniMaxV2MediaURL'
          description: >-
            The video; required when `type` is `video_url`. MP4 / MOV (H.264 or
            H.265), up to 50 MB, 2–15 s per clip and 15 s in total, 23.976–60
            fps.
        audio_url:
          $ref: '#/components/schemas/MiniMaxV2MediaURL'
          description: >-
            The audio; required when `type` is `audio_url`. WAV / MP3, up to 15
            MB, 2–15 s per clip and 15 s in total.
        role:
          description: >-
            What the item is used for. The source video must be `base_video`;
            other roles work as for regular items.


            **Allowed values:**

            - `base_video`: The source video to regenerate; exactly 1.

            - `first_frame`: First-frame image used for the source video.

            - `last_frame`: Last-frame image used for the source video.

            - `reference_image`: Reference image used for the source video.

            - `reference_video`: Reference video used for the source video.

            - `reference_audio`: Reference audio used for the source video.
          enum:
            - base_video
            - first_frame
            - last_frame
            - reference_image
            - reference_video
            - reference_audio
          type: string
      required:
        - type
      type: object
    MiniMaxV2ErrorDetail:
      additionalProperties: false
      description: Error details.
      properties:
        type:
          description: >-
            Error category.


            **Allowed values:**

            - `bad_request_error`: Invalid parameters (400).

            - `authorized_error`: Authentication failed (401 / 403).

            - `insufficient_balance_error`: Insufficient balance (402).

            - `unprocessable_entity_error`: Input contains sensitive content
            (422).

            - `rate_limit_error`: Rate limited (429); retry later.

            - `server_error`: Server error (500); retry later.

            - `overloaded_error`: Overloaded (529); retry later.
          enum:
            - bad_request_error
            - authorized_error
            - insufficient_balance_error
            - unprocessable_entity_error
            - rate_limit_error
            - server_error
            - overloaded_error
          type: string
        message:
          description: >-
            Error message; the trailing number in parentheses is the error code,
            e.g. `(2013)`.
          type: string
        http_code:
          description: HTTP status as a string.
          type: string
      required:
        - type
        - message
        - http_code
      type: object
    MiniMaxV2MediaURL:
      additionalProperties: false
      description: Media location.
      properties:
        url:
          description: >-
            A public `http(s)` URL or a `data:<type>;base64,<data>` URL
            (lowercase format). `mm_file://` is not supported. The whole request
            body is limited to 64 MB, so use public URLs for large files.
          minLength: 1
          type: string
      required:
        - url
      type: object
  securitySchemes:
    bearerAuth:
      description: >-
        Send your DreamTo API Key in the `Authorization: Bearer <API Key>`
        header.
      scheme: bearer
      type: http

````

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