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

# Midjourney 領域再描画

Midjourney の領域再描画機能を使用して、生成済み画像の指定領域を再描画します。ポリゴン領域または白黒マスク画像で再描画領域を指定できます。このインターフェースは非同期処理方式を採用しており、クライアントは task\_id を使用して最終的な生成結果を照会する必要があります。

## リクエストヘッダー

<ParamField header="Content-Type" type="string" required={true}>
  列挙値: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer 認証形式: Bearer \{\{API Key}}。
</ParamField>

## リクエストボディ

<ParamField body="image_no" type="integer" required={true}>
  画像番号。領域再描画を行う画像を指定するために使用します。

  取り得る値：0\~3
</ParamField>

<ParamField body="task_id" type="string" required={true}>
  元画像生成タスクの一意の識別子。
</ParamField>

<ParamField body="remix_prompt" type="string" required={false}>
  再描画領域のプロンプト。再描画領域に期待する内容を説明するために使用します。

  長さ制限：1-8192 文字。
</ParamField>

<ParamField body="mask" type="object" required={true}>
  描画領域の設定。area パラメータの代替で、複数領域の再描画に対応します。areas と url のいずれか一方を指定します。

  <Expandable title="properties" defaultOpen={false}>
    <ParamField body="url" type="string" required={false}>
      白黒二値画像でポリゴン領域を指定します。複数領域の指定に対応しており、白色領域が再描画領域です。
    </ParamField>

    <ParamField body="areas" type="object[]" required={false}>
      ポリゴン領域の配列。複数領域の指定に対応します。

      <Expandable title="InpaintArea properties" defaultOpen={false}>
        <ParamField body="points" type="number[]" required={true}>
          ポリゴン領域の座標点配列。左上を原点とし、時計回りに、XYXY の形式で構成します。
        </ParamField>

        <ParamField body="width" type="float" required={true}>
          画像のピクセル幅。

          取り得る値：500\~4096
        </ParamField>

        <ParamField body="height" type="float" required={true}>
          画像のピクセル高さ。

          取り得る値：500\~4096
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="area" type="object" required={true}>
  単一のポリゴン領域設定（mask パラメータといずれか一方を使用）。

  <Expandable title="properties" defaultOpen={false}>
    <ParamField body="points" type="number[]" required={true}>
      ポリゴン領域の座標点配列。左上を原点とし、時計回りに、XYXY の形式で構成します。
    </ParamField>

    <ParamField body="width" type="float" required={true}>
      画像のピクセル幅。

      取り得る値：500\~4096
    </ParamField>

    <ParamField body="height" type="float" required={true}>
      画像のピクセル高さ。

      取り得る値：500\~4096
    </ParamField>
  </Expandable>
</ParamField>

## レスポンス情報パラメータ

<ResponseField name="task_id" type="string" required={true}>
  非同期タスクの task\_id。この task\_id を使用して [タスク結果照会 API](/ja/docs/models/reference-get-async-task-result) をリクエストし、生成結果を取得してください
</ResponseField>
