Skip to content

Midjourney task ​

Midjourney uses task-based APIs. Save the task ID after submission, then query status and results. Configure callbacks where possible and retain polling.

Route List ​

MethodologyPathPurpose
POST/mj/submit/imagineSubmit Imagine task.
POST/mj/submit/actionSubmits action task.
POST/mj/submit/blendSubmits a mixed figure task.
POST/mj/submit/describeSubmit description task.
POST/mj/submit/modalSubmit Modal task.
POST/mj/submit/shortenSubmit a prompt-shortening task.
POST/mj/submit/videoSubmit video task.
GET/mj/task/{id}/fetchQuery single task.
POST/mj/task/list-by-conditionBatch query task.
GET/mj/task/{id}/image-seedLook for pictures.

Commit Imagine ​

bash
curl https://moonnexai.com/mj/submit/imagine \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A futuristic city at sunrise --ar 16:9",
    "notifyHook": "https://example.com/moonnexai/webhook"
  }'

Query task ​

bash
curl https://moonnexai.com/mj/task/task_xxx/fetch \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>"

Access Recommendations ​

  • Saves the task ID of the response submission.
  • The same task is treated, etc., to avoid duplication of effort.
  • Saves the final picture URL and original response after task has been completed.
  • When callback fails, the user is allowed to access the results through task queries.

Relevant Pages ​