# 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.

Developer: Midjourney
Model key in the API: `midjourney`

## Connect in three steps

1. [Get a key](https://api.cyhub.ai/docs/connection.md?lang=en): Create a key in the dashboard after you confirm your email. One key opens every model.
2. [Check the price](https://api.cyhub.ai/docs/generations.md?lang=en): POST /v1/price shows the cost of a run in advance, without charging you.
3. [Run a task and collect the result](https://api.cyhub.ai/docs/tasks.md?lang=en): POST /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.

```bash
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"
```

```python
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"])
```

```javascript
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();
```

[Get a key](https://cyhub.ai/cabinet/keys)

## Price before the run

Prices as of 15.10.2026: from 3 ₽. POST /v1/price shows the exact price of your settings.

Send the same settings to POST /v1/price: the response shows the price of the run without charging you.

```bash
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 currency
- available_minor: how much your balance has for new tasks right now

## <a id="8.2"></a>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.

#### `prompt` (Required)

What 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: String
- Minimum characters: 1
- Maximum characters: 6000

#### `aspect_ratio` (Optional)

Aspect 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: String
- Maximum characters: 11
- Default: `"1:1"`

#### `speed` (Optional)

Speed. Relaxed is cheaper but waits in a queue, Fast is quicker and costs more. The price depends on it.

- Type: String
- Allowed values: `relaxed`, `fast`
- Default: `"relaxed"`

#### `stylization` (Optional)

How artistic: 0 sticks to the description, 1000 adds the most beauty but drifts from the description. Not set: 100.

- Type: Integer
- Minimum: 0
- Maximum: 1000

#### `chaos` (Optional)

How different the four pictures are: 0 similar, 100 the most different.

- Type: Integer
- Minimum: 0
- Maximum: 100

#### `weirdness` (Optional)

Weirdness: 0 an ordinary picture, 3000 surrealism and abstraction.

- Type: Integer
- Minimum: 0
- Maximum: 3000

#### `raw_mode` (Optional)

Without Midjourney artistic processing: the result is closer to an ordinary photo.

- Type: Boolean
- Default: `false`

#### `tile` (Optional)

A seamless pattern that repeats in every direction: wallpapers, fabrics, backgrounds.

- Type: Boolean
- Default: `false`

#### `seed` (Optional)

The starting number. The same number and description give a similar result. Not set: random.

- Type: Integer
- Minimum: 0
- Maximum: 4294967295

#### `exclusions` (Optional)

What must not be in the picture, words separated by commas, for example: text, people, blur.

- Type: String
- Maximum characters: 500

#### `image_prompts` (Optional)

Image prompts: Midjourney takes the subject, composition and colors from them. Up to 4 URLs.

- Type: List (String, uri)
- Maximum items: 4

#### `iw` (Optional)

Strength of the image prompts: 0 barely matter, 3 the strongest. Not set: 1. Works only together with image prompts.

- Type: Number
- Minimum: 0
- Maximum: 3

#### `style_ref_images` (Optional)

Style samples: the manner, colors and mood carry over, but not the objects. Up to 3 URLs.

- Type: List (String, uri)
- Maximum items: 3

#### `sref_code` (Optional)

A Midjourney style code, digits only, for example 123456789. Can go together with style samples.

- Type: String

#### `sw` (Optional)

Style strength: 0 barely matters, 1000 the strongest. Not set: 100. Works only together with style samples or a style code.

- Type: Integer
- Minimum: 0
- Maximum: 1000

#### `enable_translation` (Optional)

Translate the description into English before generating. If the translation fails or contains parameters, links or options in braces, the original description goes instead.

- Type: Boolean
- Default: `false`

#### `edit_images` (Optional)

Photos 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 |

[How to send files](https://api.cyhub.ai/docs/files.md?lang=en)

### 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

```json
{
  "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

```json
{
  "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

```json
{
  "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

```json
{
  "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

```json
{
  "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`.

[Complete generation example](https://api.cyhub.ai/docs/generations.md?lang=en)

### 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.

```json
{
  "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"
      }
    ]
  }
}
```

[How to read the result and download files](https://api.cyhub.ai/docs/tasks.md?lang=en#result)

## See also

- [Midjourney 8.2: features and prices](https://api.cyhub.ai/models/midjourney)
- Other versions: [Midjourney Editor API](https://api.cyhub.ai/en/models/midjourney-editor/api.md), [Midjourney 7 API](https://api.cyhub.ai/en/models/midjourney-7/api.md)
- Similar models: [GPT Image 2.5 API](https://api.cyhub.ai/en/models/gpt-image-2-5/api.md), [Nano Banana Pro API](https://api.cyhub.ai/en/models/nano-banana-pro/api.md), [Nano Banana 2 Lite API](https://api.cyhub.ai/en/models/nano-banana-2-lite/api.md), [Grok Imagine 2.0 API](https://api.cyhub.ai/en/models/grok-imagine-2/api.md), [Seedream 5.0 PRO API](https://api.cyhub.ai/en/models/seedream-5-pro/api.md), [Recraft API](https://api.cyhub.ai/en/models/recraft/api.md)
- [API documentation](https://api.cyhub.ai/docs.md?lang=en)
- [API errors and how to handle them](https://api.cyhub.ai/docs/errors.md?lang=en)
