Unofficial community guide for the GPT Image 2 API. Not affiliated with OpenAI. All trademarks belong to their owners.
The gpt image 2 api is how you call GPT Image 2, OpenAI's current image model, from your own code: text-to-image, image-to-image editing, and (through the combined GPT-5.4 Image 2 model) image generation inside a normal chat or agent workflow. This guide collects what the three most-cited pages for the query actually say - the OpenAI model docs, the OpenRouter listing and the kie.ai hosted endpoint - so you can decide which entry point fits, what it costs, and where people trip up.
If the reason you want an image API is product photography - clean backgrounds, batch edits of a catalogue, e-commerce shots - a prompt-driven model is often the long way round. Try Supavisual - a product-photo studio with background removal and batch edits and compare the output on your own SKUs before you write any code.
GPT Image 2 is described on the kie.ai model page as OpenAI's next-generation image model, built for stronger photorealism, cleaner image editing, sharper text rendering and more polished product photography. It comes in two modes there: text-to-image and image-to-image, where you pass one or more reference images alongside the prompt. OpenAI documents the model at developers.openai.com/api/docs/models/gpt-image-2, and every page in that docs site also has a Markdown version (append .md to the URL), which is handy when you want to feed the reference into a tool rather than read it in a browser.
There are two distinct model IDs worth keeping apart. openai/gpt-image-2 is the image-only model - OpenRouter's own note says to use it for image-only workloads so you hit the Images API without LLM overhead. openai/gpt-5.4-image-2 combines the GPT-5.4 language model with GPT Image 2, so one request can reason, write code and generate an image in the same turn. According to the OpenRouter listing it has a 272K context window and was released on April 21, 2026.
- Direct from OpenAI. Sign in to the API dashboard at platform.openai.com, create an API key and install the OpenAI SDK or the OpenAI CLI, both linked from the docs sidebar. Read the model page and the API reference for the exact request shape; the docs also publish an
llms.txtindex of every page. - Through OpenRouter. Both
openai/gpt-image-2andopenai/gpt-5.4-image-2are listed. The combined model is served by a single provider (OpenAI), so there is no routing decision to make. You get OpenRouter's uptime tracking, a playground and a compare page for free. - Through kie.ai. A credit-based hosted endpoint with a form/JSON playground, a commercial-use label and a small, fixed parameter set (see below). Useful when you want a simple REST surface instead of the full OpenAI API.
Whichever route you pick, keep the key in an environment variable and never commit it.
- OpenRouter,
openai/gpt-5.4-image-2: $8 per 1M image input tokens, $30 per 1M image output tokens, $15 per 1M text output tokens and $2 per 1M cached input reads. Measured end-to-end latency was about 78 seconds at P50 over the trailing week, with 99.9% availability over three days at the time of the snapshot. - kie.ai,
gpt-image-2: 6 credits ($0.03) per 1K image, 10 credits ($0.05) per 2K, 16 credits ($0.08) per 4K. Higher top-up tiers add a 10% bonus, which the page describes as roughly 10% off those rates. - OpenAI direct: the crawled model page does not print per-image rates inline; check the model page and the pricing section of the docs for current numbers.
- Aspect ratio and resolution interact. kie.ai accepts
auto, 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16, 2:1, 1:2, 3:1, 1:3, 21:9, 9:21, 5:4, 4:5, but at 2K and 4K the ratios5:4, 4:5, 3:1, 1:3, 9:21are not supported. Validate before you submit or you pay for a failed round trip. - Transparent backgrounds are a first-class option. The
backgroundparameter takestransparent,opaqueorauto. For product cut-outs, ask for transparent up front rather than removing the background afterwards. - Reference-image limits. Image-to-image on kie.ai takes up to 16 files in
input_urls, JPEG/PNG/WEBP, 30 MB each. Host the references on a URL the endpoint can fetch. - Prompts can be long. The kie.ai prompt field allows up to 20,000 characters, so a structured brief (subject, lighting, camera, forbidden elements) is fine.
- Latency is measured in tens of seconds. A 78-second P50 for the combined model means a synchronous request handler will time out; use a job queue, webhooks or the background mode the OpenAI docs describe.
- Pick the image-only model when you do not need reasoning. The combined model bills text output at $15 per 1M tokens on top of image tokens.
| GPT Image 2 (OpenAI / OpenRouter) | GPT Image 2 via kie.ai | Supavisual | |
|---|---|---|---|
| Interface | OpenAI API and OpenRouter model IDs | Credit-based REST endpoint with form and JSON playground | Web app, no code required |
| Billing | Per token (OpenRouter: $8 in / $30 out per 1M image tokens) | Per image: $0.03 (1K), $0.05 (2K), $0.08 (4K) | Product-photo studio plan; see the site |
| Reference images | Image-to-image supported | Up to 16 files, 30 MB each | Upload your own product shots |
| Background control | Model dependent | transparent / opaque / auto |
Background removal built in |
| Batch catalogue edits | Write your own loop | Write your own loop | Batch edits built in |
Is gpt-5.4-image-2 the same thing as gpt-image-2? No. The first is GPT-5.4 plus image generation in one model; the second is the image model on its own. Use the second for pure image workloads.
Can I use the output commercially? kie.ai labels its endpoint for commercial use. For OpenAI direct, read the terms and policies page linked from the docs.
What resolutions are available? 1K, 2K and 4K on kie.ai, with the aspect-ratio restrictions above at 2K and 4K.
How long does a request take? OpenRouter measured roughly 78 seconds P50 for the combined model. Plan for asynchronous handling.
Where do I find the exact request format? The OpenAI model page (and its .md twin), the OpenRouter model page, and the API tab on the kie.ai model page.
Prompt-driven models are excellent when every image is different. When the job is the same operation across a hundred product photos - remove the background, standardise the framing, produce e-commerce shots for a marketplace listing - a purpose-built tool saves you the prompt engineering, the retry logic and the per-token surprises. Try Supavisual - product-photo studio with background removal, batch edits and e-commerce shots. If you already have an image pipeline, run the same ten SKUs through both and compare.
Last reviewed: 2026-09-22