> ## Documentation Index
> Fetch the complete documentation index at: https://evolink.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Midjourney V8.2 Image Generation

> - Midjourney V8.2 model supports generating high-quality images via natural language prompts. Fast mode returns 4 images per generation; Draft mode returns 24 lightweight 512 px sketch images in a single run
- Supports text-to-image and image-to-image (reference image URLs in prompt)
- Input image URLs must be publicly reachable and fetchable within about 10 seconds; the upstream fetches images synchronously at task creation and returns 400 if it cannot. Image hosts outside mainland China (imgur, ibb, raw.githubusercontent, pinimg, picsum) fail in practice. Host images on a fast CDN or use the platform file upload
- V8.2 highlights: an aesthetics and image-quality upgrade over V8.1, a detail level set with the native `--quality` / `--q` parameter (1–4, 4 = high-quality mode) in the prompt at no extra cost, and native 2K output (`quality=hd`). Turbo is not available on V8.2 (the upstream documents V8 as not supporting turbo)
- Style Reference (`--sref`) is supported; `--oref` / `--cref` are **not** supported on V8.2 and are rejected by the upstream, see [Prompt Parameter Guide](/en/api-manual/image-series/midjourney/midjourney-v8-2-prompt-guide)
- Prompt parameters that the upstream does not support are passed through as-is: the task fails with a parameter error (`invalid_parameters`) and reserved credits are refunded (they are no longer silently dropped)
- Async processing mode, use the returned task ID to [query status](/en/api-manual/task-management/get-task-detail)
- Generated image links are valid for 30 days, please save them promptly
- Timeout: approximately 20 minutes
- Parameter notes: this route runs on V8.2 and does not support niji; set the speed mode via `model_params.speed` and the output quality via the top-level `quality` parameter; the detail level is written in the prompt as `--quality` / `--q` (1–4) and passed through unchanged
- `mj-v8.2-edit` / `mj-v8.2-upload-paint` are canvas edits (img_pos + mask). The upstream's instruction-based edit endpoint (`--edit`, up to 4 reference images) is not exposed on this route yet and is being scheduled

<Note>
  Midjourney has a built-in content moderation system. Each image is moderated individually: filtered images are left out of the results and the remaining images are delivered normally, so you may receive fewer images than usual. If at least one image passes, the task is `completed` and billed normally; if all images are filtered, the task ends as `failed` and the reserved credits are refunded in full. Please make sure your prompts and reference images comply with the content guidelines.
</Note>


## OpenAPI

````yaml en/api-manual/image-series/midjourney/mj-v8-2-image-generate.json POST /v1/images/generations
openapi: 3.1.0
info:
  title: Midjourney V8.2 Image Generation Interface
  description: Create image generation tasks using the Midjourney V8.2 model
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/images/generations:
    post:
      tags:
        - Image Generation
      summary: Midjourney V8.2 Image Generation Interface
      description: >-
        - Midjourney V8.2 model supports generating high-quality images via
        natural language prompts. Fast mode returns 4 images per generation;
        Draft mode returns 24 lightweight 512 px sketch images in a single run

        - Supports text-to-image and image-to-image (reference image URLs in
        prompt)

        - Input image URLs must be publicly reachable and fetchable within about
        10 seconds; the upstream fetches images synchronously at task creation
        and returns 400 if it cannot. Image hosts outside mainland China (imgur,
        ibb, raw.githubusercontent, pinimg, picsum) fail in practice. Host
        images on a fast CDN or use the platform file upload

        - V8.2 highlights: an aesthetics and image-quality upgrade over V8.1, a
        detail level set with the native `--quality` / `--q` parameter (1–4, 4 =
        high-quality mode) in the prompt at no extra cost, and native 2K output
        (`quality=hd`). Turbo is not available on V8.2 (the upstream documents
        V8 as not supporting turbo)

        - Style Reference (`--sref`) is supported; `--oref` / `--cref` are
        **not** supported on V8.2 and are rejected by the upstream, see [Prompt
        Parameter
        Guide](/en/api-manual/image-series/midjourney/midjourney-v8-2-prompt-guide)

        - Prompt parameters that the upstream does not support are passed
        through as-is: the task fails with a parameter error
        (`invalid_parameters`) and reserved credits are refunded (they are no
        longer silently dropped)

        - Async processing mode, use the returned task ID to [query
        status](/en/api-manual/task-management/get-task-detail)

        - Generated image links are valid for 30 days, please save them promptly

        - Timeout: approximately 20 minutes

        - Parameter notes: this route runs on V8.2 and does not support niji;
        set the speed mode via `model_params.speed` and the output quality via
        the top-level `quality` parameter; the detail level is written in the
        prompt as `--quality` / `--q` (1–4) and passed through unchanged

        - `mj-v8.2-edit` / `mj-v8.2-upload-paint` are canvas edits (img_pos +
        mask). The upstream's instruction-based edit endpoint (`--edit`, up to 4
        reference images) is not exposed on this route yet and is being
        scheduled
      operationId: createMjV82ImageGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageGenerationRequest'
            examples:
              text_to_image:
                summary: Text to Image
                value:
                  model: mj-v8.2
                  prompt: >-
                    A cinematic shot of a Maine Coon cat on a neon-lit balcony
                    --ar 16:9 --s 500
                  quality: standard
                  model_params:
                    speed: fast
              text_to_image_hd:
                summary: Text to Image (Fast + HD)
                value:
                  model: mj-v8.2
                  prompt: >-
                    A cinematic shot of a Maine Coon cat on a neon-lit balcony
                    --ar 16:9 --s 500
                  quality: hd
                  model_params:
                    speed: fast
              text_to_image_hd_quality:
                summary: Text to Image (HD + --q 3)
                value:
                  model: mj-v8.2
                  prompt: >-
                    A cinematic shot of a Maine Coon cat on a neon-lit balcony
                    --ar 16:9 --s 500 --q 3
                  quality: hd
                  model_params:
                    speed: fast
              image_to_image:
                summary: Image to Image
                value:
                  model: mj-v8.2
                  prompt: >-
                    https://cdn.evolink.ai/model-cards/midjourney-v8-2/midjourney-v8-2-og-v1.jpg
                    A sunset landscape in watercolor style --iw 1.5 --ar 16:9
                  quality: standard
                  model_params:
                    speed: fast
      responses:
        '200':
          description: Task created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageGenerationResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_request
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: Unauthorized, invalid or expired token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: unauthorized
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: Insufficient quota, please top up
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: insufficient_quota
                  message: Insufficient quota. Please top up your account.
                  type: insufficient_quota
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: model_access_denied
                  message: 'Token does not have access to model: mj-v8.2'
                  type: invalid_request_error
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: rate_limit_exceeded
                  message: Too many requests, please try again later
                  type: rate_limit_error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: internal_error
                  message: Internal server error
                  type: api_error
components:
  schemas:
    ImageGenerationRequest:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          type: string
          enum:
            - mj-v8.2
          default: mj-v8.2
          description: Model name
        prompt:
          type: string
          description: >-
            Prompt, supports all Midjourney V8.2 native parameter syntax (e.g.
            --ar 16:9 --s 500).


            **Image-to-Image:** Place image URLs at the beginning of the prompt.
            Supported formats: .png, .gif, .webp, .jpg, .jpeg


            **Image-to-Image Rules:**

            - 1 image + no text = **invalid** (will return error)

            - 1 image + text description = valid

            - 2+ images + no text = valid

            - 2+ images + text description = valid


            **Unsupported parameters:** parameters the upstream does not support
            (e.g. `--oref`, `--cref`, `--stop`, `--bs`) are passed through and
            explicitly rejected by the upstream: the task fails with a parameter
            error (`invalid_parameters`) and reserved credits are refunded.
            `--v` / `--version` / `--niji` and the speed / hd parameters are
            stripped and controlled via API parameters; `--quality` / `--q`
            (1–4) is passed through.
          maxLength: 2048
          example: >-
            A cinematic shot of a Maine Coon cat on a neon-lit balcony --ar 16:9
            --s 500
        quality:
          type: string
          enum:
            - standard
            - hd
          default: standard
          description: >-
            Output quality


            - `standard`: Standard resolution (default), 1x multiplier

            - `hd`: Native HD output, 1.5x multiplier. Mutually exclusive with
            `speed: draft`


            **Pricing note:** the quality multiplier is combined (multiplied)
            with the `speed` multiplier.
        model_params:
          type: object
          description: Model parameters
          properties:
            speed:
              type: string
              enum:
                - draft
                - fast
              default: fast
              description: >-
                Speed mode


                - `draft`: Sketch mode. Returns 24 lightweight 0.5K sketch
                images in a single run (instead of 4), ideal for quickly
                exploring composition ideas. Mutually exclusive with `quality:
                hd`

                - `fast`: Standard mode (default)
        callback_url:
          type: string
          description: >-
            HTTPS callback URL for task completion


            **Callback timing:**

            - Triggered when the task is completed or failed

            - Sent after billing confirmation


            **Security restrictions:**

            - HTTPS protocol only

            - Callbacks to private IP addresses are prohibited (127.0.0.1,
            10.x.x.x, 172.16-31.x.x, 192.168.x.x, etc.)

            - URL length must not exceed `2048` characters


            **Callback mechanism:**

            - Timeout: `10` seconds

            - Up to `3` retries after failure (retries at `1`s/`2`s/`4`s after
            failure)

            - Callback response body format matches the task query endpoint

            - A 2xx status code is considered successful; other status codes
            trigger retries
          format: uri
          example: https://your-domain.com/webhooks/image-task-completed
    ImageGenerationResponse:
      type: object
      properties:
        created:
          type: integer
          description: Task creation timestamp
          example: 1757165031
        id:
          type: string
          description: Task ID
          example: task-unified-1757165031-mjv82
        model:
          type: string
          description: Actual model name used
          example: mj-v8.2
        object:
          type: string
          enum:
            - image.generation.task
          description: Task object type
        progress:
          type: integer
          description: Task progress percentage (0-100)
          minimum: 0
          maximum: 100
          example: 0
        status:
          type: string
          description: Task status
          enum:
            - pending
            - processing
            - completed
            - failed
          example: pending
        task_info:
          $ref: '#/components/schemas/TaskInfo'
          description: Async task info
        type:
          type: string
          enum:
            - text
            - image
            - audio
            - video
          description: Task output type
          example: image
        usage:
          $ref: '#/components/schemas/Usage'
          description: Usage and billing info
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code identifier
            message:
              type: string
              description: Error message
            type:
              type: string
              description: Error type
    TaskInfo:
      type: object
      properties:
        estimated_time:
          type: integer
          description: Estimated completion time (seconds)
          minimum: 0
          example: 45
    Usage:
      type: object
      description: Usage and billing info
      properties:
        billing_rule:
          type: string
          description: Billing rule
          enum:
            - per_call
            - per_token
            - per_second
          example: per_call
        credits_reserved:
          type: number
          description: Estimated credits consumed
          minimum: 0
          example: 1.8
        user_group:
          type: string
          description: User group
          example: default
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        ## All endpoints require Bearer Token authentication ##


        **Get API Key:**


        Visit [API Key Management Page](https://evolink.ai/dashboard/keys) to
        get your API Key


        **Add to request header:**

        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.