/midjourney/imagine generates, /midjourney/blend blends, /midjourney/video animates, and so on. Operations on existing images, such as upscale and variation, all go through /midjourney/action. You submit, get a task ID, then fetch the result. This page walks you through your first set of images.
Generate your first images
Write the prompt the way you would in Midjourney. Parameters such as--ar, --sref, and --niji go straight into it.
bash
If the prompt doesn’t name a version,
--v 8.2 (the current Midjourney default) is added. The returned prompt is exactly what was submitted.Collect the result
Generation is asynchronous. Fetch the task by its ID:status moves through submitted (queued), in_progress (generating), then success or failure. In fast mode a set of images usually takes about a minute. When it’s done:
imagesholds four separate images, not a stitched grid. Download and use them directly.- On failure
statusisfailure, the reason is infail_reason, and the charge is refunded.
notify_hook (your receiving URL) when you submit. When the task finishes we POST the same body the fetch endpoint returns.
Keep going
actions lists the operations you can run next on this task. Call /midjourney/action with one of them as action, plus task_id; to work on one image, also pass index (which image, starting at 1):
actions, so you can keep chaining: upscale image 2, zoom out on the upscaled image, then turn it into a video.
Choose a speed
Pick a speed with thespeed parameter. The default is fast:
--relax, --fast, or --turbo in the prompt as you would in Midjourney. If both are present, the speed parameter wins. Video endpoints don’t support relax.
Choose a version
Add a version parameter at the end of the prompt; without one, V8.2 is used:edit supports V8.1 and V8.2 only (V8.2 by default), and retexture supports V7 and V6 only. Follow-up operations such as upscale and variation keep the version of the original image.
Two ways to call
The examples above call the endpoints directly. If you already use the unified task API, the model name ismidjourney- plus the action name (for example midjourney-imagine, midjourney-upscale), and the parameters go in input without action:
/midjourney/action, and the other way around. Billing is identical.
Next
Midjourney Capabilities and Parameters
Every endpoint, prompt parameters, video, and billing