Skip to content

Midjourney โ€‹

Updated

Endpoint: POST https://vod.intl.tencentcloudapi.comAction: CreateAigcImageTask

Midjourney is an image generation model that creates images from prompts only (text-to-image), returning 4 images per request. niji_7 is tuned for anime and illustration styles.

Basic information โ€‹

ItemValue
ModelNameMJ
ModelVersionv8.2 / v8.1 / v7 / niji_7
DefaultModelVersion=v8.2 / AspectRatio=1:1
Guardrail bypass supportNot supported

Supported specs by version โ€‹

VersionOutput specsInput and conditions
CommonRatios: use --ar in Prompt: 1:1 / 16:9 / 9:16 / 3:2 / 4:3 / 21:9
Pixel example: 3:2 on v8.2 outputs 1344ร—896
Quality: on v8.1 / v8.2 use --q 1 or 4
Output size: use ratios and the per-version options instead of an arbitrary size
โ€”

Request parameters โ€‹

ParameterRequiredTypeDescription
ModelNameRequiredStringFixed value MJ
ModelVersionOptionalStringv8.2 / v8.1 / v7 / niji_7
PromptRequiredStringThe generation prompt
FileInfos.NOptionalArrayReference image (image-to-image). Category is Image
OutputConfig.AspectRatioOptionalString1:1 / 16:9 / 9:16 / 4:3 / 3:4, and so on
OutputConfig.OutputImageCountOptionalIntegerNumber of images to generate (the upper limit differs by model)

Request example โ€‹

json
{
  "SubAppId": 123456789,
  "ModelName": "MJ",
  "ModelVersion": "v8.2",
  "Prompt": "a serene japanese garden, soft morning light",
  "OutputConfig": {
    "AspectRatio": "1:1",
    "OutputImageCount": 1,
    "StorageMode": "Temporary"
  },
  "SessionContext": "job-001"
}

Response example โ€‹

json
{
  "AigcImageTask": {
    "Status": "FINISH",
    "ErrCode": 0,
    "Progress": 100,
    "Output": {
      "FileInfos": [
        {
          "FileUrl": "http://<host>.vod2.myqcloud.com/.../aigcImageGenFile.png",
          "ExpireTime": "2026-08-01T10:29:48Z",
          "MetaData": {
            "Width": 1024,
            "Height": 1024,
            "Container": "png"
          }
        }
      ]
    }
  }
}

Special settings โ€‹

Additional options โ€‹

Notes on the v8.2 / niji_7 versions

On v8.2, the --q quality steps support only 1 / 4 (v7 and niji_7 support 1 / 2 / 4). niji_7 is a version tuned for anime and illustration. Per 1 request, 4 are generated. Include MJ native parameters such as --ar / --style in Prompt. If you specify --ar 3:2 in v8.2, then 4 are all generated as 1344ร—896.

Built with VitePress ยท Deployed on Tencent EdgeOne Pages