Midjourney 8.2 API
Midjourney 8.2 images from a description and from your photos: moving a person or an object into a new scene, editing a photo with words. A grid of four variants, image prompts and style samples. The previous version 8.1 is available too.
For AI assistants:Download .mdAll documentation .mdOpen as text
Connect in three steps
- Get a keyCreate a key in the dashboard after you confirm your email. One key opens every model.
- Check the pricePOST /v1/price shows the cost of a run in advance, without charging you.
- Run a task and collect the resultPOST /v1/tasks starts a task, GET /v1/tasks/{id} shows its status and files.
Ready-to-use code
Replace YOUR_API_KEY with your key. The code starts a task and waits for the result. In cURL, repeat the second request with the id from the first response instead of TASK_ID until status becomes succeeded.
curl -X POST "https://api.cyhub.ai/v1/tasks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"model": "midjourney",
"settings": {
"version": "8.2",
"prompt": "A cozy reading nook by a rainy window, warm lamp light, film photo",
"aspect_ratio": "3:2",
"speed": "fast",
"stylization": 250
}
}'
curl "https://api.cyhub.ai/v1/tasks/TASK_ID" \
-H "Authorization: Bearer YOUR_API_KEY"import time
import requests
API = "https://api.cyhub.ai/v1"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
body = {
"model": "midjourney",
"settings": {
"version": "8.2",
"prompt": "A cozy reading nook by a rainy window, warm lamp light, film photo",
"aspect_ratio": "3:2",
"speed": "fast",
"stylization": 250,
},
}
response = requests.post(f"{API}/tasks", json=body, headers=HEADERS, timeout=60)
response.raise_for_status()
task = response.json()
while task["status"] in ("queued", "running"):
time.sleep(5)
task = requests.get(f"{API}/tasks/{task['id']}", headers=HEADERS, timeout=30).json()
print(task["status"], task["result"])const API = "https://api.cyhub.ai/v1";
const HEADERS = { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" };
const body = {
"model": "midjourney",
"settings": {
"version": "8.2",
"prompt": "A cozy reading nook by a rainy window, warm lamp light, film photo",
"aspect_ratio": "3:2",
"speed": "fast",
"stylization": 250
}
};
async function main() {
let response = await fetch(`${API}/tasks`, { method: "POST", headers: HEADERS, body: JSON.stringify(body) });
if (!response.ok) throw new Error(await response.text());
let task = await response.json();
while (task.status === "queued" || task.status === "running") {
await new Promise((resolve) => setTimeout(resolve, 5000));
response = await fetch(`${API}/tasks/${task.id}`, { headers: HEADERS });
task = await response.json();
}
console.log(task.status, task.result);
}
main();Price before the run
Prices as of 15.10.2026: from 3 ₽. POST /v1/price shows the exact price of your settings.
| Mode | Price |
|---|---|
| Midjourney 8.2 | from 3 ₽ |
Send the same settings to POST /v1/price: the response shows the price of the run without charging you.
curl -X POST "https://api.cyhub.ai/v1/price" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"model": "midjourney",
"settings": {
"version": "8.2",
"prompt": "A cozy reading nook by a rainy window, warm lamp light, film photo",
"aspect_ratio": "3:2",
"speed": "fast",
"stylization": 250
}
}'amount_minor: the price of the run in minor units (kopecks for rubles)currency: the wallet currencyavailable_minor: how much your balance has for new tasks right now
Midjourney 8.2
The main versions: 8.2 by default, 8.1 the previous one. They also move a person or an object from a photo into a new scene and edit a photo with words (edit_images), at the price of a regular image.
Value of the version field: 8.2 8.1
Price in this mode from 3 ₽.
Parameters
Model parameters go inside settings. Omitted optional fields take their default values.
promptRequiredWhat to draw. Plain text only: Midjourney parameters (--ar, --v and others), links and options in curly braces are not accepted, there are fields for the settings and pictures. Versions 8.2 and 8.1 shorten a description longer than about 1000 characters before generating, version 7 takes the whole text.
Type: StringMinimum characters: 1Maximum characters: 6000aspect_ratioOptionalAspect ratio: width and height as whole numbers with a colon, digits only and no spaces, for example 1:1, 16:9, 9:16, 4:5, 2:3, 21:9.
Type: StringMaximum characters: 11Default:"1:1"speedOptionalSpeed. Relaxed is cheaper but waits in a queue, Fast is quicker and costs more. The price depends on it.
Type: StringAllowed values:relaxedfastDefault:"relaxed"stylizationOptionalHow artistic: 0 sticks to the description, 1000 adds the most beauty but drifts from the description. Not set: 100.
Type: IntegerMinimum: 0Maximum: 1000chaosOptionalHow different the four pictures are: 0 similar, 100 the most different.
Type: IntegerMinimum: 0Maximum: 100weirdnessOptionalWeirdness: 0 an ordinary picture, 3000 surrealism and abstraction.
Type: IntegerMinimum: 0Maximum: 3000raw_modeOptionalWithout Midjourney artistic processing: the result is closer to an ordinary photo.
Type: BooleanDefault:falsetileOptionalA seamless pattern that repeats in every direction: wallpapers, fabrics, backgrounds.
Type: BooleanDefault:falseseedOptionalThe starting number. The same number and description give a similar result. Not set: random.
Type: IntegerMinimum: 0Maximum: 4294967295exclusionsOptionalWhat must not be in the picture, words separated by commas, for example: text, people, blur.
Type: StringMaximum characters: 500image_promptsOptionalImage prompts: Midjourney takes the subject, composition and colors from them. Up to 4 URLs.
Type: List (String, uri)Maximum items: 4iwOptionalStrength of the image prompts: 0 barely matter, 3 the strongest. Not set: 1. Works only together with image prompts.
Type: NumberMinimum: 0Maximum: 3style_ref_imagesOptionalStyle samples: the manner, colors and mood carry over, but not the objects. Up to 3 URLs.
Type: List (String, uri)Maximum items: 3sref_codeOptionalA Midjourney style code, digits only, for example 123456789. Can go together with style samples.
Type: StringswOptionalStyle strength: 0 barely matters, 1000 the strongest. Not set: 100. Works only together with style samples or a style code.
Type: IntegerMinimum: 0Maximum: 1000enable_translationOptionalTranslate the description into English before generating. If the translation fails or contains parameters, links or options in braces, the original description goes instead.
Type: BooleanDefault:falseedit_imagesOptionalPhotos Midjourney draws a new picture from: it moves a person, a character or an object into a new scene, changes the clothes or the background, shows it from another side, puts several photos together in one scene. Say what to do in prompt. Up to 4 URLs. The proportions of the result come from aspect_ratio, not from the photos. Does not go together with tile.
Type: List (String, uri)Maximum items: 4
Parameters not listed here are not accepted: the response is 422 unknown_setting.
The API sets these settings itself, do not send them: plain_text = true rework_button = false
Input
- Pictures are URLs of JPEG, PNG or WebP files up to 10 MB each, a picture for the mask edit must be a PNG. A link must open without signing in and without redirects.
- The description and exclusions are plain text only: no Midjourney parameters, links or options in curly braces. Settings and pictures are set with fields.
| Field | Accepts | Formats | Files | File size up to |
|---|---|---|---|---|
image_prompts | Images | jpeg, jpg, png, webp | 4 | 10 MB |
style_ref_images | Images | jpeg, jpg, png, webp | 3 | 10 MB |
edit_images | Images | jpeg, jpg, png, webp | 4 | 10 MB |
Request example
Send this JSON to POST /v1/tasks with your API key. To check the price first, send the same JSON to POST /v1/price.
An image from a description
{
"model": "midjourney",
"settings": {
"version": "8.2",
"prompt": "A cozy reading nook by a rainy window, warm lamp light, film photo",
"aspect_ratio": "3:2",
"speed": "fast",
"stylization": 250
}
}A description in Russian with translation
{
"model": "midjourney",
"settings": {
"version": "8.2",
"prompt": "Рыжий кот спит на подоконнике, за окном вечерний город",
"aspect_ratio": "4:5",
"enable_translation": true,
"exclusions": "text, watermark"
}
}An image in the style of a sample
{
"model": "midjourney",
"settings": {
"version": "8.2",
"prompt": "A lighthouse on a cliff at dusk, waves crashing below",
"aspect_ratio": "16:9",
"style_ref_images": [
"https://example.com/style-sample.jpg"
],
"sw": 300
}
}A person from a photo in a new scene
{
"model": "midjourney",
"settings": {
"version": "8.2",
"prompt": "Make this woman wear a red silk gown on a seaside terrace at sunset, full body",
"aspect_ratio": "2:3",
"raw_mode": true,
"edit_images": [
"https://example.com/person.jpg"
]
}
}Editing a photo with words
{
"model": "midjourney",
"settings": {
"version": "8.2",
"prompt": "Make the jacket yellow and turn the background into a snowy forest",
"aspect_ratio": "4:5",
"edit_images": [
"https://example.com/photo.jpg"
]
}
}The price is calculated when the task is accepted, currency RUB.
Output
- Four JPEG pictures per run, each as a separate file.
- With Fast the result usually comes in about a minute, Relaxed waits in a queue longer.
- Upscaling and variations of finished pictures are only available in the bot.
| Kind | Formats | How many | Note |
|---|---|---|---|
image | jpg | 4 |
A finished task as GET /v1/tasks/{id} returns it (some fields left out). The caption may sit on the task or on a single file and may be empty; the model picks the file name.
{
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"status": "succeeded",
"finished_at": "2026-10-01T12:03:41+00:00",
"result": {
"caption": "Caption of the result: the model and its settings",
"texts": [],
"files_expire_at": "2026-10-08T12:03:41+00:00",
"files_expired": false,
"artifacts": [
{
"index": 0,
"kind": "image",
"filename": "image.jpg",
"size": 1843200,
"caption": "",
"download_path": "/v1/tasks/7c9e6679-7425-40de-944b-e07fc1f90ae7/artifacts/0"
},
{
"index": 1,
"kind": "image",
"filename": "image.jpg",
"size": 1843200,
"caption": "",
"download_path": "/v1/tasks/7c9e6679-7425-40de-944b-e07fc1f90ae7/artifacts/1"
},
{
"index": 2,
"kind": "image",
"filename": "image.jpg",
"size": 1843200,
"caption": "",
"download_path": "/v1/tasks/7c9e6679-7425-40de-944b-e07fc1f90ae7/artifacts/2"
},
{
"index": 3,
"kind": "image",
"filename": "image.jpg",
"size": 1843200,
"caption": "",
"download_path": "/v1/tasks/7c9e6679-7425-40de-944b-e07fc1f90ae7/artifacts/3"
}
]
}
}See also
Try Midjourney 8.2 through the API
One key opens every CyHUB model. Payment in rubles, and you see the price before the run.
Get an API key