Skip to main content
POST
Imagine
You can also submit through the unified task endpoint POST /v1/task/submit with model set to midjourney-imagine and the parameters inside input. Both behave and bill the same.
The response carries a task ID. Fetch the result with Get Task, or pass notify_hook when submitting. When the task succeeds, actions in the result lists what you can do next through Image Actions.

Authorizations

Authorization
string
header
required

Send your API key in the Authorization: Bearer YOUR_API_KEY header.

Body

application/json
prompt
string
required

Prompt: Describe the image; Midjourney parameters are allowed, e.g. a cat in the rain --ar 16:9 --v 7. Optional when images are given.

Maximum string length: 6000
images
string[]

Image Prompts: Up to 5 images used as image prompts. An image URL (publicly reachable) or a base64 data URI, up to 20 MB each.

Maximum array length: 5
speed
enum<string>
default:fast

Speed: relax is cheapest but queues longer; turbo is fastest at 2x price. You can also write --relax / --fast / --turbo in the prompt; this field wins. Defaults to fast.

Available options:
relax,
fast,
turbo
notify_hook
string<uri>

Notify hook: when the task ends, the same content as the fetch result is POSTed to this URL (a public http / https URL). Omit it to poll instead.

Response

OK

task_id
string
required

Task ID.

action
string
required

Action name, e.g. imagine, upscale.

status
enum<string>
required

Task status, see the table above.

Available options:
submitted,
in_progress,
success,
failure
created_at
integer
required

Created at (Unix seconds).