Skip to main content
POST
/
v3
/
async
/
mj-outpaint
Midjourney Outpainting
curl --request POST \
  --url https://api.highwayapi.ai/v3/async/mj-outpaint \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "image_no": 123,
  "task_id": "<string>",
  "remix_prompt": "<string>",
  "scale": 123
}
'
{
  "task_id": "<string>"
}
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

Content-Type
string
required
Enum value: application/json
Authorization
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

image_no
integer
required
Image number, used to specify the image to outpaint.Value range: 0–3
task_id
string
required
The unique identifier of the original image generation task.
remix_prompt
string
required
Outpainting area prompt, used to describe the content of the extended area.Length limit: 1–8192 characters.
scale
float
required
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.0Example: after outpainting a 1:1 image, extend outward by 20% (scale=1.2)

Response Parameters

task_id
string
required
The task_id of the asynchronous task. You should use this task_id to request the Get Task Result API to obtain the generated result.