Seedance 2.0 15% OFF | Create in Video Generator →
OpenAI·image·From $0.060/run

GPT Image 2 API

OpenAI GPT Image 2 — high-quality text-to-image and edit endpoints from natural-language prompts. Quality tiers (low / medium / high) and resolution scaling let you trade cost for fidelity per call.

Text-to-image and edit endpoints with quality tiers (low / medium / high) and resolution scaling (base, 2K, 4K). The edit endpoint accepts one or more reference images for natural-language edits.

GPT Image 2 sample output

About the GPT Image 2 API

What GPT Image 2 does, how it fits in the OpenAI model lineup, and why teams reach for it.

GPT Image 2 is a image generation and editing model from OpenAI, available through the WaveSpeedAI REST API. OpenAI GPT Image 2 — high-quality text-to-image and edit endpoints from natural-language prompts. Quality tiers (low / medium / high) and resolution scaling let you trade cost for fidelity per call.

Text-to-image and edit endpoints with quality tiers (low / medium / high) and resolution scaling (base, 2K, 4K). The edit endpoint accepts one or more reference images for natural-language edits.

The GPT Image 2 family on WaveSpeedAI ships 2 REST endpoints covering Text-To-Image, Image-To-Image workflows. Each variant carries its own pricing, parameter knobs, and example outputs — pick the one that matches your input modality and production constraints, or call several from the same API key to compose multi-step pipelines.

Run GPT Image 2 through the same API key, billing account, and rate-limit envelope you use for the other 1,000+ AI models on WaveSpeedAI. No separate vendor setup, no per-provider SDKs, no per-vendor rate-limit envelopes — one integration covers everything from text-to-image and text-to-video through audio synthesis, 3D generation, upscaling, and editing.

All GPT Image 2 API endpoints

2 endpoints available now on WaveSpeedAI — pick the variant that matches your workflow.

See GPT Image 2 in action

Real outputs generated by the GPT Image 2 API. Hover any video to preview, click to open the full-size viewer.

How to use the GPT Image 2 API

Four steps from signup to a finished generation. Full Python, Node.js, and cURL examples are in the API section below.

  1. 1

    Get an API key

    Sign up for a WaveSpeedAI account and copy your API key from the dashboard. New accounts come with free starter credits — enough to run the playground a few dozen times before billing kicks in.

  2. 2

    Submit a prediction

    POST your input as JSON to https://api.wavespeed.ai/api/v3/openai/gpt-image-2/text-to-image. The endpoint returns a prediction id immediately — generations are async so you don't hold an open connection during inference.

  3. 3

    Poll for completion

    GET https://api.wavespeed.ai/api/v3/predictions/{request_id}/result every 1-2 seconds. The response includes a status field; keep polling until it flips from"queued" or"processing" to"completed".

  4. 4

    Read the output URL

    Once status is"completed", read the URL from data.outputs[0]. The URL points to your generated media on the WaveSpeedAI CDN — image, video, audio, or 3D file depending on the GPT Image 2 variant you called.

What you can build with GPT Image 2

Common workflows developers and creators use the GPT Image 2 API for.

Text-to-image with quality tiering

openai/gpt-image-2/text-to-image generates high-quality images from natural-language prompts. The quality parameter (low / medium / high) lets you pick the cost-quality trade-off per call without switching endpoints.

text-to-imagequalitytiered

Edit with reference images

openai/gpt-image-2/edit enables image editing from natural-language instructions with one or more reference images supplied. Useful for prompt-driven refinements grounded in a specific source.

editreferenceinstruction

Resolution scaling for delivery

Resolution parameter covers base, 2K, and 4K. Pick the smallest size that meets delivery, scale up only when needed. Same prompt format across all resolutions.

resolution4kdelivery

Iterate on low / medium quality

Low quality for prompt-direction iteration; medium for delivery-grade output; high when peak fidelity is the priority.

iterationcostquality

Natural-language edit workflows

The edit endpoint takes a source image + instruction text, optionally with extra reference images. Lighter-weight than masking workflows; particularly useful for stylistic refinements ("make this warmer","add a coffee cup","remove the watermark").

editnatural-languageworkflow

Tips for prompting GPT Image 2

Practical advice for getting better outputs from GPT Image 2 — drawn from the patterns that work across image models in production pipelines.

Use the quality parameter deliberately

GPT Image 2 exposes a quality parameter with low / medium / high tiers. Iterate on low for prompt direction, refine on medium (default), reserve high for hero / delivery output where peak fidelity matters.

Use the Edit endpoint with reference images

openai/gpt-image-2/edit accepts a source image plus a text instruction, optionally with extra reference images. Lighter-weight than masking workflows — particularly useful for stylistic refinements ("make this warmer", "add a coffee cup").

Pick the smallest resolution that meets delivery

GPT Image 2's resolution parameter supports base, 2K, and 4K. Don't generate 4K when 2K is enough — same prompt format works across all resolutions and the larger sizes are slower.

Write specific, structured prompts

Subject + scene + lighting + camera language pulls from the strongest part of the model's training. 'A tabby cat sitting on a windowsill, afternoon light, shallow depth of field, 50mm lens' beats 'a cat' by a wide margin.

Use style descriptors instead of artist names

"In the style of editorial photography" or "studio product lighting" beats naming living artists — both avoids commercial licensing concerns and tends to produce more usable output.

GPT Image 2 API pricing

Pricing is per-output. The final charge scales with the parameters you set in each variant's playground (resolution, duration, output count, references).

EndpointTypeStarting price
openai/gpt-image-2/text-to-imagetext-to-image$0.060
openai/gpt-image-2/editimage-to-image$0.060

Call the GPT Image 2 API

Sign up for an API key at wavespeed.ai/accesskey, then submit a prediction via REST. The playground generates ready-to-paste samples for any combination of inputs.

HTTP example
# 1. Submit a prediction
curl -X POST "https://api.wavespeed.ai/api/v3/openai/gpt-image-2/text-to-image" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $WAVESPEED_API_KEY" \
  -d '{}'

# 2. Poll the result until status = "completed"
curl -X GET "https://api.wavespeed.ai/api/v3/predictions/{request_id}/result" \
  -H "Authorization: Bearer $WAVESPEED_API_KEY"

# Read the output URL from data.outputs[0].
Node.js example
// npm install wavespeed
const WaveSpeed = require('wavespeed');
const client = new WaveSpeed(); // reads WAVESPEED_API_KEY

const result = await client.run("openai/gpt-image-2/text-to-image", {});
console.log(result.outputs[0]); // → URL of the generated output
Python example
# pip install wavespeed
import wavespeed

output = wavespeed.run(
    "openai/gpt-image-2/text-to-image",
    {}
)
print(output["outputs"][0])  # → URL of the generated output

GPT Image 2 vs alternatives

When to pick GPT Image 2 over similar models on WaveSpeedAI.

GPT Image 2 vs Nano Banana Pro

Nano Banana Pro covers 4K text-to-image, Ultra tier, and Multi variants for batch work at base. GPT Image 2 is cheaper for medium quality, with explicit quality tiers (low/medium/high) and a reference-image-driven edit endpoint.

GPT Image 2 vs Seedream 4.5

Seedream 4.5 emphasizes typography and ships Sequential variants for multi-image consistency at GPT Image 2 has the quality-parameter knob and natural-language edit-with-reference workflow that Seedream handles differently.

GPT Image 2 vs Nano Banana 2

Nano Banana 2 ships multi-character consistency (up to 5) and optional web-search grounding at base. GPT Image 2 covers explicit quality tiers and the reference-image edit endpoint, with broader resolution scaling (base / 2K / 4K).

GPT Image 2 API — Frequently asked questions

Pricing, license, integration — common questions about running GPT Image 2 on WaveSpeedAI.

What is the GPT Image 2 API?

GPT Image 2 is a OpenAI image generation model exposed as a REST API on WaveSpeedAI. OpenAI GPT Image 2 — high-quality text-to-image and edit endpoints from natural-language prompts. Quality tiers (low / medium / high) and resolution scaling let you trade cost for fidelity per call. You can call it programmatically or try it from the playground linked above.

How do I call the GPT Image 2 API?

Sign up for a WaveSpeedAI account, copy your API key from /accesskey, then POST to https://api.wavespeed.ai/api/v3/openai/gpt-image-2/text-to-image with your input as JSON. The endpoint returns a prediction id; poll the prediction endpoint until status flips to "completed", then read the output URL from data.outputs[0]. Full Python / Node.js / cURL examples are above.

How much does the GPT Image 2 API cost?

GPT Image 2 starts at $0.060 per run. The exact cost scales with the parameters you set (resolution, duration, output count, references). The live cost preview next to the Generate button in the playground shows the exact price for your current input.

Which GPT Image 2 variants are available?

WaveSpeedAI hosts 2 GPT Image 2 endpoints: openai/gpt-image-2/text-to-image, openai/gpt-image-2/edit. Each variant has its own playground page and pricing.

Can I use GPT Image 2 outputs commercially?

Commercial usage rights follow the OpenAI model license. Most OpenAI models permit commercial output use; see each model's playground page for the specific license summary, and WaveSpeedAI's Terms of Service for platform-level conditions.

Why use GPT Image 2 on WaveSpeedAI instead of going direct?

One API key + one billing account across GPT Image 2 AND 1,000+ other AI models from other providers. No per-vendor SDK setup, no separate rate-limit envelopes, no rewrite-per-vendor integration code. Pricing is typically at parity with or below OpenAI's direct API.

About OpenAI

The team behind GPT Image 2 and the broader OpenAI model lineup on WaveSpeedAI.

OpenAI is the lab behind ChatGPT, GPT-4 and GPT-5, DALL·E, Sora, and Whisper. Its image and video models are deployed widely across consumer and enterprise applications, with a focus on instruction-following, photorealism, and conservative safety guardrails. The image API is a frequent pick for marketing and editorial use cases that need strict commercial-use clarity.

Start building with GPT Image 2 on WaveSpeedAI

Free starter credits on signup. One API key across 1,000+ AI models from OpenAI and every other provider.