Inpaint
Region inpaint entry (Vary (Region)); after submission the task enters MODAL, then call modal with mask + prompt
전체 문서POST
/v1/midjourney/generations/inpaint{
"error": {
"code": 500,
"message": "Internal server error. Please try again later",
"type": "server_error"
}
}{
"error": {
"code": 502,
"message": "Bad gateway. The server is temporarily unavailable",
"type": "bad_gateway"
}
}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 |
요청 예시
curl --request POST \
--url https://api.apisea.ai/v1/midjourney/generations/inpaint \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"task_id": "task_01KQW0D3WJ2QYJP9E3H7GZ4D2R",
"speed": "fast"
}'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
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.
응답
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01KV52C0TEJSYZMCG0NCS4YWKK"
}
]
}이 문서에서 문제를 발견하셨나요? support@apisea.ai(으)로 이메일을 보내주세요.