v1

latestOpenAPI 3.1.02026-07-2611077199.5 KB

Regional inpainting, equivalent to midjourney's Vary(region) button

post/midjourney/v1/inpaint

Request body

jobIdstring required

Job ID returned from the previous request

maskstring required

Base64-encoded mask for the selected image. The submitted Base64 content must be a black-and-white mask with the same dimensions as the original image. White areas indicate the region to repaint, and black areas indicate the area to preserve. Do not include the data:image/png;base64, prefix.

promptstring

Description of modifications desired for the selected image area

timeoutinteger

Task timeout, unit: seconds, range 300 - 1200

hookUrlstring

Callback notification URL

Response

Request successful

statusstring required
messagestring required
dataobject required

Example response

{
  "status": "SUCCESS",
  "message": "success",
  "data": {
    "jobId": "jobId"
  }
}