AI Image Generation12 min

GPT Image 2 4K: Supported Sizes, Native Pixels, and Output Verification

Request valid GPT Image 2 sizes, understand experimental 4K, choose Image or Responses API, decode the result, and verify the actual delivered pixels.

Yingtu AI Editorial
Yingtu AI Editorial
YingTu Editorial
Apr 25, 2026
12 min
GPT Image 2 4K request flowing through size validation, generation, and delivered-file verification
yingtu.ai

Contents

No headings detected

GPT Image 2 can be asked for 3840x2160 landscape or 2160x3840 portrait output through the API size field. Those are documented 4K request sizes, not a blanket promise that every response is ready to ship. OpenAI currently treats output above 2560x1440—more than 3,686,400 pixels—as experimental. Decode the response, inspect the saved file, and inspect the CMS or CDN version your customer will actually receive.

The practical rule is: set pixels in size, not just in the prompt, and call the image 4K only after the delivered file measures 4K. A prompt that says ā€œ4K,ā€ a 16:9 aspect ratio, and an upscale are three different things.

What you needRequest or actionWhat it proves
Exact 4K landscape canvassize: "3840x2160"You requested 8,294,400 pixels at 16:9
Exact 4K portrait canvassize: "2160x3840"You requested 8,294,400 pixels at 9:16
A 16:9 composition, dimensions flexibleChoose a valid 16:9 size or autoShape only; not necessarily 4K
A larger version of an existing fileUpscale after generationThe final pixels came from a separate post-process
A production-approved 4K assetVerify saved and delivered dimensionsThe file passed the pixel contract; visual QA is still separate

The current GPT Image 2 model page identifies gpt-image-2 as the API model and gpt-image-2-2026-04-21 as its current snapshot. This guide is about that API contract. ChatGPT Images 2.0 is a consumer product with a different interface, access model, and set of controls.

ā€œSupported 4Kā€ means a valid request plus verification

OpenAI's size and quality documentation lists these popular values:

  • 1024x1024
  • 1536x1024
  • 1024x1536
  • 2048x2048
  • 2048x1152
  • 3840x2160
  • 2160x3840
  • auto

The list is not a fixed menu. GPT Image 2 also accepts custom WIDTHxHEIGHT values that pass all four validation rules. Conversely, a familiar display label does not override those rules. 4096x2160 may be described as a 4K-family format elsewhere, but it is not a valid direct GPT Image 2 request because its long edge exceeds 3840px.

It helps to keep four terms precise:

  • Supported size means the request dimensions satisfy the documented contract.
  • Requested pixels means the API payload explicitly asks for a width and height.
  • Native or requested-size 4K means the decoded generation result itself measures 3840x2160 or 2160x3840, before an external enlargement step.
  • Upscaled 4K means a smaller generated file was later enlarged to a 4K canvas.

That last distinction matters in asset reviews. Both files can have the same final dimensions, but they came from different pipelines and should be labeled differently. Aspect ratio only describes shape: 2048x1152 and 3840x2160 are both 16:9, yet only one is a 4K canvas.

Validate custom dimensions with all four rules

A custom GPT Image 2 size is valid only when all of these conditions are true:

  1. The longest edge is no more than 3840px.
  2. Width and height are both multiples of 16px.
  3. The long edge divided by the short edge is no greater than 3.
  4. Total pixels are between 655,360 and 8,294,400, inclusive.

The four checks catch different failures:

CandidateResultReason
3840x2160Valid, experimentalIt lands exactly on the maximum pixel count
2048x1152Valid16:9, divisible by 16, and inside the pixel range
1024x640ValidIt lands exactly on the minimum pixel count
4096x2160InvalidThe long edge exceeds 3840px
3839x2160Invalid3839 is not divisible by 16
3840x1024InvalidThe ratio is 3.75:1
3840x2176InvalidThe total pixel count exceeds 8,294,400

If your application accepts user-entered dimensions, reject invalid values before calling the API. This validator returns every failed rule, which makes a UI error more useful than a generic ā€œinvalid sizeā€ message:

hljs ts
function validateGptImage2Size(width: number, height: number) {
  const errors: string[] = [];
  const long = Math.max(width, height);
  const short = Math.min(width, height);
  const pixels = width * height;

  if (!Number.isInteger(width) || !Number.isInteger(height)) {
    errors.push("Width and height must be integers");
  }
  if (long > 3840) errors.push("Maximum edge is 3840px");
  if (width % 16 !== 0 || height % 16 !== 0) {
    errors.push("Both edges must be multiples of 16px");
  }
  if (short <= 0 || long / short > 3) {
    errors.push("Aspect ratio cannot exceed 3:1");
  }
  if (pixels < 655_360 || pixels > 8_294_400) {
    errors.push("Total pixels must be 655,360–8,294,400");
  }

  return { valid: errors.length === 0, errors };
}

console.log(validateGptImage2Size(3840, 2160)); // valid
console.log(validateGptImage2Size(4096, 2160)); // invalid: max edge

Passing this function only proves that the payload is eligible under the size rules. It does not prove that a generated image has readable text, correct composition, consistent characters, or acceptable detail.

Generate, decode, save, and verify a 4K file

For one direct generation or edit, use the Image API. The OpenAI SDK returns base64-encoded image data for GPT Image models. This example requests a PNG at landscape 4K and writes the decoded bytes to disk:

hljs ts
import OpenAI from "openai";
import { writeFile } from "node:fs/promises";

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

const result = await openai.images.generate({
  model: "gpt-image-2",
  prompt:
    "Editorial product photograph of a compact espresso machine on a warm oak counter, morning window light, no words or logos",
  size: "3840x2160",
  quality: "high",
  output_format: "png",
});

const encoded = result.data?.[0]?.b64_json;
if (!encoded) throw new Error("The API returned no image data");

const file = "espresso-hero-3840x2160.png";
await writeFile(file, Buffer.from(encoded, "base64"));
console.log(`Saved ${file}`);

Do not stop at ā€œSaved.ā€ Verify format and pixels from the actual file. ImageMagick makes the acceptance check easy to automate:

hljs bash
magick identify -format '%m %wx%h\n' espresso-hero-3840x2160.png

For this request, the acceptance value is:

hljs text
PNG 3840x2160

Then test the delivery derivative, not just the local master. A CMS may resize, crop, convert, or strip the original even when upload succeeds:

hljs bash
curl -L 'https://example.com/assets/espresso-hero.webp' -o delivered.webp
magick identify -format '%m %wx%h\n' delivered.webp

Use two separate acceptance gates:

  1. Pixel acceptance: the decoded original and required delivery variant have the expected width, height, and format.
  2. Visual acceptance: text, subject identity, layout, fine detail, safety, and brand requirements pass human or application-specific review.

A 3840x2160 file can pass the first gate and fail the second. A beautiful file can also fail production because a CDN reduced it to 1920x1080. Do not describe either case as an accepted 4K deliverable.

Image API or Responses API?

The API choice follows the workflow, not the resolution label.

Use the Image API when the job is ā€œgenerate this imageā€ or ā€œedit these image inputs.ā€ You select model: "gpt-image-2" directly, set the output controls, and receive image data.

Use the Responses API when image generation is a tool inside a conversational or multi-step experience. In that request, select a supported mainline model and give it the image-generation tool. The tool handles GPT Image model selection; do not add model: "gpt-image-2" inside the tool object.

hljs ts
import OpenAI from "openai";
import { writeFile } from "node:fs/promises";

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

const response = await openai.responses.create({
  model: "gpt-5.6",
  input:
    "Plan a wide launch image with a clear empty area for an HTML headline, then generate it without embedded text.",
  tools: [
    {
      type: "image_generation",
      size: "3840x2160",
      quality: "high",
      output_format: "png",
    },
  ],
});

const call = response.output.find(
  (item) => item.type === "image_generation_call"
);
if (!call || !("result" in call) || !call.result) {
  throw new Error("No image generation result returned");
}

await writeFile("launch-hero.png", Buffer.from(call.result, "base64"));

The official image generation guide is the controlling reference for both surfaces. Responses adds the mainline model's token usage to image-generation costs, so it is not a free wrapper around the Image API. If you do not need conversation state or multi-step tool use, the direct Image API is simpler to log, retry, and cost-test.

For edits, the same size discipline applies. Image API edits can accept one or more reference images and an optional mask. When multiple images are supplied, the mask applies to the first image. The image and mask must have the same format and dimensions, remain under the documented file limit, and the mask needs an alpha channel. With gpt-image-2, omit input_fidelity; image inputs are already processed at high fidelity.

When to request 4K and when to upscale

Request 4K directly when the final canvas is known, the composition has already been approved, and the workflow can tolerate experimental high-resolution behavior. It is especially reasonable for a small number of hero assets where the team can inspect every candidate.

Start smaller when you need many prompt variants, frequent approvals, or a large batch of localized assets. A sensible sequence is:

  1. Explore at 1024x1024, 1536x1024, or 1024x1536 with low quality.
  2. Approve subject, composition, copy placement, and safety.
  3. Test the intended 2K or 4K canvas at medium or high quality.
  4. If direct 4K is too variable, generate a stable smaller master and upscale it in a separately labeled step.
  5. Verify the final file after every transform and delivery stage.

An upscale changes pixels after generation; it does not retroactively make the original a native 4K response. Record the source dimensions, upscale method, final dimensions, and whether the final asset passed visual QA. That small provenance note prevents a later team from treating two different pipelines as interchangeable.

Also keep size and quality separate. size requests a pixel canvas. quality controls rendering effort with low, medium, high, or auto—and auto is the default. High quality does not guarantee exact typography or layout, and 4K does not guarantee high visual quality.

Format, cost, and account caveats

PNG is the default Image API format. JPEG and WebP are also supported, and output_compression from 0 to 100 applies to JPEG and WebP. Choose the master format based on editing and delivery needs, then verify the produced file rather than trusting its extension. Direct gpt-image-2 requests do not currently support background: "transparent"; use opaque or automatic background behavior and handle transparency in a separate pipeline if required.

There is no single official fixed price for every 4K image. As checked on July 22, 2026, standard GPT Image 2 pricing is token-based: image input is $8.00 per million tokens, cached image input is $2.00, image output is $30.00, text input is $5.00, and cached text input is $1.25. Those rates can change, and the final request cost depends on size, quality, prompt tokens, reference images, and API surface.

OpenAI's calculator table gives examples for selected 1024 and 1536 shapes, but it does not publish one universal 4K per-image row. Use the current image calculator and pricing page for the exact request you plan to run. For a fuller bill calculation, use the separate GPT Image 2 cost guide.

Access is account-specific too. The API Free usage tier does not support gpt-image-2; some organizations may need API Organization Verification, and actual project limits depend on the account and usage tier. Check the Platform limits page before load testing. Quota, TPM, IPM, and 429 troubleshooting belong in the GPT Image 2 usage limits guide, not in the pixel-size contract.

ChatGPT Images is not the GPT Image 2 API contract

OpenAI's ChatGPT Images Help page currently says ChatGPT Images 2.0 is available on all ChatGPT tiers and on web, iOS, and Android. The consumer interface offers aspect-ratio selection and can create transparent-background images.

None of that means the API Free tier supports gpt-image-2, that ChatGPT plan allowances become API rate limits, or that selecting an aspect ratio in ChatGPT sends an exact API WIDTHxHEIGHT contract. It also does not make transparent background a supported direct gpt-image-2 API parameter.

Use ChatGPT when the task is interactive consumer image creation. Use the OpenAI API when software needs explicit request fields, programmatic output handling, account-level billing, and automated verification. Keep receipts, limits, and claims attached to the surface that actually produced the file.

Troubleshoot a wrong-size or failed result

Work from the payload toward delivery:

  1. Log the final outbound request. Confirm the actual model, size, quality, and format after any wrapper or request builder modifies them.
  2. Run all four size checks. Do not assume a common screen or cinema size is valid.
  3. Remove unsupported options. For GPT Image 2, transparent background is a common mismatch.
  4. Classify the API error. Correct invalid dimensions or inputs; retry transient 429 or 5xx failures with appropriate backoff rather than retrying every error blindly.
  5. Decode the returned base64. Verify that a nonempty response becomes a valid image file.
  6. Measure the original. Record format, width, and height.
  7. Measure every derivative. Check upload processing, CDN query parameters, responsive variants, and download endpoints.
  8. Label fallback output honestly. If a 2048x1152 generation was enlarged to 3840x2160, call it upscaled 4K.

If the API returns the requested pixels but detail is poor, changing the prompt may help the visual result; it will not change the dimension contract. If the pixels are wrong, inspect size handling and post-processing before revising the prompt.

FAQ

Does GPT Image 2 support 4K output?

Yes. The documented popular sizes include 3840x2160 for landscape and 2160x3840 for portrait. Both are above OpenAI's experimental threshold, so verify the decoded and delivered files before calling the asset production-ready.

Is 4096x2160 supported?

No. GPT Image 2's maximum edge is 3840px. The label ā€œ4Kā€ does not make 4096x2160 or 4096x4096 valid under the direct API size contract.

Can I get 4K by putting ā€œ4Kā€ in the prompt?

Not reliably. Prompt language describes the desired image; the API size field requests exact pixels. Set a valid size and verify the saved file.

Is 16:9 the same as 4K?

No. 2048x1152 and 3840x2160 are both 16:9, but only the latter is a 4K canvas. Aspect ratio describes shape, not pixel count.

Is native 4K always better than upscaling?

No. Direct 4K avoids a separate enlargement step when it works, but it is experimental and may cost more to iterate. A smaller approved master plus a clearly labeled upscale can be more predictable for large variant sets.

Why did my downloaded 4K image become 1080p?

The original may have been resized by a CMS, CDN, responsive-image rule, or download endpoint. Measure both the decoded original and the exact public URL or downloaded derivative.

Should I use the Image API or Responses API for 4K?

Use the Image API for a direct generation or edit. Use Responses when image generation is one tool within a conversational or multi-step mainline-model workflow. Both surfaces still require valid output options and file verification.

Does GPT Image 2 support transparent 4K PNGs?

Not as a direct gpt-image-2 API request. ChatGPT Images can create transparent backgrounds on the consumer surface, but that does not expand the API model's supported background values.

Is GPT Image 2 free because ChatGPT Images is on the Free tier?

No. ChatGPT consumer access and OpenAI API access are separate. The API Free usage tier does not support gpt-image-2, while ChatGPT Images 2.0 is currently available across ChatGPT tiers with consumer-specific allowances.

What is the official price of one 4K image?

OpenAI does not publish one universal fixed 4K per-image price. Estimate the chosen size and quality with the current calculator, then include text input, edit-image inputs, and—when using Responses—the mainline model's token usage.

Tags

Share this article

XTelegram