Skip to main content
POST
Midjourney Inpaint
Use the Midjourney Inpaint feature to repaint a specified region of a generated image. Supports specifying the repaint region via polygon areas or black-and-white mask images. This endpoint uses async processing; the client needs to query the final result using the task_id.

Request Headers

string
required
Enum: application/json
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

integer
required
Image number, used to specify which image to inpaint.Range: 0~3
string
required
The unique identifier of the original image generation task.
string
Inpaint region prompt, used to describe the desired content for the repainted region.Length limit: 1-8192 characters.
object
required
Repaint region configuration, replaces the area parameter, and supports multi-region inpainting. Choose either areas or url.
object
required
Single polygon region configuration (use either this or the mask parameter).

Response

string
required
The task_id of the async task. Use the task_id to call the Get Async Task Result API to retrieve the generated result.