Skip to content

Midjourney โ€‹

Updated

Endpoint: POST https://mps.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
Guardrail disable supportNot supported

Specifications Supported by Version โ€‹

VersionOutput SpecificationsInput and Conditions
CommonAspect ratio: use --ar of Prompt: 1:1 / 16:9 / 9:16 / 3:2 / 4:3 / 21:9
Pixel example: the 3:2 output of v8.2 is 1344ร—896
Quality: v8.1 / v8.2 use --q 1 or 4
Output size: use the aspect ratio and version-specific options instead of an arbitrary size
โ€”

A prompt-based image generation engine. niji_7 is a version tuned for animation and illustration.

Request Parameters โ€‹

ParameterRequiredTypeDescription
ModelNameRequiredStringFixed value MJ
ModelVersionOptionalStringv8.2 / v8.1 / v7 / niji_7
PromptRequiredStringGeneration prompt. Up to 1000 characters
EnhancePromptOptionalBooleanAutomatic prompt correction. Default value false
ImageInfos.NOptionalArrayReference image array. Used for image-to-image and reference generation
ExtraParametersOptionalObjectOutput options such as Resolution / AspectRatio
AdditionalParametersOptionalStringA JSON string containing model-specific options. For the seed delivery format, see Additional Configuration

Request Example โ€‹

json
{
  "ModelName": "MJ",
  "ModelVersion": "v8.2",
  "Prompt": "a serene japanese garden, soft morning light",
  "EnhancePrompt": true,
  "ExtraParameters": {
    "Resolution": "1080P",
    "AspectRatio": "16:9"
  },
  "Operator": "admin",
  "StoreCosParam": {
    "CosBucketName": "<bucket-appid>",
    "CosBucketRegion": "<bucket-region>",
    "CosBucketPath": "/aigc/"
  }
}

Response Example โ€‹

json
{
  "Response": {
    "Status": "DONE",
    "Message": "ok",
    "ImageUrls": [
      "https://aigc-output-image-<id>.cos.<region>.myqcloud.com/<file>.png?q-sign-algorithm=sha1&..."
    ],
    "RequestId": "<request-id>"
  }
}

Special Configuration โ€‹

Additional Options โ€‹

Notes for v8.2 / niji_7

For v8.2, the --q quality tier supports only 1 / 4 (v7 and niji_7 support 1 / 2 / 4). niji_7 is a version tuned for animation/illustration. For every 1 request, 4 images is generated. Include MJ native parameters such as --ar / --style in Prompt. In v8.2, if you specify --ar 3:2, all 4 images are generated as 1344ร—896.

Built with VitePress ยท Deployed on Tencent EdgeOne Pages