Skip to main content
POST
/
midjourney
/
v1
/
inpaint
cURL
curl --request POST \
  --url https://api.ttapi.io/midjourney/v1/inpaint \
  --header 'Content-Type: application/json' \
  --header 'TT-API-KEY: <api-key>' \
  --data '
{
  "jobId": "<string>",
  "mask": "<string>",
  "prompt": "<string>",
  "timeout": "300",
  "hookUrl": "<string>"
}
'
{
  "status": "SUCCESS",
  "message": "success",
  "data": {
    "job_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.ttapi.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

TT-API-KEY
string
header
required

You can obtain your API key from the TTAPI Dashboard.

Body

application/json
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

Example:

"300"

hookUrl
string

Callback notification URL

Response

Request successful

status
string
required
Example:

"SUCCESS"

message
string
required
Example:

"success"

data
object
required
Example:
{
"job_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
Last modified on March 21, 2026