Image Generation
Midjourney
Midjourney integration — text-to-image / blend / describe / edit, plus chained upscale / variation / zoom / pan
POST
Midjourney
Midjourney runs through the unified async task endpoint
After submitting, poll
What each chained action requires of its source task:
/v1/tasks. The action field selects the operation, so a single model exposes every capability.
Two kinds of operations:
- Standalone generation — no prior task needed:
imagine(text-to-image),blend(multi-image fusion),describe(image-to-text),edits(full-image rewrite) - Chained operations — rework the output of an earlier task; pass
ref_task_idto reference it:upscale,variation/high-variation/low-variation,reroll(regenerate the grid),zoom(outpaint zoom),pan(directional outpaint),remix-strong/remix-subtle(v8 remix)
imagine and the other generation actions return a 2×2 grid (one image holding 4 frames). To upscale or vary one of those frames, use a chained operation with ref_task_id (the grid task’s task_id) plus index (1-4, picking the frame). See Chained Operations.Pricing
Prices are not listed here — they follow upstream changes, and anything written into the docs drifts out of date.Live prices: the “Model Market” in the console, or the
GET /v1/models endpoint (see Models).
What a call actually cost: every response carries cost / usage.cost — that is the authoritative number.Action Quick Reference
Examples
GET /v1/tasks/{task_id} for status. See Task System for details.
Available Models
Chained Operations
Chained actions rework the output of an earlier task. The two fields that matter areref_task_id and index.
1
Generate a grid first
Call
imagine and keep the task_id from the response (for example task-wave1781770984b950327128). It refers to one 2×2 grid.2
Reference the grid and pick a frame
Chained operations take
ref_task_id (the task_id from the previous step) plus index (1-4: top-left=1, top-right=2, bottom-left=3, bottom-right=4). For example, upscale enlarges frame 2.3
Keep chaining
The single-image task produced by an upscale can itself be the
ref_task_id for zoom or pan, stacking step on step.Common Parameters
string
required
Always
midjourneystring
default:"imagine"
Midjourney is action-driven:
action decides what a call does. These 15 are supported:Starting points (no task_id needed)imagine— text to image, returns a 2×2 grid (default)blend— blend several imagesdescribe— image to prompt
task_id; most also need index for which frame)upscale— upscale one framevariation/high-variation/low-variation— variations, increasing strengthreroll— re-run the same prompt for a new gridzoom— expand outward ·pan— extend in one directioninpaint— repaint a region ·edit— editremix-strong/remix-subtle— re-mix with a new prompt, two strengthsmodal— operations that go through a confirmation step
string
Prompt. Required for
imagine/edits; native MJ flags are supported (e.g. --ar 16:9). Not used by blend/describestring
default:"1:1"
Aspect ratio, such as
1:1 / 16:9 / 9:16 / 2:3 / 3:2 / 4:3 / 3:4 / 21:9 / 9:21string[]
Reference images. 2-4 for
blend, 1 for describe/edits, optional for imagine (image guidance)integer
Random seed
string
Callback URL fired when the task reaches a terminal state (optional, an alternative to polling)
Model-Specific Parameters
string
default:"relax"
Speed tier
relax / fast / turbo. Affects generation speed and billing (see Pricing)integer
Which frame of the 2×2 grid to use (1-4). Required for
upscale/variation/high-variation/low-variation/remix-*string
MJ version:
8.1 / 7 / 6.1 / 5.2 / 5.1string
Quality
--q: 0.25 / 0.5 / 1 / 2string
Elements to exclude,
--noResource Limits
blendtakes 2-4 reference images, each ≤ 12 MiBdescribecomes back quickly (1-3 seconds); the result is text suggestionspanis only supported on v6/v6.1/v7/niji6; removed in v8/v8.1remix-strong/remix-subtleare v8/v8.1 only
Related Docs
- Task System — async submission / polling / callbacks
- Image Generation Overview