notify_hook and wait for us to push it.
Basics
Every endpoint page has a playground on the right: enter your API key and parameters to send a request. Playground requests are real and billed as usual.
Call flow
1
Submit a task
Call an endpoint that creates a task, for example Imagine. It returns a
task_id.2
Get the result
Poll Get Task every 3 to 5 seconds until
status becomes success or failure. Or pass notify_hook on submission and we POST the same content as the fetch result when the task ends.3
Keep going
actions in the result lists what you can do next. Call Image Actions with one of them as action. The new task has its own actions, so you can keep chaining.Every endpoint
Submit endpoints live atPOST /midjourney/{name} (names in the first column), and fetching is GET /midjourney/task/{task_id}.
Speed and versions
- Speed:
speedtakesrelax(0.4x the fast price),fast(default) orturbo(2x the fast price). Describe has no speed, and video has no relax. - Version: add a parameter such as
--v 7or--niji 7at the end of the prompt; without one, V8.2 (the current Midjourney default) is used. Follow-up operations keep the version of the original image. - Prompt: Midjourney parameters work as usual, up to 6000 characters; for V8 models, text under 1024 characters always works and longer text may be rejected. See Capabilities and Parameters for each version’s syntax and limits.
Pricing
Each call is billed once, and failed tasks are refunded. Each capability’s price for each speed is in the price table on its model page; multipliers for drafts, HD, video resolution and count are in Capabilities and Parameters.Errors
Errors share one shape, and the HTTP status matches the error type:code | Meaning |
| --- | --- |
| 400 | invalid_request | A parameter is wrong; message says which |
| 400 | unsupported_action | This task doesn’t support the operation; see actions in the fetch result |
| 400 | content_rejected | The prompt or image failed moderation; nothing is charged |
| 401 | unauthorized | Missing or invalid API key |
| 402 / 403 | insufficient_quota | Insufficient balance |
| 404 | task_not_found | The task doesn’t exist or belongs to another account |
| 404 | not_found | Wrong endpoint name |
| 409 | task_not_finished | The task to work on hasn’t succeeded yet |
| 429 | rate_limited / queue_full | Too many requests, or the generation queue is full; retry later |
| 5xx | upstream_error / internal_error | Server-side failure; retrying is fine |
Next steps
Midjourney Quickstart
Generate your first images, fetch them, keep going
Midjourney Capabilities and Parameters
Prompt parameters, follow-up rules, pricing details