Midjourney
Inpaint
Region inpaint entry (Vary (Region)); after submission the task enters MODAL, then call modal with mask + prompt
POST
Vary (Region)). After submission the task enters the MODAL state; you must then call modal with a mask + prompt to finish.
| Item | Value |
|---|---|
| action | INPAINT |
| Billing | midjourney@inpaint[-version][-speed] |
| Required | task_id, or task_id + custom_id |
| Optional | index, speed, metadata |
Parameters
| Field | Description |
|---|---|
task_id | Source task ID (typically an Upscale single-image task) |
custom_id | Optional; button ID for the corresponding Vary (Region) action |
index | Optional; which image of the parent task (1–4, default 1); usually unnecessary for a single image |
speed | relax / fast / turbo |
metadata | Optional custom metadata |
Auto matching
The service matchesVary (Region) from the source task buttons.
Request example
Follow-up
On success the response returnsstatus: "modal" — this is a valid non-terminal state, not an error. Continue with the modal endpoint, where task_id is the local task ID returned by inpaint, plus prompt and optional mask_url.
Notes
- The parent task must be a SUCCESS upscaled single image; inpainting a grid directly errors — call
upscalefirst. - After entering MODAL you must call modal within 30 minutes, otherwise the backend auto-cancels and refunds.
- Version metadata from the source task is inherited automatically. To price by speed, configure
midjourney@inpaint-fast/midjourney@inpaint-turbo.