midjourney-v8
Midjourney V8 on reAPI — async image generation (4 images per request) with structured MJ parameters, versions v5.1–v8.1 and niji, character/style/depth references, follow-up operations (upscale, variation, zoom, pan, reroll, reshape), and image-to-video.
Midjourney V8 on reAPI. One midjourney model with an action parameter
covering generation, blend, edit, and the upscale / variation / zoom / pan /
reroll / reshape toolkit; a separate midjourney-video model animates a
still into a short clip. Async-first: submit returns a task_id; poll until
ready. See current pricing on the
model page.
Quick example
curl https://reapi.ai/api/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "midjourney",
"prompt": "a serene Japanese garden with cherry blossoms, painterly",
"version": "8.1",
"size": "16:9",
"speed": "fast"
}'import requests
resp = requests.post(
"https://reapi.ai/api/v1/images/generations",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"model": "midjourney",
"prompt": "a serene Japanese garden with cherry blossoms, painterly",
"version": "8.1",
"size": "16:9",
"speed": "fast",
},
timeout=30,
)
task_id = resp.json()["data"][0]["task_id"]const resp = await fetch('https://reapi.ai/api/v1/images/generations', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'midjourney',
prompt: 'a serene Japanese garden with cherry blossoms, painterly',
version: '8.1',
size: '16:9',
speed: 'fast',
}),
});
const { data } = await resp.json();body := strings.NewReader(`{
"model": "midjourney",
"prompt": "a serene Japanese garden with cherry blossoms, painterly",
"version": "8.1",
"size": "16:9",
"speed": "fast"
}`)
req, _ := http.NewRequest("POST", "https://reapi.ai/api/v1/images/generations", body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)Generation is asynchronous. The call returns a task_id; poll
GET /api/v1/tasks/:task_id until status is completed, then read the
image URLs. Generation returns 1–4 images (content review may filter some)
and is billed once per request.
Endpoint
POST https://reapi.ai/api/v1/images/generations # midjourney (image)
POST https://reapi.ai/api/v1/videos/generations # midjourney-video
GET https://reapi.ai/api/v1/tasks/:task_id| Header | Value |
|---|---|
Authorization | Bearer YOUR_API_KEY |
Content-Type | application/json |
reAPI accepts only public http(s) URLs for every media input
(image_urls, cref, sref, dref, mask_url, …) — never base64 or
data: URIs.
Operations — action
midjourney runs one operation per request, selected by action (default
imagine). All share the images endpoint.
action | Operation | References a prior task? |
|---|---|---|
imagine | Text-to-image / image-to-image | — |
blend | Fuse 2–4 images | — |
edits | Rewrite an image from a prompt | — |
upscale | Upscale one tile | yes (task_id + index) |
variation | Variations of one tile | yes |
high_variation | Strong variation | yes |
low_variation | Subtle variation | yes |
reroll | Re-roll the whole grid | yes (task_id) |
zoom | Zoom out / outpaint | yes |
pan | Extend the canvas directionally | yes |
remix_strong | Strong reshape (v8 / v8.1) | yes (task_id + index) |
remix_subtle | Subtle reshape (v8 / v8.1) | yes |
The parent-referencing actions take the reAPI task_id of a completed
midjourney task plus index (1–4) to pick which grid image to act on.
reAPI resolves your task id to the upstream reference automatically.
Generate — action: "imagine"
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
model | string | yes | — | midjourney |
action | string | no | imagine | Operation selector |
prompt | string | yes | — | Image description |
image_urls | string[] | no | — | Image-to-image reference(s) |
speed | string | no | relax | relax / fast / turbo |
The structured parameters below are the JSON form of Midjourney's native
--flags. You may also type the flags into prompt; a body field overrides
the matching flag. Ranges mirror Midjourney exactly.
| Field | Flag | Range / values | Notes |
|---|---|---|---|
size | --ar | e.g. 16:9, 1:1, 9:16 | Aspect ratio |
quality | --q | 0.25 / 0.5 / 1 / 2 | Render quality |
style | --style | e.g. raw | Style preset |
version | --v | 8.1 / 7 / 6.1 / 5.2 / 5.1 | Model version |
seed | --seed | integer | Reproducible seed |
negative_prompt | --no | keywords | What to avoid |
stylize | --s | 0–1000 | Stylization strength |
chaos | --c | 0–100 | Grid variety |
weird | --w | 0–3000 | Unconventional degree |
tile | --tile | boolean | Seamless tile |
niji | --niji | boolean | Anime model (pair with version 7 / 6) |
iw | --iw | 0–3 | Image-prompt weight |
cw | --cw | 0–100 | Character-reference weight |
sw | --sw | 0–1000 | Style-reference weight |
cref | --cref | URL | Character reference |
sref | --sref | URL | Style reference |
dref | --dref | URL | Depth reference |
dw | --dw | 0–100 | Depth-reference weight |
repeat | --repeat | 2–40 | Repeat the prompt |
raw | --raw | boolean | Raw mode (v5.1+) |
draft | --draft | boolean | Draft mode (v7+) |
hd | --hd | boolean | HD (v8 / v8.1) |
stop | --stop | 10–100 | Stop early (v5–6.1 / niji 5–6) |
extra | any --xxx | string | Appended to the prompt verbatim |
metadata | — | object | Opaque, stored with the task |
Online-verified versions: 8.1, 7, 6.1, 5.2, 5.1, plus niji 7 / niji 6
(set niji: true with version: "7" or "6"). The version does not change
the price.
Follow-up operations
All follow-ups share the images endpoint and the async task_id lifecycle.
Common fields: task_id (required, a completed midjourney task), index
(1–4, which grid image), speed, custom_id (advanced — a button id from the
source task, bypassing index auto-match).
action | Extra fields | Notes |
|---|---|---|
upscale | index | custom_id | Upscale one tile |
variation / high_variation / low_variation | index | custom_id | Variation strength differs |
reroll | — | Re-rolls the whole grid (no index) |
zoom | index; zoom_ratio | Below 2 = 1.5× outpaint, 2 and up = 2× custom zoom |
pan | index; direction | custom_id | direction: left / right / up / down |
remix_strong / remix_subtle | index (required); prompt | v8 / v8.1 only |
blend takes image_urls (2–4) and an optional dimensions
(SQUARE / PORTRAIT / LANDSCAPE). edits takes prompt + image_urls
plus the same structured params as imagine.
Example — upscale tile 1 of a prior generation:
{
"model": "midjourney",
"action": "upscale",
"task_id": "task_xxx",
"index": 1
}Image-to-video — midjourney-video
Animate a still into a short (~5 second) clip on the videos endpoint.
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
model | string | yes | — | midjourney-video |
image_urls | string[] | yes | — | Start frame (exactly one URL) |
prompt | string | no | — | Optional guidance |
video_type | string | no | vid_1.1_i2v_480 | vid_1.1_i2v_480 / _720 / _start_end_480 / _start_end_720 |
motion | string | no | high | low / high |
batch_size | integer | no | 1 | 1 / 2 / 4 (clips returned) |
end_url | string | no | — | End frame (upgrades to a start-end type) |
Pricing
midjourney bills per request (a 4-image grid for generation; one image
for upscale and the like). The bill depends only on:
- Operation tier — generation vs every other image action.
- Speed —
relax/fast/turbo. The model version never changes the price.
midjourney-video bills per resolution (480p / 720p) × batch_size.
Integer credits, 1 credit = $0.001:
credits = ceil(request_price_usd × 1000) # midjourney
credits = ceil(clip_price_usd × batch_size × 1000) # midjourney-videoSee the model page for current rates.
Output
Poll GET /api/v1/tasks/:task_id. On completed:
{
"id": "task_xxx",
"status": "completed",
"output": { "image_urls": ["https://cdn.reapi.ai/.../0.png", "https://cdn.reapi.ai/.../1.png"] }
}output.image_urls holds 1–4 URLs (content review may filter some).
midjourney-video returns output.video_urls. Save them promptly.
Errors
Customer-facing errors use the standard envelope
{ error: { code, message, request_id } }. Common cases:
| Situation | Code |
|---|---|
| Prompt rejected by content review | CONTENT_POLICY_VIOLATION |
| Malformed / out-of-range request | INVALID_REQUEST |
| Referenced task not found / not yours / not completed | INVALID_REQUEST |
| Insufficient credits | INSUFFICIENT_CREDITS |
| Upstream generation failed | UPSTREAM_ERROR |
See the full catalog at /docs/api/errors.
Tips
- Generate with
imaginefirst, then chainupscale/variation/zoom/pan/remix_strongoff the returnedtask_id— no re-upload needed. - A body field overrides the matching
--flagin the prompt, so pick one. relaxis the cheapest and the default;fast/turboonly change queue priority and price, not the visual result.remix_strong/remix_subtlerequire a v8 / v8.1 parent; use the variation actions for older versions.- All references (
cref/sref/dref, blend inputs) must be public http(s) URLs.