> ## 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.

# Midjourney V8.2 画像生成

> - Midjourney V8.2 モデルは自然言語プロンプトによる高品質な画像生成をサポートします。Fast モードは 1 回の生成で 4 枚の画像を返します。Draft モードは 1 回の実行で 24 枚の軽量な 512 px スケッチ画像を返します
- テキストから画像への生成と、画像から画像への生成（prompt 内で画像 URL を参照）をサポート
- 入力画像の URL は公開アクセス可能で、約 10 秒以内に取得できる必要があります。上流はタスク作成時に画像を同期的に取得し、取得できない場合は 400 を返します。中国本土以外の画像ホスティング（imgur、ibb、raw.githubusercontent、pinimg、picsum）は実際には失敗します。画像は高速な CDN にホストするか、プラットフォームのファイルアップロードを使用してください
- V8.2 のハイライト：V8.1 からの美的表現と画質の向上、精細度は prompt 内のネイティブパラメータ `--quality` / `--q`（1-4、4 = 高品質モード）で設定（追加料金なし）、ネイティブ 2K 出力（`quality=hd`）。V8.2 では turbo は利用できません（上流のドキュメントでは V8 は turbo 非対応とされています）
- スタイル参照（`--sref`）をサポート。`--oref` / `--cref` は V8.2 では**サポートされず**、上流で拒否されます。[プロンプトパラメータガイド](/ja/api-manual/image-series/midjourney/midjourney-v8-2-prompt-guide)を参照
- 上流がサポートしないプロンプトパラメータはそのまま透過されます：タスクはパラメータエラー（`invalid_parameters`）で失敗し、予約されたクレジットは返金されます（黙って破棄されることはなくなりました）
- 非同期処理モード。返されたタスク ID を使用して[ステータスを照会](/ja/api-manual/task-management/get-task-detail)
- 生成された画像リンクの有効期限は 30 日です。お早めに保存してください
- タイムアウト：約 20 分
- パラメータの注意：本インターフェースは V8.2 に固定されており、niji はサポートしていません。速度モードは `model_params.speed`、出力品質はトップレベルの `quality` パラメータで設定してください。精細度は prompt に `--quality` / `--q`（1-4）として記述し、そのまま透過されます
- `mj-v8.2-edit` / `mj-v8.2-upload-paint` はキャンバス編集（img_pos + mask）です。上流の指示ベース編集エンドポイント（`--edit`、最大 4 枚の参照画像）は本ルートではまだ公開されておらず、提供時期を調整中です

<Note>
  Midjourney にはコンテンツ審査機能が組み込まれています。審査は画像ごとに行われ、フィルタリングされた画像は結果に含まれず、残りの画像は通常どおり返されるため、受け取る画像の枚数が通常より少なくなる場合があります。1 枚でも審査を通過すればタスクは `completed` となり、通常どおり課金されます。すべての画像がフィルタリングされた場合、タスクは `failed` となり、予約されたクレジットは全額返金されます。プロンプトと参考画像がコンテンツガイドラインに準拠しているかご確認ください。
</Note>


## OpenAPI

````yaml ja/api-manual/image-series/midjourney/mj-v8-2-image-generate.json POST /v1/images/generations
openapi: 3.1.0
info:
  title: Midjourney V8.2 画像生成インターフェース
  description: Midjourney V8.2 モデルで画像生成タスクを作成
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: 本番環境
security:
  - bearerAuth: []
paths:
  /v1/images/generations:
    post:
      tags:
        - 画像生成
      summary: Midjourney V8.2 画像生成インターフェース
      description: >-
        - Midjourney V8.2 モデルは自然言語プロンプトによる高品質な画像生成をサポートします。Fast モードは 1 回の生成で 4
        枚の画像を返します。Draft モードは 1 回の実行で 24 枚の軽量な 512 px スケッチ画像を返します

        - テキストから画像への生成と、画像から画像への生成（prompt 内で画像 URL を参照）をサポート

        - 入力画像の URL は公開アクセス可能で、約 10
        秒以内に取得できる必要があります。上流はタスク作成時に画像を同期的に取得し、取得できない場合は 400
        を返します。中国本土以外の画像ホスティング（imgur、ibb、raw.githubusercontent、pinimg、picsum）は実際には失敗します。画像は高速な
        CDN にホストするか、プラットフォームのファイルアップロードを使用してください

        - V8.2 のハイライト：V8.1 からの美的表現と画質の向上、精細度は prompt 内のネイティブパラメータ `--quality` /
        `--q`（1-4、4 = 高品質モード）で設定（追加料金なし）、ネイティブ 2K 出力（`quality=hd`）。V8.2 では turbo
        は利用できません（上流のドキュメントでは V8 は turbo 非対応とされています）

        - スタイル参照（`--sref`）をサポート。`--oref` / `--cref` は V8.2
        では**サポートされず**、上流で拒否されます。[プロンプトパラメータガイド](/ja/api-manual/image-series/midjourney/midjourney-v8-2-prompt-guide)を参照

        -
        上流がサポートしないプロンプトパラメータはそのまま透過されます：タスクはパラメータエラー（`invalid_parameters`）で失敗し、予約されたクレジットは返金されます（黙って破棄されることはなくなりました）

        - 非同期処理モード。返されたタスク ID
        を使用して[ステータスを照会](/ja/api-manual/task-management/get-task-detail)

        - 生成された画像リンクの有効期限は 30 日です。お早めに保存してください

        - タイムアウト：約 20 分

        - パラメータの注意：本インターフェースは V8.2 に固定されており、niji はサポートしていません。速度モードは
        `model_params.speed`、出力品質はトップレベルの `quality` パラメータで設定してください。精細度は prompt に
        `--quality` / `--q`（1-4）として記述し、そのまま透過されます

        - `mj-v8.2-edit` / `mj-v8.2-upload-paint` はキャンバス編集（img_pos +
        mask）です。上流の指示ベース編集エンドポイント（`--edit`、最大 4
        枚の参照画像）は本ルートではまだ公開されておらず、提供時期を調整中です
      operationId: createMjV82ImageGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageGenerationRequest'
            examples:
              text_to_image:
                summary: テキストから画像
                value:
                  model: mj-v8.2
                  prompt: >-
                    A cinematic shot of a Maine Coon cat on a neon-lit balcony
                    --ar 16:9 --s 500
                  quality: standard
                  model_params:
                    speed: fast
              text_to_image_hd:
                summary: テキストから画像（Fast + HD）
                value:
                  model: mj-v8.2
                  prompt: >-
                    A cinematic shot of a Maine Coon cat on a neon-lit balcony
                    --ar 16:9 --s 500
                  quality: hd
                  model_params:
                    speed: fast
              text_to_image_hd_quality:
                summary: テキストから画像（HD + --q 3）
                value:
                  model: mj-v8.2
                  prompt: >-
                    A cinematic shot of a Maine Coon cat on a neon-lit balcony
                    --ar 16:9 --s 500 --q 3
                  quality: hd
                  model_params:
                    speed: fast
              image_to_image:
                summary: 画像から画像
                value:
                  model: mj-v8.2
                  prompt: >-
                    https://cdn.evolink.ai/model-cards/midjourney-v8-2/midjourney-v8-2-og-v1.jpg
                    A sunset landscape in watercolor style --iw 1.5 --ar 16:9
                  quality: standard
                  model_params:
                    speed: fast
      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: mj-v8.2'
                  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
          enum:
            - mj-v8.2
          default: mj-v8.2
          description: モデル名
        prompt:
          type: string
          description: >-
            プロンプト。Midjourney V8.2 のすべてのネイティブパラメータ構文をサポートします（例：--ar 16:9 --s
            500）。


            **画像から画像：** prompt の先頭に画像 URL を配置します。対応フォーマット：.png, .gif, .webp,
            .jpg, .jpeg


            **画像から画像のルール：**

            - 画像 1 枚 + テキストなし = **無効**（エラーになります）

            - 画像 1 枚 + テキスト説明 = 有効

            - 画像 2 枚以上 + テキストなし = 有効

            - 画像 2 枚以上 + テキスト説明 = 有効


            **サポートされないパラメータ：**
            上流がサポートしないパラメータ（例：`--oref`、`--cref`、`--stop`、`--bs`）はそのまま透過され、上流で明示的に拒否されます。タスクはパラメータエラー（`invalid_parameters`）で失敗し、予約されたクレジットは返金されます。`--v`
            / `--version` / `--niji` および速度 / hd のパラメータは除去され、API
            パラメータで制御されます。`--quality` / `--q`（1-4）はそのまま透過されます。
          maxLength: 2048
          example: >-
            A cinematic shot of a Maine Coon cat on a neon-lit balcony --ar 16:9
            --s 500
        quality:
          type: string
          enum:
            - standard
            - hd
          default: standard
          description: |-
            出力品質

            - `standard`：標準解像度（デフォルト）、1 倍の倍率
            - `hd`：ネイティブ HD 出力、1.5 倍の倍率。`speed: draft` とは互いに排他的です

            **料金の注意：** 品質倍率は `speed` 倍率と掛け合わされます（乗算）。
        model_params:
          type: object
          description: モデルパラメータ
          properties:
            speed:
              type: string
              enum:
                - draft
                - fast
              default: fast
              description: >-
                速度モード


                - `draft`：スケッチモード。1 回の実行で（4 枚ではなく）24 枚の軽量な 0.5K
                スケッチ画像を返します。構図のアイデアを素早く探るのに最適です。`quality: hd` とは互いに排他的です

                - `fast`：標準モード（デフォルト）
        callback_url:
          type: string
          description: >-
            タスク完了後のHTTPSコールバックアドレス


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

            - タスクが完了（completed）または失敗（failed）したときにトリガー

            - 課金確認完了後に送信


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

            - 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`秒後にリトライ）

            - コールバックレスポンスのフォーマットはタスク照会インターフェースの戻り値と同一

            - コールバックアドレスが2xxステータスコードを返した場合は成功、その他のステータスコードはリトライをトリガー
          format: uri
          example: https://your-domain.com/webhooks/image-task-completed
    ImageGenerationResponse:
      type: object
      properties:
        created:
          type: integer
          description: タスク作成タイムスタンプ
          example: 1757165031
        id:
          type: string
          description: タスクID
          example: task-unified-1757165031-mjv82
        model:
          type: string
          description: 実際に使用されたモデル名
          example: mj-v8.2
        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:
        estimated_time:
          type: integer
          description: 推定完了時間（秒）
          minimum: 0
          example: 45
    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: 1.8
        user_group:
          type: string
          description: ユーザーグループ
          example: default
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##全てのインターフェースはBearer Token認証が必要です##

        **API Keyの取得：**

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

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

````

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