Skip to content

Image2 โ€‹

Updated

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

Image2 is an image generation model that supports text-to-image and multi-image reference generation, plus masked inpainting, transparent backgrounds, multiple outputs, and custom sizes. It renders multilingual text well, making it suitable for posters and text-heavy designs.

Basic Information โ€‹

ItemValue
ModelNameOG
ModelVersionimage2_* / image2.5_sunburst_* / image2.5_flare_*
Guardrail disable supportNot supported

Specifications Supported by Version โ€‹

VersionOutput SpecificationsInput and Conditions
CommonResolution: 1K / 2K / 4K; custom sizes are subject to the pixel constraints below
Aspect ratio: 1:1 / 3:2 / 2:3 / 3:4 / 4:3 / 16:9 / 9:16 / 21:9 / 9:21
image2.5: sunburst / flare support low, medium, high, xhigh, max respectively
Reference images: up to 16 images

The 2.0 series (image2_*) and the 2.5 series (image2.5_sunburst_* / image2.5_flare_*) are invoked through the same ModelName. It supports quality tier selection, reference images, custom resolutions, and mask editing. Multilingual text rendering is its strength.

Request Parameters โ€‹

ParameterRequiredTypeDescription
ModelNameRequiredStringFixed value OG
ModelVersionOptionalStringModel version. If omitted, the engine default value is used
PromptRequiredStringGeneration prompt. Up to 1000 characters
EnhancePromptOptionalBooleanAutomatic prompt correction. Default value false
ImageInfos.NOptionalArrayReference image array. Put the image URL in ImageUrl and specify mask editing with ReferenceType=mask
ExtraParametersOptionalObjectOutput options such as Resolution / AspectRatio
AdditionalParametersOptionalStringA JSON string containing model-specific options. For the seed delivery format, see Additional Configuration. Custom size {"size":"2048x2048"}, automatic {"size":"auto"}, transparent background {"background":"transparent"}

Request Example โ€‹

json
{
  "ModelName": "OG",
  "ModelVersion": "image2.5_sunburst_medium",
  "Prompt": "a young woman in traditional hanbok standing by a moonlit lake",
  "EnhancePrompt": true,
  "ExtraParameters": {
    "Resolution": "1080P",
    "AspectRatio": "16:9"
  },
  "Operator": "admin",
  "StoreCosParam": {
    "CosBucketName": "<bucket-appid>",
    "CosBucketRegion": "<bucket-region>",
    "CosBucketPath": "/aigc/"
  }
}

Reference Image Request โ€‹

json
{
  "ModelName": "OG",
  "ModelVersion": "image2.5_sunburst_medium",
  "Prompt": "Change the background to a quiet garden; preserve the subject.",
  "EnhancePrompt": true,
  "ExtraParameters": {
    "Resolution": "1080P",
    "AspectRatio": "16:9"
  },
  "Operator": "admin",
  "StoreCosParam": {
    "CosBucketName": "<bucket-appid>",
    "CosBucketRegion": "<bucket-region>",
    "CosBucketPath": "/aigc/"
  },
  "ImageInfos": [
    {
      "ImageUrl": "https://<host>/reference.jpg"
    }
  ]
}

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 โ€‹

Model Version โ€‹

In the 2.5 series, ModelVersion uses the image2.5_{series}_{stage} format. There are two series, sunburst and flare, and five tiers.

Tiersunburstflare
lowimage2.5_sunburst_lowimage2.5_flare_low
mediumimage2.5_sunburst_mediumimage2.5_flare_medium
highimage2.5_sunburst_highimage2.5_flare_high
xhighimage2.5_sunburst_xhighimage2.5_flare_xhigh
maximage2.5_sunburst_maximage2.5_flare_max

The 2.0 series uses image2_low / image2_medium / image2_high as is.

Quality Tier โ€‹

The higher the tier, the higher the precision and the longer the generation time.

TierCharacteristicsUse Case
lowFastest generationDrafts, batch testing, repeated prompt validation
mediumBalance between speed and image qualityEveryday production, general-purpose design
highEnhanced detail, texture, and light source renderingOutputs for review, images that require detailed expression
xhighHigher precision than highFinal review, upscaled use
maxHighest precision. Strong at handling complex characters and small textFinal deliverables, printed materials, high-precision product images

Generation Time by Series

These values were measured with the same prompt and 1024x1024. They vary depending on network conditions and server load.

Serieslowmediumhighxhighmax
sunburst30 seconds30 seconds53 seconds92 seconds169 seconds
flare22 seconds22 seconds35 seconds41 seconds61 seconds

Resolution Specifications โ€‹

ItemLimit
Custom resolutionBoth width and height are multiples of 16
Longest side3840 px or less
Total pixels655,360 or more and 8,294,400 or less
Presets1024x1024 (square), 1536x1024 (landscape), 1024x1536 (portrait)
High resolution2K (2560x1440), 4K (3840x2160). Anything beyond 2560px is supported only on a limited basis
Output formatPNG, JPEG, WebP
Reference imageImage editing, style transfer, multi-image composition
Background transparencySupported. In AdditionalParameters, pass {"background":"transparent"}

If you specify a preset in ExtraParameters.Resolution, the resolution is determined according to the aspect ratio. The height is adjusted to a multiple of 16.

PresetAspectRatio=16:9 output
1080P1920x1088
2K2560x1440
4K3840x2160

Custom Resolution Generation โ€‹

In AdditionalParameters, specify size. The value must be a multiple of 16, and the total number of pixels must be 655,360 or more and 8,294,400 or less. It can also be determined automatically by {"size":"auto"}.

json
{
  "ModelName": "OG",
  "ModelVersion": "image2.5_flare_high",
  "Prompt": "a serene japanese garden, soft morning light",
  "EnhancePrompt": true,
  "AdditionalParameters": "{\"size\":\"1536x1024\"}",
  "Operator": "admin",
  "StoreCosParam": {
    "CosBucketName": "<bucket-appid>",
    "CosBucketRegion": "<bucket-region>",
    "CosBucketPath": "/aigc/"
  }
}

Built with VitePress ยท Deployed on Tencent EdgeOne Pages