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

Use the Midjourney outpainting feature to extend generated images outward, expanding the image boundaries while preserving the original image content. This API uses asynchronous processing, so the client needs to query the final generated result using the task\_id.

## Request Headers

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

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format: Bearer \{\{API Key}}.
</ParamField>

## Request Body

<ParamField body="image_no" type="integer" required={true}>
  Image number, used to specify the image to outpaint.

  Value range: 0–3
</ParamField>

<ParamField body="task_id" type="string" required={true}>
  The unique identifier of the original image generation task.
</ParamField>

<ParamField body="remix_prompt" type="string" required={true}>
  Outpainting area prompt, used to describe the content of the extended area.

  Length limit: 1–8192 characters.
</ParamField>

<ParamField body="scale" type="float" required={true}>
  Target outpainting ratio, i.e., the multiple of the area occupied by the new image in the view compared with the original image area.

  Value range: 1.1–2.0

  Example: after outpainting a 1:1 image, extend outward by 20% (`scale=1.2`)
</ParamField>

## Response Parameters

<ResponseField name="task_id" type="string" required={true}>
  The task\_id of the asynchronous task. You should use this task\_id to request the [Get Task Result API](/en/docs/models/reference-get-async-task-result) to obtain the generated result.
</ResponseField>
