4Z API

Submit Imagine Task

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

Official docs: https://docs.midjourney.com/hc/en-us/articles/32023408776205-Prompt-Basics

Generate images from a text prompt; supports reference images (base64Array) and multiple bot types.

Parameters

  • Authorization (header, string): Bearer API Key

Request body (application/json)

  • prompt (string, required): Image description prompt; supports native Midjourney parameters (e.g. `--ar 16:9 --v 6.1`)
  • accountFilter (object): Account filter criteria (optional)
  • base64Array (array<string>): List of reference image Base64 strings, format `data:image/png;base64,...`, up to 5 images
  • botType (string): Bot type; NIJI is suited for anime style ["MID_JOURNEY", "NIJI_JOURNEY"]
  • notifyHook (string): Callback URL when the task completes (Webhook)
  • state (string): Passthrough state field, returned as-is in the callback

Request example

{
  "base64Array": [],
  "botType": "MID_JOURNEY",
  "notifyHook": "",
  "prompt": "cat",
  "state": ""
}