Get API Key Get API
Docs

Inpaint

Region inpaint entry (Vary (Region)); after submission the task enters MODAL, then call modal with mask + prompt

Request example

curl --request POST \
  --url https://api.openveer.com/v1/midjourney/generations/inpaint \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "task_id": "task_01KQW0D3WJ2QYJP9E3H7GZ4D2R",
    "speed": "fast"
  }'

Response example

{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KV52C0TEJSYZMCG0NCS4YWKK"
    }
  ]
}

Entry point for region inpaint (equivalent to 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)
nsfw_check boolean — Optional; defaults to false.
Run content moderation before submitting a Midjourney task.
• true: use omni-moderation-latest to review prompts and input images
• false: skip moderation without adding moderation cost or latency
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 matches Vary (Region) from the source task buttons.

Request example

{
  "task_id": "task_01KQW0D3WJ2QYJP9E3H7GZ4D2R",
  "speed": "fast"
}

Follow-up

On success the response returns status: "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.

{
  "task_id": "task_03_inpaint...",
  "status": "modal",
  "model": "midjourney"
}

Notes

  • The parent task must be a SUCCESS upscaled single image; inpainting a grid directly errors — call upscale first.
  • 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.

This documentation is built and hosted on Mintlify, a developer documentation platform.