midjourney-v7
Midjourney V7 on reAPI — async image generation (4 images per request) with native MJ syntax, Omni Reference, Style Reference, and eleven edit operations (upscale, variation, remix, inpaint, outpaint, pan, enhance, retexture, canvas edit, remove background).
Midjourney V7 on reAPI. Four images per request, native MJ prompt
syntax (--ar, --s, --chaos, --sref, --oref, …), and eleven edit
operations that chain off any generated image. 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 rk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "mj-v7",
"prompt": "a serene Japanese garden with cherry blossoms --ar 16:9 --s 500",
"model_params": { "speed": "fast" }
}'import requests
resp = requests.post(
"https://reapi.ai/api/v1/images/generations",
headers={
"Authorization": "Bearer rk_live_xxx",
"Content-Type": "application/json",
},
json={
"model": "mj-v7",
"prompt": "a serene Japanese garden with cherry blossoms --ar 16:9 --s 500",
"model_params": {"speed": "fast"},
},
timeout=30,
)
task_id = resp.json()["id"]const resp = await fetch('https://reapi.ai/api/v1/images/generations', {
method: 'POST',
headers: {
Authorization: 'Bearer rk_live_xxx',
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'mj-v7',
prompt: 'a serene Japanese garden with cherry blossoms --ar 16:9 --s 500',
model_params: { speed: 'fast' },
}),
});
const { id } = await resp.json();body := strings.NewReader(`{
"model": "mj-v7",
"prompt": "a serene Japanese garden with cherry blossoms --ar 16:9 --s 500",
"model_params": { "speed": "fast" }
}`)
req, _ := http.NewRequest("POST", "https://reapi.ai/api/v1/images/generations", body)
req.Header.Set("Authorization", "Bearer rk_live_xxx")
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. Each request returns 1–4 images (content review may filter
some) and is billed once per request.
Endpoint
POST https://reapi.ai/api/v1/images/generations
GET https://reapi.ai/api/v1/tasks/:task_id| Header | Value |
|---|---|
Authorization | Bearer rk_live_xxx |
Content-Type | application/json |
reAPI accepts only public http(s) image URLs for every image input —
never base64 or data: URIs. For image-to-image, place the URL at the start
of the prompt; for the direct-image edits, pass it in image_urls.
Models
The family is one base generator plus eleven edit operations. Each is a
separate model id on the same endpoint.
model | Operation | References a prior task? |
|---|---|---|
mj-v7 | Text-to-image / image-to-image | — |
mj-v7-variation | Subtle/strong variations | yes (task_id + image_number) |
mj-v7-upscale | Upscale one image | yes |
mj-v7-remix | Re-prompt an image | yes |
mj-v7-enhance | Enhance a draft image | yes (draft tasks only) |
mj-v7-pan | Extend the canvas directionally | yes |
mj-v7-outpaint | Zoom out / extend the frame | yes |
mj-v7-inpaint | Repaint a masked region | yes |
mj-v7-edit | Canvas edit (reposition + fill) | yes |
mj-v7-remove-bg | Remove background | no (image_urls) |
mj-v7-retexture | Re-texture / restyle | no (image_urls) |
mj-v7-upload-paint | Upload + masked repaint | no (image_urls) |
The eight parent-referencing edits take the reAPI task_id of a completed
Midjourney V7 generation in model_params.task_id, plus
model_params.image_number (0–3) to pick which of the four grid images to act
on. reAPI resolves your task id to the upstream reference automatically.
Base generation — mj-v7
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
model | string | yes | — | mj-v7 |
prompt | string | yes | — | Native MJ syntax, ≤ 8192 chars. Image-to-image: place public image URL(s) at the start. A single image with no text is rejected. |
model_params.speed | string | no | fast | draft / fast / turbo |
Native MJ parameters are written inside the prompt, not as JSON fields:
| Flag | Range | Default | Meaning |
|---|---|---|---|
--ar W:H | any ratio | 1:1 | Aspect ratio |
--s | 0–1000 | 100 | Stylize |
--chaos / --c | 0–100 | 0 | Variation spread |
--no | keywords | — | Negative prompt |
--seed | 0–4294967295 | random | Reproducible seed |
--weird / --w | 0–3000 | 0 | Unconventional degree |
--exp | 0–100 | 0 | Experimental aesthetic (V7) |
--raw | flag | off | Disable default beautification |
--tile | flag | off | Seamless tile |
--sref [URL] | URL | — | Style Reference |
--sw | 0–1000 | 100 | Style weight |
--sv | 1–6 | 4 | Style version |
--oref [URL] | URL | — | Omni Reference (doubles cost) |
--ow | 1–1000 | 100 | Omni Reference weight |
--iw | 0–3 | 1 | Image-prompt weight |
--v / --version / --niji are ignored (the version is locked to V7).
Speed is set via model_params.speed, not a prompt flag.
Edit operations
All edits share the endpoint and the async task_id lifecycle. speed
(where present) is fast / turbo (default fast).
Parent-referencing edits
Common model_params: task_id (required, the reAPI task id of a completed
Midjourney V7 generation), image_number (0–3, default 0).
model | Extra model_params | Top-level prompt |
|---|---|---|
mj-v7-variation | type: subtle | strong (default subtle); speed | optional |
mj-v7-upscale | type: standard | creative (default standard) | — |
mj-v7-remix | mode: strong | subtle (default strong); speed | required |
mj-v7-enhance | — (parent must be a draft task) | — |
mj-v7-pan | direction: down | right | up | left (default down); scale 1.1–3 (default 1.5); speed | optional |
mj-v7-outpaint | scale 1.1–2 (default 1.5); speed | optional |
mj-v7-inpaint | mask (required); speed | optional |
mj-v7-edit | canvas (required); img_pos (required); mask (optional); speed | required |
mask is one of two shapes (mutually exclusive):
{ "mask": { "areas": [ { "width": 200, "height": 200, "points": [50,50,50,250,250,250,250,50] } ] } }{ "mask": { "url": "https://example.com/mask.png" } }points is a flat [x1,y1,x2,y2,…] closed polygon; for the URL form, white =
repaint region, black = preserve. canvas is width / height (px);
img_pos is width / height / x / y (placement of the source image on
the canvas).
Example — upscale image 0 of a prior generation:
{
"model": "mj-v7-upscale",
"model_params": { "task_id": "task_xxx", "image_number": 0, "type": "standard" }
}Direct-image edits
These take the source image in image_urls (exactly one public http(s) URL)
and do not reference a prior task.
model | Required | model_params |
|---|---|---|
mj-v7-remove-bg | image_urls | — |
mj-v7-retexture | prompt, image_urls | speed (optional) |
mj-v7-upload-paint | prompt, image_urls | mask (required), canvas (required), img_pos (required), speed |
Pricing
Midjourney V7 bills per request (four images), not per image. Cost scales with:
- Speed tier —
draft<fast<turbo. - Operation — base generation and lightweight edits (remove-bg, pan, outpaint, enhance) cost less than heavy edits (upscale, variation, remix, inpaint, canvas edit, retexture, upload-paint).
--oref— Omni Reference in the prompt doubles the cost.
Integer credits, 1 credit = $0.001:
credits = ceil(request_price_usd × 1000)where request_price_usd is the (model, speed) rate, doubled when the prompt
carries --oref. See 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 of the
four). 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
- A single reference image with no text is rejected — add a short description.
- Use
--oreffor subject consistency and--sreffor style transfer; they combine.--orefdoubles the bill, so reserve it for shots that need it. - Generate with
mj-v7first, then chainmj-v7-upscale/mj-v7-variation/mj-v7-inpaintoff the returnedtask_id— no re-upload needed. mj-v7-enhanceonly accepts a parent created withspeed: "draft".- Keep the version implicit —
--v/--nijiare ignored on V7.