A walkthrough of the latest ChatGPT image features and how to ship equivalent output from your own code

If you've used ChatGPT recently for image generation, you'll have noticed it feels different. Text renders crisply instead of melting into squiggles. Characters stay consistent across edits. Aspect ratios are easier to control. The output looks closer to what a senior designer would hand back — not a chaotic first draft.
Under the hood, that polish comes from a new generation of OpenAI image models — GPT Image 1.5 and the newer GPT Image 2 family. The good news for developers: you don't have to use ChatGPT to get the output. The same models are available through a standard, OpenAI-compatible API. This guide walks through what actually changed and shows the minimum code to reproduce equivalent results from your own application.
The visible improvements in the ChatGPT product are downstream of three model-level upgrades:
A quick stress test on the typography point, generated through the API call shown below:

Every letter is correct. No partial spellings, no warped glyphs. That's the headline difference versus the previous generation.
Three models power the new ChatGPT image experience, and all three are exposed as plain API endpoints. The trade-offs:
| Model | Best for | Speed | Price per image |
|---|---|---|---|
gpt-image-1.5 | Quick prototyping, draft variants | ~18–36 s | $0.05 |
gpt-image-2 | General production, balanced quality and cost | ~1–2 min | $0.03 |
gpt-image-2-pro | High-stakes output where reliability matters more than cost | ~2–3 min | $0.35 |
A few non-obvious points:
gpt-image-2 is cheaper than gpt-image-1.5, not more expensive. The price drop reflects a more efficient token pipeline, not a quality compromise — gpt-image-2 is the current next-gen flagship for most workflows.gpt-image-2-pro is the variant tuned for stability: lower variance across runs, higher prompt adherence, fewer reroll attempts needed in production. Use it when "the first generation must be shippable" is a real requirement.For the full per-resolution breakdown of these tiers — 1K vs. 2K vs. 4K pricing — see the GPT Image 2 API pricing guide.
These models live behind an OpenAI-compatible Chat Completions endpoint. If you've ever called chat/completions, the request shape will look familiar — you just point the base URL at the hiapi gateway and pass an image-generation model name.
from openai import OpenAI
import base64, re
client = OpenAI(
api_key="YOUR_HIAPI_KEY",
base_url="https://api.hiapi.ai/v1",
)
resp = client.chat.completions.create(
model="gpt-image-2",
messages=[{
"role": "user",
"content": "A modern minimalist digital art studio at dawn, "
"a floating holographic canvas displaying a half-painted "
"vibrant landscape, cinematic ultrawide, photorealistic"
}],
extra_body={"size": "1536x1024"},
)
# The image comes back as a base64 data URL inside the assistant message
content = resp.choices[0].message.content
match = re.search(r"data:image/\w+;base64,([A-Za-z0-9+/=]+)", content)
png_bytes = base64.b64decode(match.group(1))
with open("output.png", "wb") as f:
f.write(png_bytes)
That's the entire call. No special image endpoint, no signed upload — the model returns the image inline as base64 inside the assistant's message, and you decode it on your side.
curl -X POST https://api.hiapi.ai/v1/chat/completions \
-H "Authorization: Bearer $HIAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"messages": [{
"role": "user",
"content": "An aerial view of a Japanese zen garden in autumn, raked white gravel, koi pond, painterly impressionist style"
}],
"extra_body": {"size": "1024x1024"}
}' \
| jq -r '.choices[0].message.content' \
| grep -oE 'base64,[A-Za-z0-9+/=]+' \
| sed 's/base64,//' \
| base64 -d > output.png
The result from that prompt, run end-to-end:

Note how the texture detail in the gravel, moss, and reflections holds up at full crop — that's the resolution and detail-pass improvement at work.
The size field accepts the same shapes the OpenAI image API uses. The three most common:
1024x1024 — square. Default for social posts, thumbnails, in-app previews.1536x1024 — landscape (3:2). Hero banners, blog covers, ultrawide compositions.1024x1536 — portrait (2:3). Mobile-first images, posters, product cards.Per-image price scales with resolution tier (1K → 2K is roughly +33%, 1K → 4K is roughly double). Default to 1K and only step up when the final use surface actually rewards it — print, large-format display, or detail-critical product photography. Picking 4K out of habit doubles your bill for pixels nobody sees.
One reason gpt-image-2 is replacing earlier workflows isn't the photorealistic output — it's the range. The same model handles painterly impressionism, ornamental illustration, packaging mockups, and editorial photography from the same prompt structure. You don't need to pre-pick a "style model" the way you used to.
A single illustration-style prompt, no fine-tuning, no style-specific adapter:

For a workflow that depends on this kind of stylistic flexibility — say, generating both photo product shots and illustrated lifestyle imagery for the same listing — keeping a single model end-to-end means one prompt template, one cost line, one upgrade path.
A few things worth knowing before you build this into a product:
gpt-image-2-pro.gpt-image-1.5 for in-product previews where speed matters more than the last 5% of quality, and gpt-image-2 (or pro) for the final asset. They share the same API shape, so swapping is one model-name change.The new ChatGPT image experience is, at the API level, just three accessible models — gpt-image-1.5, gpt-image-2, and gpt-image-2-pro — fronted by a normal Chat Completions endpoint. If you've been waiting to put this generation of image quality into your own product, the migration is small: change the base URL, change the model name, decode the base64 from the response. The output above was produced exactly that way.
Start with gpt-image-2 at 1024x1024 — that's $0.03 a generation and handles the majority of real-world use cases. Browse the full image and video model lineup on the hiapi pricing page, or jump straight to the GPT Image 2 model page to send your first request.