# Midjourney V8.2 API: Submit and Poll an Image Task

By SeedRouter · Published 2026-10-18 · Updated 2026-10-18

A Midjourney V8.2 API integration needs an explicit version, a valid image request and a way to retrieve the completed task. With SeedRouter, you submit to `/v1/images/generations`, retain the returned task ID and poll `/v1/tasks/{id}`. A successful submission acknowledges the task; the images arrive in the completed result.

This guide follows the SeedRouter request contract. A paid check on October 18, 2026 completed a V8.2 Fast request and delivered four 1024 × 1024 images. The portrait below is one of those outputs. The [model page](https://seedrouter.ai/models/midjourney-v8-2) contains the Playground and live pricing; the [API reference](https://seedrouter.ai/docs/midjourney) separates supported inputs from combinations that still need verification. <sup><a href="#ref-1">\[1]</a></sup>

![Midjourney V8.2 API output showing a red-haired woman in a cream sweater on a coastal cliff](https://static.seedrouter.ai/media/blog/20261018-midjourney-v8-2-api/case011.webp)

## Start with an explicit Midjourney V8.2 API request

Use the complete model ID, `midjourney-v8.2`. SeedRouter requires an explicit model; do not abbreviate it to `midjourney` or infer it from an account setting in another interface. Record the model together with the submitted request. <sup><a href="#ref-1">\[1]</a></sup>

Prepare a server-side API key and a short prompt with an outcome you can inspect. Start without references or parent-image actions so that your first request tests the basic path. The request below produced the illustrated portrait set. It chooses Fast and enables the additional content check:

```json
{
  "model": "midjourney-v8.2",
  "prompt": "Cinematic portrait of a young woman with freckles and wind-swept auburn hair, wearing a cream cable-knit sweater, laughing on a coastal cliff at golden hour, warm rim light, shallow depth of field, 85mm film photograph",
  "speed": "fast",
  "nsfw_check": true
}
```

The minimum request needs only `model` and `prompt`; omitted speed defaults to Fast. If you add `size`, use an aspect ratio such as `"16:9"`, not a `WIDTHxHEIGHT` pixel instruction. A generic image-client preset that sends `1024x1024`, `quality: "high"` or an arbitrary `n` does not match this model's contract. Adapt the body from the Midjourney field table rather than reusing another model's settings unchanged.

## Submit once, then poll the saved task ID

The downloadable [Python example](https://seedrouter.ai/examples/midjourney-v8-2.py) uses the standard library, keeps the key in an environment variable and writes the accepted task ID to a local file. It has separate submission and polling commands. That separation makes it possible to resume a read without creating another image job.

```bash
export SEEDROUTER_API_KEY='your-server-side-key'
python3 midjourney-v8-2.py submit request.json --state mj-task.json
python3 midjourney-v8-2.py poll --state mj-task.json
```

Save the JSON request above as `request.json`. Replace the example key with your own secret in your local environment; do not put it in a browser bundle or commit it to a repository. To test a local deployment, set the example's `SEEDROUTER_BASE_URL` to that deployment's `/v1` base URL.

The sample refuses to overwrite an existing state file during submission. It also does not automatically repeat a POST after a connection failure. If the response is lost, the application may not know whether the task was accepted. Check the task history before deciding to submit again.

Polling is different: it reads a task that already exists. The example stops when the task is completed or failed, and reports a bounded wait if it remains processing. A wait limit is a client-side observation, not evidence that the task needs to be regenerated.

## Read the result shape for the operation

A completed image operation returns URLs in `output.data`. Iterate over that array instead of assuming it always contains four entries. Image generation, selecting one image, describing an image and an editing-input step can return different kinds of output.

| Result field            | What your application should do                                               |
| ----------------------- | ----------------------------------------------------------------------------- |
| `status`                | Distinguish processing, completed and failed tasks                            |
| `output.data[].url`     | Display or save each delivered image                                          |
| `output.grid`           | Label a delivered grid as a grid; one file can contain multiple image choices |
| `output.text`           | Display returned text without assuming four suggestions or English            |
| `output.seed`           | Record it when present; do not require every result to include it             |
| `output.awaiting_input` | Continue the documented editing-input workflow                                |

Treat a failed task as a failure in your application, even if the HTTP request used to read it succeeded. HTTP success means the status query was served; it does not mean the requested image was generated.

When `output.grid` is true, one URL contains the grid. Do not invent four individual URLs from that file. A later selection uses the grid's one-based image position; the URL count is not the number of available choices.

The example prints the completed output as JSON. Your application can add storage, thumbnails and selection controls around the returned images. Keep the task ID with those results so that a subsequent action can refer to the right parent.

## Translate native parameters without hiding conflicts

The integration accepts structured fields and supported native prompt flags. Its precedence is &#x2A;*structured fields, then `extra`, then flags inside `prompt`**. Explicit zero and false values are retained.

For example, a prompt containing `--stylize 700` combined with `"stylize": 0` uses the explicit zero value. This is useful when a UI sends a separate control, but it can surprise an application that assembles prompts and JSON in different places. Prefer one source for each setting.

For SeedRouter V8.2 requests, `quality` accepts 0.25, 0.5, 1 or 2 in compatible combinations. Quality and `hd` are independent inputs: setting quality does not select HD. Check the [current combination limits](https://seedrouter.ai/docs/midjourney) before adding both or other reference controls; documented inputs do not establish their effect on every version. Raw is separate from both; the [Raw guide](https://seedrouter.ai/blog/midjourney-v8-2-raw) explains that distinction. <sup><a href="#ref-1">\[1]</a></sup>

Unknown JSON fields are discarded by this integration, while unknown native flags are rejected. Do not use an accepted request as proof that an unrelated extra JSON field changed the output. Check the documented field names and keep the exact submitted body in your test record.

## Keep parent-image actions attached to their task

Use your SeedRouter `parent_task_id` for a follow-up action. A dependent action remains attached to the original execution context. If that context is unavailable, the action fails instead of creating another parent elsewhere. The parent must belong to the same account, use the same model and remain available for the requested operation. Public image indexes start at one.

Selecting an image and performing a creative upscale are different operations. A `select` result should not be described as a resolution enhancement. Likewise, a variation, a remix and the official V8.2 Edit Model are distinct features with different requirements.

The current integration does not expose the new Edit Model as a verified API operation. Do not substitute a legacy inpaint request and assume it provides the same behavior. The [editing guide](https://seedrouter.ai/blog/midjourney-v8-2-edit-model) explains the available alternatives and a verified V6.1 masked-edit sequence, and the [API reference](https://seedrouter.ai/docs/midjourney) records the implemented operation limits.

## Estimate jobs rather than counting thumbnails

A completed generation is one job for this integration's pricing contract. Selecting an existing image from a grid does not create another billable generation. Entering an editing-input stage does not add a second generation charge; the final modal operation is the billable step. A four-image generation is not automatically four separately billed jobs. The October 18 V8.2 Draft check returned 24 images in one job; the number of returned images is not a safe pricing formula.

Use the current rate for the selected version, operation, speed and mode. Parent-image operations can inherit settings, so their price should come from the effective request rather than guessed defaults. The model page reads configured rates instead of embedding a permanent dollar amount in this tutorial.

For your acceptance test, record the request, task ID, final status, output count and the account's actual charge. A successful compilation or a mocked HTTP test cannot establish those runtime facts. Failed requests are not charged by SeedRouter.

## Frequently asked questions

### Can I use the same API key in frontend JavaScript?

Keep it on your server. Have the browser call an authenticated application endpoint that submits the request with the server-side key.

### Does a task ID mean the image is ready?

No. Read the task until it reports completed or failed, then handle the corresponding result. Save the ID before beginning that polling loop.

### Should a timeout trigger a new generation?

Not automatically. Preserve any known task ID and inspect the existing task. A connection or client wait timeout does not establish that the original submission was rejected.

### Can I change the version for a parent-image action?

This integration requires the same model as the parent. Start a separate generation when you want to evaluate another version.

Begin your Midjourney V8.2 API integration with one explicit request and a saved task ID. Verify the delivered output and charge before adding references or a chain of image actions.

## Sources

Contract and execution evidence checked October 18, 2026. The images shown here are outputs from paid integration checks, not a general model benchmark.

<span id="ref-1">\[1]</span> [SeedRouter Midjourney API reference](https://seedrouter.ai/docs/midjourney)

<span id="ref-2">\[2]</span> [Versioned model settings and current prices](https://seedrouter.ai/models/midjourney-v8-2)
