GPT Image 2 API

GPT Image 2 · Image generation and editing

Generate images from text or up to 15 references. Choose 1K, 2K or 4K, review the quote, then submit.

Multilingual text renderingComplex layout generationHigh-fidelity reference editing15 aspect ratiosUp to 4K output
Input
Resolution
Aspect ratio
Count
If the standard channel fails, a compatible official channel can generate the image. Charges are based on actual token usage and may exceed the initial reservation.
The Playground always screens prompts and input images. To disable screening via the API, set nsfw_check to false.
Output
Example asset · 1:1
/ Features

GPT Image 2 API

Legible in-image typography

Renders headlines, labels, signage, and short UI copy across Latin and CJK scripts within scene lighting. Check exact spelling and fine text before publishing.

15 aspect ratios including ultrawide and tall

Supports auto (1:1 square) plus 15 explicit ratios, including extended 3:1, 2:1, 21:9, 1:3, 1:2, and 9:21 frames for banners and vertical layouts.

Multi-reference editing (up to 15 images)

Pass up to 15 public URLs in image_urls to restyle a picture, replace a background, or combine several references. References are included in the standard rate.

Native 1K, 2K, and 4K output tiers

Select 1K, 2K, or 4K before quoting to generate print-ready or web-ready files directly—up to 3840 px on the long edge depending on ratio—without a separate upscaler.

Grounded real-world visual detail

Generates believable storefronts, packaged goods, food textures, architectural materials, and software interfaces from detailed prompts with natural lighting.

Single-pass multi-element layouts

Follows structured prompts describing foreground subjects, background depth, typography placement, and framing in one pass, reducing layout rework.

1–4 independent outputs per task

Set output_count from 1 to 4 to compare directions from one prompt. Each image runs independently, and only successful items are charged.

Optional pre-moderation and official fallback

Enable nsfw_check to screen prompts and references before submission, or enable fallback to retry failed ordinary items on the token-billed official channel.

/ Use cases

GPT Image 2 API · Use cases

Event & storefront posters

Marketing teams put exact titles, dates, and booth info into a 3:4 or 4:5 prompt at 2K to draft exhibition, cafe, or concert posters with integrated typography.

E-commerce product scenes

Online sellers upload clean packshots in image_urls to place cosmetics, bottles, or electronics onto marble, wood, or retail shelves while keeping labels recognizable.

Ultrawide web banners

Growth designers use GPT Image 2’s extended 3:1, 2:1, or 21:9 ratios at 4K to build homepage hero strips and marketplace headers without heavy cropping.

Tall vertical graphics

Editorial and mobile teams use 1:3, 9:21, or 9:16 framing to produce long-scroll campaign strips, mobile splash screens, and vertical story layouts in one generation.

App & web UI mockups

Product designers describe navigation bars, cards, buttons, and sample copy to generate quick screen concepts for stakeholder alignment before moving into Figma.

Food & menu photography

Restaurant brands and food editors specify plating, ceramic tableware, side daylight, and short menu labels at 2K or 4K to test visual directions before a studio shoot.

Illustrated diagrams

Educators and technical writers turn structured notes into botanical plates, cross-section drawings, or step-by-step infographics, then verify every label before release.

Multilingual ad variants

Cross-border teams reuse product references with localized English, Chinese, or Japanese headlines to generate regional campaign visuals without rebuilding the scene.

/ Examples

GPT Image 2 API · Examples

Load a prompt and suggested settings into the workbench. Add your own input image for reference edits.

GPT Image 2
GPT Image 2
GPT Image 2
Image1:1

GPT Image 2

A premium product photograph of a cobalt blue perfume bottle on limestone. Label reads AURA. Soft daylight and a crisp natural shadow.

134 chars
A 1990s Chinese high school class photo
A 1990s Chinese high school class photo
A 1990s Chinese high school class photo
Image

A 1990s Chinese high school class photo

Original prompt

90年代中国高中在教室拍的毕业合照

17 chars
Color-pop streetwear edit
Color-pop streetwear edit
Color-pop streetwear edit
Image

Color-pop streetwear edit

Adapted prompt · Add a reference image

Use the reference photo as the base. Keep the subject’s pose, camera angle, framing and surroundings. Redraw the jacket and sneakers as bold streetwear illustrations with painterly blocks of red, blue, green and yellow, black outlines and a few energetic strokes around the figure.

281 chars
A three-day Chengdu guide
A three-day Chengdu guide
A three-day Chengdu guide
Image

A three-day Chengdu guide

Adapted prompt

生成成都三天旅游攻略

10 chars
Personal color palette board
Personal color palette board
Personal color palette board
Image

Personal color palette board

Adapted prompt · Add a reference image

Create a diagram-first color analysis from this portrait. Compare warm and cool clothing palettes around the same face, using clearly labeled swatches and paired outfit colors. Keep the subject’s likeness, expression and lighting consistent, and use very little text.

267 chars
The chalkboard wall
The chalkboard wall
The chalkboard wall
Image

The chalkboard wall

Prompt reconstructed from the example

An editorial photograph of a lone writer standing partway up a ladder against a vast dark chalkboard. Dense, finely spaced handwritten text fills the entire wall. Frame the person small against the lettering, with diffuse natural light and a charcoal-gray palette.

264 chars
A scene with 100 objects
A scene with 100 objects
A scene with 100 objects
Image

A scene with 100 objects

Prompt reconstructed from the example

Create a busy illustrated scene with exactly 100 distinct everyday objects. Include an organized numbered inventory above the scene and make each object recognizable in the illustration. Keep the inventory legible, with small groups of text aligned in columns.

260 chars
Type on one grain of rice
Type on one grain of rice
Type on one grain of rice
Image

Type on one grain of rice

Prompt reconstructed from the example

Macro photograph of a pile of white rice. One sharply focused grain in the foreground bears the tiny text “wOw”. Keep every other grain unmarked. Use shallow depth of field and soft light to show the texture of the rice.

220 chars

GPT Image 2 · Pricing

Fixed standard price per successful image. Reference images are included.

+10%
Top up $1,500+ and get 10% bonus credits.
View top-up options
ResolutionStandard USDCredits / imagefalWaveSpeed
1KWith bonus ≈ $0.010 / imageRegular $0.011 / image2.1--
2KWith bonus ≈ $0.016 / imageRegular $0.018 / image3.6--
4KWith bonus ≈ $0.024 / imageRegular $0.027 / image5.3--

Official fallback rates

Rates are shown per 1 million tokens. The final charge depends on actual token usage.

Token typeUSD / 1M tokensCredits / 1M tokens
Text inputWith bonus ≈ $5.682 / 1MRegular $6.250 / 1M1,250.0
Cached text inputWith bonus ≈ $1.420 / 1MRegular $1.563 / 1M312.5
Image inputWith bonus ≈ $9.091 / 1MRegular $10.000 / 1M2,000.0
Cached image inputWith bonus ≈ $2.273 / 1MRegular $2.500 / 1M500.0
Image outputWith bonus ≈ $34.091 / 1MRegular $37.500 / 1M7,500.0
  • Only successful images are charged.
  • Flare and Sunburst have the same standard per-image price on models that offer both.
/ API

GPT Image 2 API · API integration

The request follows the form. The website uses your session; API clients use your API key. See the docs for parameters, task creation and task queries.

  1. Prepare input

    Write a prompt and optionally add references.

  2. Review the quote

    Choose resolution, output count and optional fallback. Review the account quote before submitting.

  3. Retrieve images

    Query the returned task ID or receive a signed callback. Save result images within 14 days.

Parameter
Description
modelgpt-image-2
inputImage generation parameters.
input.promptDescribe the image or edit. Limits depend on the model; see the schema.
input.resolution1K / 2K / 4K
input.aspect_ratioauto / 1:1 / 3:2 / 2:3 / 4:3 / 3:4 / 5:4 / 4:5 / 16:9 / 9:16 / 21:9 / 2:1 / 1:2 / 3:1 / 1:3 / 9:21
{
  "model": "gpt-image-2",
  "input": {
    "prompt": "A premium product photograph of a cobalt blue perfume bottle on limestone. Label reads AURA. Soft daylight and a crisp natural shadow.",
    "resolution": "1K",
    "aspect_ratio": "auto",
    "image_urls": [],
    "output_count": 1,
    "fallback": false,
    "nsfw_check": true
  }
}

The request follows the form. The website uses your session; API clients use your API key. See the docs for parameters, task creation and task queries.

/ Compare

Compare GPT Image models

Choose a model by the kind of image or edit you need. All three support text-to-image and reference editing at up to 4K on APIstable.

ModelBest forResolution
GPT Image 2You’re hereProduct images, posters with text, and reference edits. Choose from 15 aspect ratios and add up to 15 reference images.1K / 2K / 4K
GPT Image 2.5Use Flare for drafts and batches, or Sunburst for finished artwork and detailed edits. Supports up to 16 reference images.1K / 2K / 4K
GPT Image 2.6Choose Flare or Sunburst for still images, with controls for quality and scene complexity. Also supports animated GIFs from a text prompt.1K / 2K / 4K
/ FAQ

GPT Image 2 API FAQ

Find answers about pricing, generation results, and API access.

What is GPT Image 2, and is it the same as ChatGPT Images 2.0?

GPT Image 2 (model ID gpt-image-2) is OpenAI’s image generation and editing model released in April 2026 alongside ChatGPT Images 2.0. On APIstable you call it through the asynchronous task API and Workbench rather than a ChatGPT subscription.

How does GPT Image 2 differ from GPT Image 2.5 and 2.6 on APIstable?

GPT Image 2 is a single unified model with no Flare/Sunburst selector, and it uniquely exposes 15 explicit aspect ratios including 2:1, 1:2, 3:1, 1:3, and 9:21. GPT Image 2.5 adds Flare/Sunburst variants and up to 16 references; GPT Image 2.6 further adds quality, complexity, JPEG/WebP output, and text-only GIF.

Which resolutions and aspect ratios are supported?

You can choose 1K (default), 2K, or 4K together with auto or 15 aspect ratios (1:1, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 16:9, 9:16, 21:9, 2:1, 1:2, 3:1, 1:3, and 9:21). Exact output pixels depend on both the resolution tier and the chosen ratio—for example, 4K produces 2880×2880 at 1:1 and 3840×2160 at 16:9.

What does aspect_ratio: "auto" do on GPT Image 2?

On GPT Image 2, auto defaults to a 1:1 square image. Pick an explicit aspect ratio whenever your layout requires fixed framing.

How do I pass reference images, and how many can I use?

Pass up to 15 public image URLs in image_urls, then describe what to keep or change in the prompt.

How are standard channel and official fallback billed?

The ordinary channel charges a fixed credit price per successful image based on resolution (1K, 2K, or 4K), as shown in the Pricing section. Optional official fallback (fallback: true) runs only if the ordinary channel fails and bills by actual token usage—which may exceed the initial standard-price reservation. Accepted tasks settle against their saved quote snapshot.

Do reference images cost extra?

On the standard channel, reference images are included in the fixed per-image price. If official fallback runs, token billing counts actual text input, image input, cached inputs, and image output, so reference images can increase the final charge.

Does GPT Image 2 support Flare/Sunburst, custom pixel sizes, masks, SVG, GIF, or transparent backgrounds?

No. GPT Image 2 has no Flare/Sunburst variant, and APIstable does not expose custom pixel size strings, mask inpainting, markup overlays, transparent background controls, SVG, or GIF on this model. Unsupported fields are rejected at validation.

What happens if only some images succeed when output_count is 2–4?

Each image in output_count (1–4) runs as an independent execution item. Only successful items are charged; failed items release their unspent reserved credits.

Is exact spelling or subject preservation guaranteed?

No. Although GPT Image 2 handles in-image text and references well, outputs are not guaranteed to preserve every character, face, or brand mark verbatim. Inspect generated assets before commercial use.

How do async polling, timeouts, and result retention work?

Submit tasks via POST /api/v1/tasks/create_task, then poll the task query endpoint or configure callback_url. Generated files are retained for 14 days—download them before expiry. Unfinished tasks older than 24 hours are automatically failed during the daily 00:00 Beijing time cleanup with unspent reservations released, and late results cannot reopen or re-bill a closed task.

Can I use a seed to reproduce an image identically?

No. Seed control is not exposed for GPT Image 2 on APIstable, and generation is nondeterministic, so rerunning the same prompt and parameters can produce different details.

CREATE IMAGES

Try GPT Image 2 now

Write a prompt or add references to generate an image.