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

# Midjourney V7 アップロードペイント

> - 画像をアップロードしてキャンバス上で高度な編集を行い、マスク領域の指定と位置調整をサポートします
- mj-v7-editに似ていますが、既存のタスクに依存せず、画像を直接入力します
- 非同期処理モード、返されたタスクIDで[照会を実行](/ja/api-manual/task-management/get-task-detail)

<Note>
  Midjourneyにはコンテンツ審査機能が組み込まれています。生成された画像の一部が審査でフィルタリングされた場合、そのリクエストで消費されたクレジットは返金されません。プロンプトの内容がガイドラインに準拠しているかご確認ください。
</Note>


## OpenAPI

````yaml ja/api-manual/image-series/midjourney/mj-v7-upload-paint.json POST /v1/images/generations
openapi: 3.1.0
info:
  title: mj-v7-upload-paint インターフェース
  description: Midjourney V7 高度な編集インターフェース
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: 本番環境
security:
  - bearerAuth: []
tags:
  - name: 画像生成
    description: AI画像生成関連インターフェース
paths:
  /v1/images/generations:
    post:
      tags:
        - 画像生成
      summary: mj-v7-upload-paint インターフェース
      description: >-
        - 画像をアップロードしてキャンバス上で高度な編集を行い、マスク領域の指定と位置調整をサポートします

        - mj-v7-editに似ていますが、既存のタスクに依存せず、画像を直接入力します

        -
        非同期処理モード、返されたタスクIDで[照会を実行](/ja/api-manual/task-management/get-task-detail)
      operationId: createImageGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageGenerationRequest'
            examples:
              upload_paint_example:
                summary: 高度な編集
                value:
                  model: mj-v7-upload-paint
                  prompt: 美しい山の風景の背景
                  image_urls:
                    - https://example.com/photo.jpg
                  model_params:
                    mask:
                      areas:
                        - width: 100
                          height: 100
                          points:
                            - 10
                            - 10
                            - 10
                            - 100
                            - 100
                            - 100
                            - 100
                            - 10
                    canvas:
                      width: 1024
                      height: 1024
                    img_pos:
                      width: 512
                      height: 512
                      x: 256
                      'y': 256
                    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-v7-upload-paint'
                  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
        - image_urls
        - model_params
      properties:
        model:
          type: string
          description: モデル名
          enum:
            - mj-v7-upload-paint
          default: mj-v7-upload-paint
          example: mj-v7-upload-paint
        prompt:
          type: string
          description: 編集プロンプト
          example: 美しい山の風景の背景
        image_urls:
          type: array
          description: 入力画像URL（最初の1つを使用）
          items:
            type: string
            format: uri
          maxItems: 1
          example:
            - https://example.com/photo.jpg
        model_params:
          type: object
          description: 高度な編集パラメータ
          required:
            - mask
            - canvas
            - img_pos
          properties:
            mask:
              type: object
              description: >-
                再描画領域（inpaintと同じフォーマット：ポリゴン座標またはマスク画像）


                **方式1 - ポリゴン座標：**

                ```json

                { "areas": [{ "width": 100, "height": 100, "points": [10, 10,
                10, 100, 100, 100, 100, 10] }] }

                ```


                **方式2 - マスク画像（白=再描画、黒=保持）：**

                ```json

                { "url": "https://example.com/mask.png" }

                ```
              properties:
                areas:
                  type: array
                  description: ポリゴン領域リスト
                  items:
                    type: object
                    properties:
                      width:
                        type: integer
                        description: 領域の幅
                      height:
                        type: integer
                        description: 領域の高さ
                      points:
                        type: array
                        description: ポリゴン頂点座標（x1,y1,x2,y2,...）
                        items:
                          type: integer
                url:
                  type: string
                  format: uri
                  description: マスク画像URL（白=再描画、黒=保持）
            canvas:
              type: object
              description: キャンバスサイズ
              required:
                - width
                - height
              properties:
                width:
                  type: integer
                  description: キャンバスの幅
                  example: 1024
                height:
                  type: integer
                  description: キャンバスの高さ
                  example: 1024
            img_pos:
              type: object
              description: 画像の位置とサイズ
              required:
                - width
                - height
                - x
                - 'y'
              properties:
                width:
                  type: integer
                  description: レンダリング幅
                  example: 512
                height:
                  type: integer
                  description: レンダリング高さ
                  example: 512
                x:
                  type: integer
                  description: 左上隅の水平オフセット
                  example: 256
                'y':
                  type: integer
                  description: 左上隅の垂直オフセット
                  example: 256
            speed:
              type: string
              description: |-
                速度モード

                **コスト説明：** turboモードはコストが高くなります
              enum:
                - fast
                - turbo
              default: fast
              example: fast
        callback_url:
          type: string
          description: >-
            タスク完了後のHTTPSコールバックアドレス


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

            - タスクが完了（completed）、失敗（failed）、またはキャンセル（cancelled）されたときにトリガー

            - 課金確認完了後に送信


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

            - 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-mjv7
        model:
          type: string
          description: 実際に使用されたモデル名
        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'
        type:
          type: string
          enum:
            - text
            - image
            - audio
            - video
          example: image
        usage:
          $ref: '#/components/schemas/Usage'
    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: 45
    Usage:
      type: object
      properties:
        billing_rule:
          type: string
          enum:
            - per_call
            - per_token
            - per_second
          example: per_call
        credits_reserved:
          type: number
          description: 推定消費クレジット
          minimum: 0
          example: 1.8
        user_group:
          type: string
          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
        ```

````