GPT Image 2 API
OpenAI's state-of-the-art image generation and editing — precise instruction following, photorealistic output, and the cleanest commercial-use license in the industry.

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's state-of-the-art image generation and editing — precise instruction following, photorealistic output, and the cleanest commercial-use license in the industry.
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.

Text To Image
OpenAI's GPT Image 2 Text-to-Image generates high-quality images from natural-language prompts. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

Edit
OpenAI's GPT Image 2 Edit enables image editing from natural-language instructions with one or more reference images. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
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
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
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
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
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.
Commercial creative work
OpenAI ships a clear, conservative commercial-use license — making GPT Image 2 the default pick for agencies and brand-facing work where licensing has to be defensible.
Photo-realistic product shots
Studio product photography style is one of GPT Image 2's strongest categories — lighting, materials, and shadows render naturally without the "AI sheen" of older models.
Editorial and news graphics
Generate accompanying imagery for editorial / blog / news content — strong instruction following means specific scene descriptions come out as written.
Concept art and design exploration
Broad style coverage across photography, illustration, painting, and graphic design — useful for early-stage exploration before art-direction lock.
Image editing via natural language
GPT Image 2's edit endpoint accepts a source image plus a text instruction — change lighting, add elements, recolour subjects without manual masking.
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.
Describe lighting, composition, and style — not just subject
Move past 'a cat' to 'a tabby cat on a windowsill, soft afternoon light streaming in, shallow depth of field, cinematic 35mm composition'. Subject + scene + lighting + camera language is the prompt formula that pulls best from image-model training data.
Use style anchors instead of artist names
'In the style of editorial photography' or 'studio product shot, white seamless background' beats vague 'high quality, masterpiece' boilerplate AND avoids the legal / licensing concerns that come with naming living artists in commercial work.
Specify resolution and aspect ratio explicitly
Don't rely on defaults. Set the target aspect ratio (1:1, 4:3, 16:9) and resolution up front. Cropping or upscaling later loses fidelity that the model could have placed correctly in the first generation.
Iterate on a locked seed before re-rolling
Lock the seed, change one prompt element at a time. Much faster than re-rolling random seeds for every change — you isolate cause-and-effect on each prompt edit and reach the target image with fewer total generations.
Use the edit endpoint for refinements, not full re-generation
Generate the base image once, then use the model's edit / inpaint endpoint to refine specific elements — text, lighting, individual subjects. Edits preserve everything you liked about the base and cost less per iteration than full re-generations.
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).
| Endpoint | Type | Starting price |
|---|---|---|
| openai/gpt-image-2/text-to-image | text-to-image | $0.060 |
| openai/gpt-image-2/edit | image-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 outputPython example
# pip install wavespeed
import wavespeed
output = wavespeed.run(
"openai/gpt-image-2/text-to-image",
{}
)
print(output["outputs"][0]) # → URL of the generated outputGPT 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 has higher native resolution (4K) and the best text rendering in the industry. GPT Image 2 wins on photo-realism, edit-fidelity, and the lowest legal friction for commercial output.
GPT Image 2 vs Seedream 5 Lite
Seedream 5 Lite is significantly cheaper per call and faster — ideal for high-volume work. GPT Image 2 wins on instruction-following accuracy and English-language text rendering.
GPT Image 2 vs Flux 1.1
Flux 1.1 has stronger generic aesthetics and a faster Schnell tier. GPT Image 2 wins on prompt accuracy, edit endpoint quality, and safety/commercial classifiers.
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's state-of-the-art image generation and editing — precise instruction following, photorealistic output, and the cleanest commercial-use license in the industry. 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.



