---
title: "POST /midjourney/v1/inpaint"
method: POST
path: "/midjourney/v1/inpaint"
---

# POST /midjourney/v1/inpaint

`POST /midjourney/v1/inpaint`

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

## Request body

- InpaintRequest
  - `jobId` string, required — Job ID returned from the previous request
  - `mask` string, 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.
  - `prompt` string — Description of modifications desired for the selected image area
  - `timeout` integer — Task timeout, unit: seconds, range 300 - 1200
  - `hookUrl` string — Callback notification URL

## Response `200`

Request successful

- object
  - `status` string, required
  - `message` string, required
  - `data` object, required

## Other responses

- `400` — Parameter error
- `401` — Authorization failed

---

[API](https://skmtc.net/ttapi/apis/flowmusic-api-docs.md) · [All operations](https://skmtc.net/ttapi/apis/flowmusic-api-docs/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ttapi/flowmusic-api-docs/versions/f27f8a59dbd0/schema)
