- Get Started
- Endpoints
- Flux
- AI Hug
- LLM
- Midjourney
- Faceswap
- TTS
- Song(Suno+Udio)
- Trellis
- Luma Dream Machine
- Kling
- Hailuo
- Skyreels
- WanX
- Hunyuan Video
- PiAPI Account Management
- Mmaudio
- DiffRhythm
- Tools
- Resources
- Legacy Documentation
- Midjourney
- Face Swap
- Dream Machine
- Kling
Inpaint
POST
https://api.piapi.ai/mj/v2/inpaint
legacy/Midjourney
Vary (Region)
command from the offical Midjourney.Request
Header Params
X-API-Key
string
required
Example:
{{x-api-key}}
Body Params application/json
origin_task_id
string
required
mask
string
required
prompt
string
optional
skip_prompt_check
boolean
optional
webhook_endpoint
string
optional
webhook_secret
string
optional
Example
{
"origin_task_id": "222fea1d***************dd1957e18dae",
"prompt": "mirror",
"skip_prompt_check": false,
"mask": "UklGRuoVAABXRUJQVl****************************************************************************u5kemQMX7Up9QGQYYFzbZAAAAA",
"webhook_endpoint": "",
"webhook_secret": ""
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.piapi.ai/mj/v2/inpaint' \
--header 'X-API-Key: {{x-api-key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"origin_task_id": "222fea1d***************dd1957e18dae",
"prompt": "mirror",
"skip_prompt_check": false,
"mask": "UklGRuoVAABXRUJQVl****************************************************************************u5kemQMX7Up9QGQYYFzbZAAAAA",
"webhook_endpoint": "",
"webhook_secret": ""
}'
Responses
🟢200OK
application/json
Body
task_id
string
optional
status
string
optional
message
string
optional
Example
{
"task_id": "b2fb598a***************817b83714392",
"status": "success",
"message": ""
}
🟠400Bad Request
🟠401Unauthorized
🔴500Server Error
Modified at 2024-09-24 02:23:40