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

# MiniMax H3 Image Generation

> - MiniMax H3 Image (minimax-h3-image) supports text-to-image generation and image editing, with up to 16 reference images
- Output up to 20 million pixels: combine an aspect ratio with a 1K / 2K / 4K resolution tier, or specify width and height in pixels
- Asynchronous processing: use the returned task ID to [query the task](/en/api-manual/task-management/get-task-detail)
- Generated image links are valid for 24 hours. Save the results promptly



## OpenAPI

````yaml en/api-manual/image-series/minimax-h3-image/minimax-h3-image-image-generation.json POST /v1/images/generations
openapi: 3.1.0
info:
  title: minimax-h3-image API
  description: >-
    Create image tasks using AI models with support for multiple models and
    parameter configurations
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Image Generation
    description: AI image generation related APIs
paths:
  /v1/images/generations:
    post:
      tags:
        - Image Generation
      summary: minimax-h3-image API
      description: >-
        - MiniMax H3 Image (minimax-h3-image) supports text-to-image generation
        and image editing, with up to 16 reference images

        - Output up to 20 million pixels: combine an aspect ratio with a 1K / 2K
        / 4K resolution tier, or specify width and height in pixels

        - Asynchronous processing: use the returned task ID to [query the
        task](/en/api-manual/task-management/get-task-detail)

        - Generated image links are valid for 24 hours. Save the results
        promptly
      operationId: createImageGenerationMinimaxH3Image
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageGenerationRequest'
            examples:
              text_to_image:
                summary: Text to Image (simple)
                value:
                  model: minimax-h3-image
                  prompt: A beautiful colorful sunset over the ocean
              text_to_image_hd:
                summary: Text to Image (HD 16:9)
                value:
                  model: minimax-h3-image
                  prompt: Cinematic wide shot of a futuristic city skyline at dusk
                  size: '16:9'
                  resolution: 4K
                  'n': 1
              text_to_image_pixel:
                summary: Text to Image (explicit pixels)
                value:
                  model: minimax-h3-image
                  prompt: Minimalist logo design
                  size: 1024x1024
              image_edit:
                summary: Image-to-Image / Edit
                value:
                  model: minimax-h3-image
                  prompt: Add a cute cat next to her
                  size: '1:1'
                  resolution: 1K
                  image_urls:
                    - https://example.com/input.png
                  callback_url: https://your-domain.com/webhook/image-done
              batch_generation:
                summary: Batch generation
                value:
                  model: minimax-h3-image
                  prompt: A cute robot in pixel art style
                  size: '1:1'
                  resolution: 2K
                  'n': 4
      responses:
        '200':
          description: Image generation task created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageGenerationResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_request
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: Unauthenticated, invalid or expired token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: unauthorized
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: Insufficient quota, recharge required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: insufficient_quota
                  message: Insufficient quota. Please top up your account.
                  type: insufficient_quota
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: model_access_denied
                  message: 'Token does not have access to model: minimax-h3-image'
                  type: invalid_request_error
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: rate_limit_exceeded
                  message: Too many requests, please try again later
                  type: rate_limit_error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: internal_error
                  message: Internal server error
                  type: api_error
components:
  schemas:
    ImageGenerationRequest:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          type: string
          description: >-
            Image generation model name. The official channel offers better
            stability and control for commercial use
          enum:
            - minimax-h3-image
          default: minimax-h3-image
          example: minimax-h3-image
        prompt:
          type: string
          description: >-
            Prompt describing the image to generate or how to edit the input
            images


            **Length limits:**

            - Up to `32,000` characters (counted as Unicode code points)

            - When `prompt_extend` is `false`, only approximately the first
            `4096` tokens of the prompt take effect
          example: A beautiful colorful sunset over the ocean
          maxLength: 32000
        image_urls:
          type: array
          description: >-
            List of reference image URLs for image-to-image generation and image
            editing


            **Notes:**

            - Number of input images per request: `1~16`

            - Maximum size per image: `64MB`

            - Width and height of each image: `128` to `8192` px

            - Aspect ratio of each image: longest side / shortest side must not
            exceed `4:1`

            - Supported formats: `.jpeg`, `.jpg`, `.png`, `.webp`, `.heic`,
            `.heif`

            - Image URLs must be directly accessible by the server or trigger a
            direct download (these URLs usually end in an image extension such
            as `.png` or `.jpg`)

            - Reference images incur additional image input tokens in
            image-to-image generation and image editing
          items:
            type: string
            format: uri
          example:
            - https://example.com/image1.png
            - https://example.com/image2.png
        size:
          type: string
          description: >-
            Output image size. Supports **aspect ratios** and **explicit pixel
            dimensions**. Default: `auto`


            **① Aspect ratio (recommended):** `X:Y`. Common ratios:


            - `1:1`: square

            - `1:2` / `2:1`: tall / wide

            - `1:3` / `3:1`: extra tall / extra wide (at the 3:1 limit)

            - `2:3` / `3:2`: standard portrait / landscape

            - `3:4` / `4:3`: traditional portrait / landscape

            - `4:5` / `5:4`: common social media formats

            - `9:16` / `16:9`: mobile / desktop widescreen

            - `9:21` / `21:9`: ultrawide formats


            Other `X:Y` values are also supported: `X` and `Y` must be integers
            from `1` to `300`, with an aspect ratio `≤ 3:1`


            **② Explicit pixel dimensions:** `WxH` (or `W×H`), such as
            `1024x1024`, `2720x1536`, `5472x3072`


            - Pixel budget: `655,360 ≤ width × height ≤ 20,000,000`
            (approximately 0.65 MP to 20 MP)

            - Aspect ratio: `≤ 3:1`


            **③ `auto`:** the model chooses the aspect ratio automatically; the
            output area still follows the `resolution` tier


            **Out-of-range sizes:**

            - Sizes outside these limits return `400`; they are not
            automatically resized or rounded
          default: auto
          example: auto
        resolution:
          type: string
          description: >-
            Resolution shortcut. Applies when `size` is `auto` or an aspect
            ratio; ignored when explicit pixel dimensions are used


            **Pixel budget** (width and height are calculated from the target
            total pixel count and the `size` ratio):


            - `1K`: ~1 MP (1024² = 1,048,576 pixels)

            - `2K`: ~4 MP (2048² = 4,194,304 pixels)

            - `4K`: ~16.8 MP (4096² = 16,777,216 pixels)


            **Actual landscape / square output sizes** (portrait sizes swap the
            corresponding width and height; for example, `3:4` reverses `4:3`):


            | Aspect ratio | 2K | 4K |

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

            | `1:1` | 2048×2048 | 4096×4096 |

            | `4:3` | 2368×1760 | 4736×3552 |

            | `16:9` | 2720×1536 | 5472×3072 |

            | `3:1` | 3552×1184 | 7104×2368 |


            **Notes:**

            - `1K` and `2K` use the same number of image output tokens
            (approximately `4,096` per image); `4K` uses approximately `16,384`
            per image. The returned `usage` is authoritative

            - Values are case-insensitive
          enum:
            - 1K
            - 2K
            - 4K
          default: 2K
          example: 2K
        output_format:
          type: string
          description: |-
            Output image format. Default: `jpeg`

            - `jpeg`: lossy compression, smaller files
            - `png`: lossless
            - `webp`: balance of file size and quality

            **Note:**
            - Transparent backgrounds are not supported
          enum:
            - jpeg
            - png
            - webp
          default: jpeg
          example: jpeg
        'n':
          type: integer
          description: >-
            Number of images to generate. Each image is billed separately


            **Notes:**

            - Both text input tokens and image input tokens scale proportionally
            with `n`

            - If some images fail (for example, due to content safety checks),
            the task still completes with the successful images. The actual
            count is determined by `results` in the response, and billing
            follows the returned `usage`
          minimum: 1
          maximum: 10
          default: 1
          example: 1
        prompt_extend:
          type: boolean
          description: >-
            Prompt enhancement: the model rewrites the prompt with more detail
            before generation. Default: `true`


            **Notes:**

            - Can only be set to `false` for text-to-image generation when
            `size` is an aspect ratio or explicit pixel dimensions

            - Setting it to `false` when `size` is `auto` or `image_urls` is
            provided returns `400`

            - When enabled, it adds approximately `2,300` to `3,800` text input
            tokens per image; when disabled, only the original prompt is counted
          default: true
          example: true
        callback_url:
          type: string
          description: >-
            HTTPS callback address after task completion


            **Callback Timing:**

            - Triggered when task is completed, failed, or cancelled

            - Sent after billing confirmation is completed


            **Security Restrictions:**

            - Only HTTPS protocol is supported

            - Callback to internal IP addresses is prohibited (127.0.0.1,
            10.x.x.x, 172.16-31.x.x, 192.168.x.x, etc.)

            - URL length must not exceed `2048` characters


            **Callback Mechanism:**

            - Timeout: `10` seconds

            - Maximum `3` retries on failure (retries after `1` second/`2`
            seconds/`4` seconds)

            - Callback response body format is consistent with the task query
            API response format

            - Callback address returning 2xx status code is considered
            successful, other status codes will trigger retry
          format: uri
          example: https://your-domain.com/webhooks/image-task-completed
    ImageGenerationResponse:
      type: object
      properties:
        created:
          type: integer
          description: Task creation timestamp
          example: 1757156493
        id:
          type: string
          description: Task ID
          example: task-unified-1757156493-imcg5zqt
        model:
          type: string
          description: Actual model name used
          example: minimax-h3-image
        object:
          type: string
          enum:
            - image.generation.task
          description: Specific task type
        progress:
          type: integer
          description: Task progress percentage (0-100)
          minimum: 0
          maximum: 100
          example: 0
        status:
          type: string
          description: Task status
          enum:
            - pending
            - processing
            - completed
            - failed
          example: pending
        task_info:
          $ref: '#/components/schemas/TaskInfo'
          description: Asynchronous task information
        type:
          type: string
          enum:
            - text
            - image
            - audio
            - video
          description: Task output type
          example: image
        usage:
          $ref: '#/components/schemas/Usage'
          description: Usage and billing information
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code identifier
            message:
              type: string
              description: Error description
            type:
              type: string
              description: Error type
    TaskInfo:
      type: object
      properties:
        can_cancel:
          type: boolean
          description: Whether the task can be cancelled
          example: true
        estimated_time:
          type: integer
          description: Estimated completion time (seconds)
          minimum: 0
          example: 100
    Usage:
      type: object
      description: Usage and billing information
      properties:
        billing_rule:
          type: string
          description: Billing rule
          enum:
            - per_call
            - per_token
            - per_second
          example: per_call
        credits_reserved:
          type: number
          description: Estimated credits consumed
          minimum: 0
          example: 2.5
        user_group:
          type: string
          description: User group category
          example: default
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        ##All APIs require Bearer Token authentication##


        **Get API Key:**


        Visit [API Key Management Page](https://evolink.ai/dashboard/keys) to
        get your API Key


        **Add to request header:**

        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````

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