4Z API

Submit Modal

Endpoint: POST https://4zapi.com/mj/submit/modal

Perform local inpainting on a specific region (Vary Region / Inpaint); a mask is required.

Parameters

  • Authorization (header, string): Bearer API Key

Request body (application/json)

  • taskId (string, required): Original task ID
  • botType (string): Bot type ["MID_JOURNEY", "NIJI_JOURNEY"]
  • maskBase64 (string): Mask image Base64 (white areas are the repaint region)
  • notifyHook (string): Callback URL
  • prompt (string): New prompt for local repaint (optional; empty keeps the original)
  • state (string): Custom pass-through state

Request example

{
  "maskBase64": "",
  "prompt": "",
  "taskId": "14001934816969359"
}