> ## 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 画像生成

> - MiniMax H3 Image (minimax-h3-image) はテキストからの画像生成と画像編集に対応し、最大16枚の参照画像を指定できます
- 最大2000万ピクセルで出力：アスペクト比と 1K / 2K / 4K の解像度を組み合わせるか、幅と高さをピクセルで直接指定できます
- 非同期処理：返されたタスクIDを使用して[タスクを照会](/ja/api-manual/task-management/get-task-detail)してください
- 生成画像のリンクは24時間有効です。早めに保存してください



## OpenAPI

````yaml ja/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: AIモデルを使用して画像タスクを作成、複数のモデルとパラメータ設定に対応
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: 本番環境
security:
  - bearerAuth: []
tags:
  - name: 画像生成
    description: AI画像生成関連のAPI
paths:
  /v1/images/generations:
    post:
      tags:
        - 画像生成
      summary: minimax-h3-image API
      description: >-
        - MiniMax H3 Image (minimax-h3-image)
        はテキストからの画像生成と画像編集に対応し、最大16枚の参照画像を指定できます

        - 最大2000万ピクセルで出力：アスペクト比と 1K / 2K / 4K の解像度を組み合わせるか、幅と高さをピクセルで直接指定できます

        -
        非同期処理：返されたタスクIDを使用して[タスクを照会](/ja/api-manual/task-management/get-task-detail)してください

        - 生成画像のリンクは24時間有効です。早めに保存してください
      operationId: createImageGenerationMinimaxH3Image
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageGenerationRequest'
            examples:
              text_to_image:
                summary: テキストから画像（シンプル）
                value:
                  model: minimax-h3-image
                  prompt: 海面に広がる色鮮やかな美しい夕焼け
              text_to_image_hd:
                summary: テキストから画像（高精細 16:9）
                value:
                  model: minimax-h3-image
                  prompt: 夕暮れ時の未来都市スカイラインのシネマティックなワイドショット
                  size: '16:9'
                  resolution: 4K
                  'n': 1
              text_to_image_pixel:
                summary: テキストから画像（明示的なピクセル指定）
                value:
                  model: minimax-h3-image
                  prompt: ミニマルなロゴデザイン
                  size: 1024x1024
              image_edit:
                summary: 画像から画像 / 画像編集
                value:
                  model: minimax-h3-image
                  prompt: 彼女の隣に可愛い猫を追加
                  size: '1:1'
                  resolution: 1K
                  image_urls:
                    - https://example.com/input.png
                  callback_url: https://your-domain.com/webhook/image-done
              batch_generation:
                summary: バッチ生成
                value:
                  model: minimax-h3-image
                  prompt: ピクセルアート風の可愛いロボット
                  size: '1:1'
                  resolution: 2K
                  'n': 4
      responses:
        '200':
          description: 画像タスクが正常に作成されました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageGenerationResponse'
        '400':
          description: リクエストパラメータが無効です
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_request
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: 未認証、トークンが無効または期限切れ
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: unauthorized
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: 残高不足、チャージが必要です
          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: アクセスが拒否されました
          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: リクエスト頻度制限を超えました
          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: サーバー内部エラー
          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: 画像生成モデル名。公式チャネルは安定性と制御性に優れ、商用利用に適しています
          enum:
            - minimax-h3-image
          default: minimax-h3-image
          example: minimax-h3-image
        prompt:
          type: string
          description: |-
            生成する画像、または入力画像の編集方法を記述するプロンプト

            **長さの制限：**
            - 最大 `32,000` 文字（Unicodeコードポイント単位で計測）
            - `prompt_extend` が `false` の場合、プロンプトの先頭約 `4096` トークンのみが有効です
          example: 海面に広がる色鮮やかな美しい夕焼け
          maxLength: 32000
        image_urls:
          type: array
          description: >-
            画像からの画像生成と画像編集に使用する参照画像URLのリスト


            **注意：**

            - 1リクエストあたりの入力画像数：`1~16` 枚

            - 画像1枚あたりの最大ファイルサイズ：`64MB`

            - 各画像の幅と高さ：どちらも `128` ～ `8192` px

            - 各画像のアスペクト比：長辺 / 短辺が `4:1` 以下

            - 対応形式：`.jpeg`、`.jpg`、`.png`、`.webp`、`.heic`、`.heif`

            - 画像URLはサーバーから直接アクセスできるか、アクセス時に直接ダウンロードが開始される必要があります（通常、このようなURLは
            `.png` や `.jpg` などの拡張子で終わります）

            - 画像からの画像生成や画像編集では、参照画像に対して追加の画像入力トークンが発生します
          items:
            type: string
            format: uri
          example:
            - https://example.com/image1.png
            - https://example.com/image2.png
        size:
          type: string
          description: >-
            生成画像のサイズ。**アスペクト比**または**ピクセル数の直接指定**に対応します。デフォルトは `auto`


            **① アスペクト比（推奨）：** `X:Y`。主な比率：


            - `1:1`：正方形

            - `1:2` / `2:1`：縦長 / 横長

            - `1:3` / `3:1`：超縦長 / 超横長（上限の3:1）

            - `2:3` / `3:2`：標準的な縦向き / 横向き

            - `3:4` / `4:3`：従来の縦向き / 横向き

            - `4:5` / `5:4`：SNSでよく使われる比率

            - `9:16` / `16:9`：スマートフォン / デスクトップのワイド画面

            - `9:21` / `21:9`：ウルトラワイド形式


            その他の `X:Y` も指定できます。`X` と `Y` は `1` ～ `300` の整数で、アスペクト比は `≤ 3:1`
            にする必要があります


            **② ピクセル数の直接指定：** `WxH`（または
            `W×H`）。例：`1024x1024`、`2720x1536`、`5472x3072`


            - 総ピクセル数：`655,360 ≤ width × height ≤ 20,000,000`（約0.65 MP ～ 20 MP）

            - アスペクト比：`≤ 3:1`


            **③ `auto`：** モデルがアスペクト比を自動選択します。出力面積は引き続き `resolution` の設定に従います


            **範囲外のサイズ：**

            - 上記の範囲外のサイズは `400` を返します。自動的な拡大縮小や丸めは行いません
          default: auto
          example: auto
        resolution:
          type: string
          description: >-
            解像度を簡単に指定するパラメータ。`size` が `auto`
            またはアスペクト比の場合に有効で、ピクセル数を直接指定した場合は無視されます


            **総ピクセル数の規則**（目標の総ピクセル数と `size` の比率から幅と高さを計算）：


            - `1K`：約1 MP（1024² = 1,048,576 ピクセル）

            - `2K`：約4 MP（2048² = 4,194,304 ピクセル）

            - `4K`：約16.8 MP（4096² = 16,777,216 ピクセル）


            **横向き / 正方形の実際の出力サイズ**（縦向きは対応する幅と高さを入れ替えます。例：`3:4` は `4:3` の反転）：


            | アスペクト比 | 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 |


            **注意：**

            - `1K` と `2K` の画像出力トークン数は同じです（1枚あたり約 `4,096`）。`4K` は1枚あたり約 `16,384`
            で、返された `usage` が基準となります

            - 大文字と小文字は区別しません
          enum:
            - 1K
            - 2K
            - 4K
          default: 2K
          example: 2K
        output_format:
          type: string
          description: |-
            出力画像のファイル形式。デフォルトは `jpeg`

            - `jpeg`：非可逆圧縮でファイルサイズが小さい
            - `png`：可逆形式
            - `webp`：ファイルサイズと画質のバランスを重視

            **注意：**
            - 透明な背景には対応していません
          enum:
            - jpeg
            - png
            - webp
          default: jpeg
          example: jpeg
        'n':
          type: integer
          description: >-
            生成する画像の枚数。各画像は個別に課金されます


            **注意：**

            - テキスト入力トークンと画像入力トークンは、どちらも `n` に比例して増加します

            - 一部の画像が失敗した場合（コンテンツ安全性チェックなど）でも、成功した画像を含めてタスクは完了します。実際の枚数はレスポンスの
            `results` に従い、課金は返された `usage` に基づきます
          minimum: 1
          maximum: 10
          default: 1
          example: 1
        prompt_extend:
          type: boolean
          description: >-
            プロンプト最適化：生成前にモデルがプロンプトをより詳細に書き換えます。デフォルトは `true`


            **注意：**

            - テキストからの画像生成で、`size` がアスペクト比またはピクセル数の直接指定の場合にのみ `false` に設定できます

            - `size` が `auto`、または `image_urls` が指定されている場合、`false` にすると `400`
            を返します

            - 有効にすると、画像1枚あたり約 `2,300` ～ `3,800`
            のテキスト入力トークンが追加されます。無効の場合は元のプロンプトのみが計測されます
          default: true
          example: true
        callback_url:
          type: string
          description: >-
            タスク完了後の HTTPS コールバックアドレス


            **コールバックタイミング：**

            - タスクが完了、失敗、またはキャンセルされた時にトリガーされます

            - 課金確認完了後に送信されます


            **セキュリティ制限：**

            - HTTPS プロトコルのみサポート

            - 内部 IP アドレスへのコールバックは禁止（127.0.0.1、10.x.x.x、172.16-31.x.x、192.168.x.x
            など）

            - URL の長さは `2048` 文字以内


            **コールバックメカニズム：**

            - タイムアウト：`10` 秒

            - 失敗時最大 `3` 回リトライ（`1` 秒/`2` 秒/`4` 秒後にリトライ）

            - コールバックレスポンスボディの形式はタスククエリ API のレスポンス形式と一致

            - コールバックアドレスが 2xx ステータスコードを返した場合は成功とみなされ、その他のステータスコードはリトライをトリガーします
          format: uri
          example: https://your-domain.com/webhooks/image-task-completed
    ImageGenerationResponse:
      type: object
      properties:
        created:
          type: integer
          description: タスク作成タイムスタンプ
          example: 1757156493
        id:
          type: string
          description: タスクID
          example: task-unified-1757156493-imcg5zqt
        model:
          type: string
          description: 実際に使用されたモデル名
          example: minimax-h3-image
        object:
          type: string
          enum:
            - image.generation.task
          description: 具体的なタスクタイプ
        progress:
          type: integer
          description: タスク進行状況のパーセンテージ (0-100)
          minimum: 0
          maximum: 100
          example: 0
        status:
          type: string
          description: タスクステータス
          enum:
            - pending
            - processing
            - completed
            - failed
          example: pending
        task_info:
          $ref: '#/components/schemas/TaskInfo'
          description: 非同期タスク情報
        type:
          type: string
          enum:
            - text
            - image
            - audio
            - video
          description: タスクの出力タイプ
          example: image
        usage:
          $ref: '#/components/schemas/Usage'
          description: 使用量と課金情報
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: エラーコード識別子
            message:
              type: string
              description: エラー説明
            type:
              type: string
              description: エラータイプ
    TaskInfo:
      type: object
      properties:
        can_cancel:
          type: boolean
          description: タスクがキャンセル可能かどうか
          example: true
        estimated_time:
          type: integer
          description: 予想完了時間（秒）
          minimum: 0
          example: 100
    Usage:
      type: object
      description: 使用量と課金情報
      properties:
        billing_rule:
          type: string
          description: 課金ルール
          enum:
            - per_call
            - per_token
            - per_second
          example: per_call
        credits_reserved:
          type: number
          description: 予想消費クレジット数
          minimum: 0
          example: 2.5
        user_group:
          type: string
          description: ユーザーグループカテゴリ
          example: default
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##すべてのAPIにBearer Token認証が必要です##

        **APIキーの取得：**

        [APIキー管理ページ](https://evolink.ai/dashboard/keys)にアクセスしてAPIキーを取得してください

        **リクエストヘッダーに追加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````

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