Midjourney task Query
Midjourney task queries are used to read the task status, a bulk task list, and pictures seed. When task is submitted, please keep searching with task ID as the primary key until task becomes final.
Route List
| Methodology | Path | Purpose |
|---|---|---|
GET | /mj/task/{id}/fetch | Query single task. |
POST | /mj/task/list-by-condition | Batch query task. |
GET | /mj/task/{id}/image-seed | Look for pictures. |
Query list task
bash
curl https://moonnexai.com/mj/task/task_xxx/fetch \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>"Status Processing
| Status | Treatment |
|---|---|
| Queue or execute | Continue polling, or wait for callback notification. |
| Completed | Saves the final picture URL, task ID and original response. |
| Failed | Records the error information and allows the user to change the programt and try again. |
| Not found | Checks if task ID is saved correctly and avoids cross-user reading. |
Access Recommendations
- Saves task ID, user ID, business order and submission parameters together.
- callback and polling may arrive sequentially. Please use task ID to merge, etc.
- task displays the error information when it fails and maintains the re-submittal portal.