Back to Guides

GPT Image 2 API Guide: Features, Pricing & Code

GPT Image 2 explained: reasoning mode, multi-image consistency, real pricing, and working code to start today.

GPT Image 2 API Guide: Features, Pricing & Code

OpenAI released GPT Image 2 on April 21, 2026, as the engine behind ChatGPT Images 2.0, replacing both DALL-E 3 and the interim GPT Image 1.5. It's the first OpenAI image model with a built-in reasoning step, and the jump shows in text rendering, multi-image consistency, and instruction following. It's live on Apiframe now, one key, one endpoint, the same billing and concurrency you're already using for every other model on the platform.

This guide covers what's actually new, one real limitation worth knowing before you build, then walks through generating with it, including pricing you can plan a budget around.

What's New in GPT Image 2

Reasoning built in. Before generating, the model can plan the layout, search the web for references, and self-check its output, a "thinking" step no earlier OpenAI image model had.

Up to 8 images from one prompt. It produces a coherent set of images in a single shot, keeping characters and objects consistent across all of them, useful for storyboards and brand campaigns that used to require separate, disconnected generations.

State-of-the-art text rendering. Dense and multilingual text renders cleanly across multiple scripts, dependable for posters, packaging, menus, and UI labels where earlier models tended to garble small or non-Latin text.

Precise instruction following. OpenAI describes it as a step change in following detailed prompts and in placing and relating objects accurately within a scene.

Higher resolution and flexible editing. Up to 2K resolution via the API, plus multi-turn editing that preserves identity and context across changes.

One real limitation worth knowing upfront

Apiframe's own marketing copy for GPT Image 2 says "up to 2K resolution via the API," but the actual parameter set doesn't include a resolution or size selector, only three aspect ratios (1:1, 3:2, 2:3), with resolution implied by the quality setting rather than something you can directly request. If you need explicit control over output resolution, or aspect ratios beyond those three, that's not currently exposed on Apiframe's gpt-image-2 endpoint. Worth knowing before you build around a specific resolution target.

Getting Started on Apiframe

GPT Image 2 runs through the same API key and billing as every other model on Apiframe, Flux, Nano Banana Pro, Kling, and the rest, so it's not a separate integration, it's one more model available on the integration you may already have. Requests are asynchronous: submit a job, then poll for the result or receive it via webhook. No OpenAI account required.

If you're starting from scratch, sign up for free credits, grab an API key, and you're generating within minutes. Full parameter reference lives in the GPT Image 2 docs, or try it directly in Apiframe Studio without writing any code first.

Full Code Walkthrough

1. Text-to-image

bash
curl -X POST https://api.apiframe.ai/v2/images/generate \
  -H "X-API-Key: afk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "Infographic explaining how photosynthesis works, bold sans-serif labels, light academic color palette",
    "gptImage2Params": {
      "quality": "high",
      "aspect_ratio": "3:2"
    }
  }'

The same call in Python:

python
import requests

response = requests.post(
    "https://api.apiframe.ai/v2/images/generate",
    headers={
        "X-API-Key": "afk_your_api_key_here",
        "Content-Type": "application/json",
    },
    json={
        "model": "gpt-image-2",
        "prompt": "Infographic explaining how photosynthesis works, bold sans-serif labels, light academic color palette",
        "gptImage2Params": {
            "quality": "high",
            "aspect_ratio": "3:2",
        },
    },
)
print(response.json())  # { "jobId": "...", "status": "QUEUED" }

2. Image editing and combination

Pass one or more input_images to edit an existing image, or combine subjects and styles into a single output:

python
response = requests.post(
    "https://api.apiframe.ai/v2/images/generate",
    headers={"X-API-Key": "afk_your_api_key_here"},
    json={
        "model": "gpt-image-2",
        "prompt": "Change the red hat to a light-blue velvet beret. Preserve the subject's face, pose, and lighting.",
        "gptImage2Params": {
            "input_images": ["https://example.com/portrait.jpg"],
            "quality": "auto",
        },
    },
)

The model automatically processes input images at high fidelity, there's no fidelity knob to adjust, unlike GPT Image 1.5, more on that in GPT Image Versions Explained.

3. Poll for the result

The submission returns a 202 with a jobId. Poll GET /v2/jobs/{id} until the status is COMPLETED, or supply a webhook_url instead:

python
import time

while True:
    job = requests.get(
        f"https://api.apiframe.ai/v2/jobs/{job_id}",
        headers={"X-API-Key": "afk_your_api_key_here"},
    ).json()
    if job["status"] in ("COMPLETED", "FAILED"):
        break
    time.sleep(3)

print(job["result"])  # { "images": ["https://cdn2.apiframe.ai/images/..."] }

Average completion time is around 15 seconds, fast enough that polling is practical here even without a webhook, though webhooks still scale better for high-volume production use.

Pricing

GPT Image 2 bills a flat credit cost per image, based on the quality setting, and the total is multiplied by number_of_images:

QualityCreditsPay-as-you-go (top-up, $0.01/credit)Growth-plan effective ($0.00383/credit)
Low4$0.04~$0.015
Medium9$0.09~$0.034
High23$0.23~$0.088
Auto23$0.23~$0.088

The gap between the two rates comes down to how you pay. Buying credits as a pay-as-you-go top-up runs $0.01 each, no subscription needed. Every paid monthly plan bundles credits at a cheaper effective rate instead, down to $0.00383/credit on the Growth plan ($199/mo, 52,000 credits). Full plan breakdown on the pricing page.

A request with quality: "medium" and number_of_images: 4 costs 9 × 4 = 36 credits regardless of which rate applies to your account.

GPT Image 2 vs GPT Image 1.5

A cheaper, still-current sibling model, gpt-image-1.5, remains available on Apiframe, mainly relevant if you need transparent background output, which GPT Image 2 dropped in favor of auto/opaque only. Full breakdown of what changed between the two in GPT Image Versions Explained.

Use Cases

Storyboards and brand campaigns. The up-to-8-image consistency makes multi-panel sequences and campaign sets viable without stitching together separate, disconnected generations.

Posters, packaging, and UI mockups. Text rendering strong enough to trust for the final asset, not just a placeholder to redo by hand, pair it with Flux 2 Pro if you want to compare photoreal styles on the same project.

Product edits. Multi-turn editing that preserves identity and composition across changes, useful for iterating on a single asset without regenerating it from scratch each time.

Educational and informational content. Infographics and diagrams benefit directly from the reasoning step, which plans layout before rendering a single pixel.

FAQ

What is GPT Image 2?

OpenAI's newest image generation and editing model, released April 21, 2026, as the engine behind ChatGPT Images 2.0, replacing DALL-E 3 and GPT Image 1.5.

How is it different from GPT Image 1.5?

It adds a reasoning ("thinking") step, stronger multilingual text, consistent multi-image sets, and drops transparent background support. Full comparison in GPT Image Versions Explained.

Does it support image editing?

Yes, via the input_images parameter. One reference image edits it, multiple combine subjects or styles into one output.

What resolutions and aspect ratios does it support on Apiframe?

Three aspect ratios (1:1, 3:2, 2:3), with resolution tied to the quality setting rather than directly selectable, see the limitation noted above.

How much does the GPT Image 2 API cost?

4 credits ($0.04) for low quality, 9 ($0.09) for medium, 23 ($0.23) for high or auto, at the pay-as-you-go rate. Paid plans bring the effective rate down further, as low as $0.00383/credit on Growth.

Do I need an OpenAI account?

No. Apiframe manages access on your behalf, same key and billing as every other model on the platform.

Get your API key and start with free credits, or go straight to the GPT Image 2 model page for the full spec and live docs.

Ready to start building?

Get your API key and start generating AI content in minutes.