Image OpenAI

GPT Image 2

适合高质量文生图、参考图生成与图片编辑,支持多种尺寸和画质档位。

Capabilities

Reference image generation

Parameters and specs

Aspect ratios
自适应 / 1:1 方形 / 3:2 横屏 / 2:3 竖屏 / 16:9 横屏 / 9:16 竖屏
Sizes
Auto / 1:1 Square (1024x1024) / 3:2 Landscape (1536x1024) / 2:3 Portrait (1024x1536) / 1:1 Square 2K (2048x2048) / 16:9 Landscape 2K (2048x1152) / 16:9 Landscape 4K (3840x2160) / 9:16 Portrait 4K (2160x3840)
Resolutions
1K / 2K / 4K
Quality
Auto / High / Medium / Low
Reference limits
4 images

Model API

Model endpoints route to this capability through the model field or app/action fields in the request body. Include a MediaGo developer API key before calling them.

Method

POST

Endpoint

/api/v1/images

Auth

Authorization: Bearer <mgak_...>

Result

response.data[]

The image endpoint returns generated results in the response data array.

Key fields

model
Required. Use the current model ID.
prompt
Required. The generation prompt.
size
Optional. Image size. Use a value from this page's parameter list.
aspect_ratio
Optional. Output aspect ratio. Defaults to the model setting when omitted.
resolution
Optional. Output resolution. Defaults to the model setting when omitted.
quality
Optional. Image quality level.
input_references
Optional. Reference image input array.
seed
Optional. Random seed.

Request example

{
  "model": "gpt-image-2",
  "prompt": "Create a 1:1 product image on a white background with soft shadows and detailed material texture.",
  "size": "auto",
  "aspect_ratio": "adaptive",
  "resolution": "1K",
  "quality": "auto",
  "input_references": [
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/reference.png"
      }
    }
  ]
}

Example uses

Example prompt

Generate a clean SaaS hero image with an analytics dashboard, modern office setting, and teal accents.

Example prompt

Keep the character consistent from the reference image and restyle it as a cinematic neon street portrait at night.

Example prompt

Create a 1:1 ecommerce product image on a white background with soft shadows and detailed material texture.