AI Image Generation

GPT Image 2 Supported Sizes: Valid Dimensions, 4K Limits, and API Verification

Use every current GPT Image 2 popular size, validate custom dimensions, avoid invalid 4K requests, choose Image API or Responses API, and verify the saved output size before shipping.

Yingtu AI Editorial
Yingtu AI Editorial
YingTu Editorial
Apr 25, 2026
GPT Image 2 Supported Sizes: Valid Dimensions, 4K Limits, and API Verification
yingtu.ai

Contents

No headings detected

GPT Image 2 supports these current popular size examples: 1024x1024, 1536x1024, 1024x1536, 2048x2048, 2048x1152, 3840x2160, 2160x3840, and auto. Those examples are not the whole contract. Custom dimensions are valid when the longest edge is no more than 3840px, both edges are multiples of 16px, the long-to-short ratio is no more than 3:1, and the total pixel count stays between 655,360 and 8,294,400.

For production work, choose the API size deliberately and verify the saved file. Prompt phrases like "make it 4K" or "high resolution" can guide style, but they do not replace the output-size field. This matters most above 2560x1440, where OpenAI treats high-resolution output as experimental: a successful request still needs a saved-file dimension check before the asset is shipped.

NeedUse this size valueFirst check
Square draft or simple asset1024x1024Good first test when exact high resolution is not required
Square master2048x2048Useful when the final crop is not known yet
Landscape default1536x1024 or 2048x1152Use 2048x1152 when a 16:9 high-resolution master is needed
Portrait default1024x1536Good for vertical product, poster, or mobile-first assets
Native 4K landscape3840x2160Valid 16:9, but treat output above 2560x1440 as experimental
Native 4K portrait2160x3840Valid 9:16, with the same high-resolution caveat
Let the API chooseautoUseful for exploration, not for exact production dimensions
Unusual canvasCustom WIDTHxHEIGHTMust pass max-edge, multiple-of-16, ratio, and pixel-count checks

Do not request a transparent PNG from gpt-image-2, because the model does not currently support transparent backgrounds. If transparency is required, separate that job from the GPT Image 2 size request and handle background removal or compositing downstream.

The reliable control is the API size field. A prompt can describe a cinematic 4K scene, a square avatar, or a vertical poster, but prompt language is not the resolution contract. The request contract is the model plus a valid output size. OpenAI's current image-generation documentation gives the popular examples above and allows flexible custom dimensions when they satisfy the documented constraints.

Use the Image API when you need one prompt or edit request to return one image. Use the Responses API image-generation tool when the image belongs inside a larger reasoning flow, such as "plan the asset, call tools, generate the image, then explain what changed." The route changes the surrounding product surface, but it does not remove the need for a valid GPT Image 2 size.

The most common mistake is to put size only in the prompt:

hljs text
Create a 4K product hero image in a wide format...

That prompt can guide composition and detail, but it does not replace:

hljs json
{
  "model": "gpt-image-2",
  "size": "3840x2160"
}

If you need a square, portrait, or unusual canvas, do not guess. Pick one of the popular examples or validate the custom size before calling the API.

Valid GPT Image 2 4K size rules

Custom-size validator

GPT Image 2 supports many custom sizes, but a custom size must pass all of the documented constraints. A valid request keeps the maximum edge at or below 3840px, makes both edges multiples of 16px, keeps the long edge to short edge ratio at 3:1 or less, and stays inside the total-pixel range of 655,360 to 8,294,400.

That means these examples are safe starting points:

SizeUse caseWhy it passes
1024x1024square draft or simple assetsquare, both edges multiples of 16, within pixel range
1536x1024landscape default3:2, both edges multiples of 16, within pixel range
1024x1536portrait default2:3, both edges multiples of 16, within pixel range
2048x115216:9 high-resolution master16:9, both edges multiples of 16, below the 4K pixel count
2048x2048square master for later cropping or upscalingsquare ratio and valid pixel count
3840x21604K landscape, hero images, wide product scenes16:9, both edges multiples of 16, max edge 3840
2160x38404K portrait, posters, mobile-first assets9:16, both edges multiples of 16, max edge 3840

These examples should be rejected before the API call:

SizeWhy it fails
4096x2160the long edge is above 3840px, even though it looks like a familiar 4K-family canvas
4000x2160the long edge is above 3840px
3840x1024the long-to-short ratio is greater than 3:1
3839x2160one edge is not a multiple of 16
1024x256the total pixel count is below the minimum

The rule is simple: treat size validation as part of your request builder. If your app lets users type arbitrary dimensions, run the same checks before sending the image request. That is faster than sending an invalid request, interpreting an error, and then trying to infer which constraint failed. Also label OpenAI's list as popular examples, not the only valid ratios; the custom rule is what makes additional dimensions possible.

Image API workflow for direct generation

For a direct one-call image workflow, the Image API is the cleanest route. The request should name gpt-image-2, set the required size, choose quality deliberately, and then save the base64 image output. The example below uses native 4K landscape; swap size for any popular example or validated custom value that matches your asset.

hljs ts
import OpenAI from "openai";
import fs from "node:fs";

const client = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY,
});

const result = await client.images.generate({
  model: "gpt-image-2",
  prompt: "A clean product hero image for a matte black camera on a light studio desk, realistic reflections, no text.",
  size: "3840x2160",
  quality: "high",
});

const imageBase64 = result.data?.[0]?.b64_json;

if (!imageBase64) {
  throw new Error("No image data returned");
}

fs.writeFileSync("gpt-image-2-4k.png", Buffer.from(imageBase64, "base64"));

Use quality: "low" for drafts or prompt exploration, quality: "medium" when you want a reasonable preview, and quality: "high" when you are testing final-asset quality. Do not jump straight to high-quality 4K for every iteration. Resolution, quality, text input, image input, and route all affect cost and latency, so the cheapest reliable workflow is usually: draft smaller, approve composition, then run a final high-resolution test.

After the file is written, inspect it. On macOS, Finder or Preview can show image dimensions. In an automated pipeline, use a tool such as ImageMagick:

hljs bash
magick identify -format "%wx%h\n" gpt-image-2-4k.png

The expected output for this landscape 4K request is:

hljs text
3840x2160

If the output is not the size you requested, stop and inspect your request builder before you blame the prompt. Check whether the request sent the right model, whether a wrapper rewrote the size, whether the API route supports the option you used, and whether a downstream resize step modified the saved asset.

Responses API workflow for multi-step image generation

The Responses API route is useful when image generation is one tool call inside a broader workflow. For example, an assistant may first plan a scene, ask a user to choose a route, generate an image, and then explain what to revise. In that shape, the image-generation tool still needs the same size discipline.

Image API and Responses API route map for GPT Image 2 4K

A practical Responses-style request should keep the image-generation tool options explicit:

hljs ts
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY,
});

const response = await client.responses.create({
  model: "gpt-5.5",
  input: "Plan a clean 4K landscape product image, then generate it with GPT Image 2.",
  tools: [
    {
      type: "image_generation",
      model: "gpt-image-2",
      size: "3840x2160",
      quality: "high",
    },
  ],
});

The exact SDK shape can evolve, so keep the official OpenAI image-generation and Responses tool documentation open while implementing. The stable idea is what matters here: the surrounding model may reason or coordinate, but the image-generation tool must still point at gpt-image-2 with a valid size.

Use Responses API when the image is part of a workflow. Use Image API when you just need the image. Do not use Responses API only because it sounds newer; a direct Image API call is easier to test, log, retry, and cost-control when the job is simply "make this image."

Quality, format, and background choices

The size request is not finished after choosing dimensions. GPT Image 2 also supports output settings such as quality, format, and compression. Those settings should match the asset's job.

For prompt exploration, low quality keeps iteration cheaper and faster. For reviewable creative work, medium can be the better default because it lets you judge composition without paying the full cost of every final attempt. For exact high-resolution candidates, high is the setting to test, but only after the prompt and composition are close.

Format is a delivery decision. PNG is a good default when you want lossless output or design assets. JPEG can be smaller for photographic assets. WebP can be useful for web delivery when your pipeline and browser support are already set up. Compression is a deployment tradeoff, not a substitute for checking dimensions.

The background setting has a hard boundary: GPT Image 2 does not currently support transparent-background requests. If you need a transparent final asset, separate that job from GPT Image 2 generation. Generate the image, then use a background-removal or compositing workflow that is appropriate for your production pipeline. Do not promise "transparent 4K with GPT Image 2" or "transparent GPT Image 2 output" as if either were a supported one-call feature.

Native 4K generation or upscale fallback

Native 4K is worth testing when the final asset needs a 4K canvas from the start, when the composition is already stable, or when the output will be used in wide display, print mockups, video stills, or high-resolution marketing tests. The benefit is obvious: if the generated file is good, you avoid an extra upscale step and can inspect the exact final canvas.

The risk is also real. Output above 2560x1440 is experimental. High-resolution image generation can be slower, more variable, and more expensive than a smaller master. If a product team needs repeatable thumbnails, UI boards, icon sheets, or localized visual assets, a controlled fallback may be better: generate a reliable 2K or popular-size master, approve composition and text, then upscale or recreate at final size only after the asset earns the extra cost.

Save verify and fallback checklist for GPT Image 2 4K

Use this decision rule:

SituationBetter first move
You need one hero image and can tolerate a few failed candidatesTry native 4K directly
You need many variants or a prompt test batchGenerate smaller previews first
The image has dense text, UI labels, or diagram-like contentApprove a smaller master before final 4K
The final file must be transparentDo not use GPT Image 2 transparent output; handle background separately
Cost or latency is the blockerTest medium and 2K before high and 4K

This is not a downgrade from 4K. It is how you keep the workflow measurable. The reader's goal is not to say "4K" in a prompt; it is to deliver a file that is the right size, good enough, and reproducible under the route they will actually use.

Troubleshooting wrong-size or failed output

If a request fails or returns an unexpected size, start with the mechanical checks.

First, confirm the request actually sent model: "gpt-image-2" and the intended size. If the app uses a wrapper, log the final outgoing payload rather than the UI form values. Some wrappers normalize sizes, hide quality defaults, or fall back to another model when a setting is unsupported.

Second, validate custom sizes locally. Most size errors are easy to catch before the API call: one edge is too long, an edge is not divisible by 16, the aspect ratio is too wide, or the total pixel count is out of range. Do not assume 4096x2160 is accepted just because many tools call it 4K; GPT Image 2's documented maximum edge is 3840px.

Third, check whether you requested an unsupported option. Transparent background is the common one for GPT Image 2. If the route rejects or ignores that option, remove it and handle transparency elsewhere.

Fourth, check account and route readiness. OpenAI notes that GPT Image models may require organization verification. A provider or gateway may also have its own model availability, quota, and output-size rules. Keep those as route checks, not prompt problems.

Finally, separate image quality from image size. A file can be 3840x2160 and still not be good enough; a file can also be visually good but wrong for the requested canvas. If composition, text, or fine detail fails at native 4K, try a smaller approval workflow before spending more on high-resolution retries.

For cost-specific route decisions, use a separate price-focused reference such as the GPT Image 2 API cost route guide. For model-route decisions, compare outputs against the GPT Image 2 vs Nano Banana Pro route guide. Keep those choices separate from GPT Image 2 4K resolution mechanics.

FAQ

What sizes does GPT Image 2 support?

GPT Image 2's current popular examples are 1024x1024, 1536x1024, 1024x1536, 2048x2048, 2048x1152, 3840x2160, 2160x3840, and auto. It also supports custom dimensions when they pass the documented max-edge, multiple-of-16, aspect-ratio, and total-pixel constraints.

Does GPT Image 2 support any custom size?

No. Custom dimensions must keep the longest edge at or below 3840px, make both edges multiples of 16px, keep the long-to-short ratio at 3:1 or less, and keep total pixels from 655,360 to 8,294,400. Anything outside those constraints should be rejected before the API call.

Is 4096x2160 a valid GPT Image 2 size?

No. 4096x2160 exceeds the 3840px maximum edge constraint. Use 3840x2160 for native 4K landscape, or choose a validated custom size within the documented limits.

When should I use auto?

Use auto when exact output dimensions are not important and you are still exploring the prompt. For production assets, thumbnails, layout slots, ads, or localized graphics, send an explicit valid size and verify the saved file dimensions.

Can GPT Image 2 generate native 4K images?

Yes, through the API size setting when the requested size satisfies the official constraints. Use 3840x2160 for landscape or 2160x3840 for portrait. Treat the result as experimental above 2560x1440 and verify the saved file.

What is the best GPT Image 2 4K size?

Use 3840x2160 for 16:9 landscape and 2160x3840 for 9:16 portrait. Use custom sizes only when your layout needs them and they pass the edge, multiple-of-16, ratio, and total-pixel checks.

Should I use Image API or Responses API?

Use Image API for a direct generation or edit request. Use Responses API when image generation belongs inside a multi-step assistant workflow. In both cases, keep the GPT Image 2 size setting explicit.

Why did my prompt say 4K but the file was not 4K?

Because prompt language is not the same as output-size control. Check the API size field, wrapper behavior, post-processing steps, and the final saved file dimensions.

Does GPT Image 2 support transparent 4K PNG output?

No. Do not plan a one-call transparent-background workflow with gpt-image-2. Generate the image first, then use a separate transparency or compositing step if your final asset requires it.

Is native 4K always better than upscaling?

No. Native 4K is useful when the final canvas matters and the workflow can tolerate experimental high-resolution behavior. A 2K master plus upscale can be safer when you need predictable approvals, lower iteration cost, or many localized variants.

Can I publish one fixed cost for GPT Image 2 4K?

Not safely. Cost depends on quality, size, text input, image input for edits, output format, route, and provider behavior. Use official cost tools and route-specific billing terms instead of a universal 4K price.

Tags

Share this article

XTelegram