Loading...
Loading...
OpenAI's GPT Image 2 family for text-to-image generation and reference-based image editing via the OpenAI Images API.
Sign in to run models
No output yet
Run the model to see generated results.
import requests
result = requests.post(
'https://api.e2x.ai/v1/jobs/submit',
headers={
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json'
},
json={
'model': 'openai/gpt-image-2/edit-image',
'input': {}
}
)import time
job_id = result.json()['jobId']
while True:
response = requests.get(
f'https://api.e2x.ai/v1/jobs/{'{job_id}'}',
headers={'Authorization': f'Bearer {'{API_KEY}'}'}
)
data = response.json()['data']
if data['status'] == 'completed':
print('Done!', data['outputs'][0]['url'])
break
elif data['status'] == 'failed':
raise Exception(f"Job failed: {'{'}data['error']['message']{'}'}")
time.sleep(2)GPT Image 2 edit-image is OpenAI's gpt-image-2-2026-04-21 pointed at images you already own: retouching, compositing, masked inpainting, outpainting, and rewriting the type baked into a layout. We run it as openai/gpt-image-2/edit-image and bill $0.0525 per output image at resolution=1K, our default. fal.ai's equivalent high-tier request sits at $0.211.
No source image to work from? Then you want GPT Image 2 text-to-image instead — same model, same rate card, prompt only.
Our pricing is multiplicative, and one of the two multipliers is a trap. quality applies ×7 at every value — low, medium and high bill identically, so a lower tier costs you image quality and saves nothing. It's a quirk in how our config maps the parameter, and we're not hiding it in a footnote. Send high.
resolution is the multiplier that moves money: ×1 at 1K, ×2 at 2K, ×3 at 4K. The $0.0075 figure circulating as "GPT Image 2 pricing" is our pre-multiplier base rate, reachable only by a request sending no quality value at all — and quality is required on this endpoint, so you can't reach it here even by accident. Rates as of August 26, 2026:
| Output size | E2X, any quality value | fal.ai (high) | vs. E2X |
|---|---|---|---|
| 1024×1024 (1K, our default) | $0.0525 | $0.211 | we're 75% lower |
| 2560×1440 (2K) | $0.105 | $0.222 | we're 53% lower |
| 3840×2160 (4K) | $0.1575 | $0.401 | we're 61% lower |
Read the columns against each other. fal's price barely moves between 1K and 2K while ours doubles, so a gap that looks enormous at 1K is roughly halved by 2K. Still in our favour at every tier we checked. Budget on the tier you'll actually ship.
OpenAI can't appear in that table at all. It meters this model in tokens ($5.00/1M text input, $8.00/1M image input, $30.00/1M image output; Batch at half rate), so a "price per edit" exists only once you assume an image size and a prompt length. We charge per request.
Prices and product terms can change. Check each provider's current pricing before making a purchasing decision. Google Batch or Flex pricing is not directly equivalent to a standard on-demand API request because scheduling, availability, and processing conditions differ; it is therefore excluded from this comparison. This is a scoped comparison, not a claim that E2X is the world's cheapest option in every configuration.
OpenAI removed the input_fidelity parameter in this generation. Every source image you attach is now processed at high fidelity, with no cheaper setting to fall back on — more input tokens per attachment, every time. The market shows it: on fal.ai the edit endpoint runs roughly double the text-to-image rate at the low tier. Don't assume an edit pipeline and a generate-from-scratch pipeline cost the same underneath.
Rewriting text inside existing artwork. The strongest reason to bring an image here rather than to a Google model. Hand it a finished English infographic, ask for the German version — the type comes back legible and the layout stays put. Same for product labels, packaging copy, menu boards, UI screenshots.
Composites from many sources. Up to 16 reference images per request, and up to 10 outputs returned — variations to pick from without a round trip each.
Masked inpainting. Attach an alpha-channel mask and the white region marks what the model may change. The mask is optional; without one, your prompt scopes the edit. OpenAI's own wording is worth quoting rather than paraphrasing: the "model uses the mask as guidance, but may not follow its exact shape with complete precision." A strong hint, not a clipping path. Outpainting works the same way.
Transparency. background: "transparent" returns an alpha channel — PNG or WebP, never JPEG.
Size rules apply to inputs too: longest edge up to 3840px, both edges multiples of 16, aspect ratio no wider than 3:1, total pixels 655,360 to 8,294,400.
Three fields are required here: prompt, image_urls, and quality.
curl -X POST https://api.e2x.ai/v1/jobs/submit \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-image-2/edit-image",
"input": {
"prompt": "Replace the headline on the packaging with \"CAFÉ NOIR — GRAND CRU\" in the same typeface and weight. Leave the illustration, barcode and background untouched.",
"image_urls": ["https://example.com/coffee-box.png"],
"aspect_ratio": "4:5",
"resolution": "2K",
"quality": "high"
}
}'
You get a job ID back. Poll it, or register a webhookUrl and let us call you.
const headers = {
Authorization: `Bearer ${process.env.E2X_API_KEY}`,
"Content-Type": "application/json",
};
const submitted = await fetch("https://api.e2x.ai/v1/jobs/submit", {
method: "POST",
headers,
body: JSON.stringify({
model: "openai/gpt-image-2/edit-image",
input: {
prompt: "Composite the watch from image 1 onto the marble surface in image 2. Match image 2's lighting direction. Keep the dial engraving readable.",
image_urls: [
"https://example.com/watch-cutout.png",
"https://example.com/marble-scene.jpg",
],
aspect_ratio: "1:1",
resolution: "1K",
quality: "high",
},
}),
}).then((r) => r.json());
const { jobId } = submitted.data;
for (;;) {
const job = await fetch(`https://api.e2x.ai/v1/jobs/${jobId}`, { headers })
.then((r) => r.json());
if (job.data.status === "completed") {
job.data.outputs.forEach((o) => console.log(o.url));
break;
}
if (job.data.status === "failed") {
throw new Error(job.data.error?.message || "Edit failed");
}
await new Promise((r) => setTimeout(r, 3000));
}
Jobs move pending → processing → completed, or stop at failed or cancelled. Resolution values are uppercase — 1K, 2K, 4K — and our aspect ratio default is 1:1. The model plans and self-checks before rendering, so we publish a 60-second ETA rather than a flash-tier promise. Schema and price live in the machine-readable spec.
Five editors, one decision, and it comes down to whether letters matter.
| Model | Price / image | Pick it when |
|---|---|---|
| GPT Image 2 edit | $0.0525 (high/1K) | Text rewrites, masked inpainting, transparency, 4K |
| Nano Banana Pro | $0.075 | Faces, character consistency, role-typed references |
| Nano Banana 2 | $0.04 | The general-purpose default for most edits |
| Nano Banana 2 Lite | $0.0238 | Background swaps and colour changes, at volume |
| Nano Banana (legacy) | $0.0312 | Only if you haven't migrated off it yet |
Straight answer: if your edit doesn't touch type, you probably shouldn't be here. Nano Banana 2 handles the ordinary retouch — remove an object, swap a background, warm the grade — for less, and quicker. Editing a portrait, or keeping one person recognisable across references? Nano Banana Pro is the better tool even at a higher price.
Come here for what the Google family doesn't do as well: rewriting copy inside an existing design, mask-scoped inpainting, transparent output. The rest sits in the image-to-image category and our model catalog.
Describe the delta, not the destination. A prompt that re-describes the whole scene competes with the source, and you get a drifting regeneration instead of an edit. Name what changes, then what must survive: "keep the crop, the shadow and the label position identical" earns its place.
When several images go in, label them by index: image 1 is the subject, image 2 the environment, image 3 grading reference only. Nothing else tells the model which attachment was meant to be a palette.
For text edits, paste the exact replacement string in quotes and say what happens to the old one. Paraphrase invites reinterpretation, and reinterpretation on a product label is a reprint. Inside a mask, leave a few pixels of margin around anything precious — the boundary is guidance, not a clip.
Two watermark layers land on every output, at every quality tier, and this part we won't soften. C2PA provenance metadata identifies the file as generated by ChatGPT Images — X, Meta, LinkedIn and TikTok parse it and apply "Made with AI" labelling automatically. Underneath sits an imperceptible pixel-level watermark in the image data, which does not disappear when the metadata does.
Neither layer has an off switch, for us or any other reseller. We cannot promise white-label output on this model. Editing client assets under a contract that bars AI-labelled material? Have that conversation now.
One cost note, since the instinct is wrong here: cheap draft passes do not come from quality. Twenty low iterations bill exactly what twenty high ones do. For a cheap review loop, draft at 1K and keep 2K or 4K for the version that ships.
$0.0525 per output image at our defaults of quality=high and resolution=1K. 2K comes to $0.105 and 4K to $0.1575, since resolution multiplies by two and three. Quality tier doesn't change any of those numbers. Figures from our August 26, 2026 check.
Up to 16, per OpenAI's documented surface, and one request can return as many as 10 outputs. More attachments mean more input tokens, so a 16-reference composite isn't the same workload as a single-image retouch.
low quality edit cheaper than a high one?No. Our multiplier is ×7 whichever value you send, so low, medium and high all bill $0.0525 at 1K. The field is required here, and no setting of it lowers your cost. Use resolution to control spend.
Because input_fidelity was removed: every attached image is processed at high fidelity with no cheaper option, so an edit burns more input tokens than a prompt-only request. It shows across the market — fal.ai's edit endpoint runs about double its text-to-image rate at the low tier.
Yes, and it's the main reason to choose this model over a Google alternative. Quote the exact replacement string and say what should happen to the original. Multilingual swaps work too, including CJK, without redrawing the layout around them.
Yes. Every output carries C2PA metadata that platforms read to apply "Made with AI" labels, plus an imperceptible pixel watermark in the image data. Both apply at every quality tier and neither can be disabled by any provider.
When the edit centres on a person — portrait realism and character consistency across references are where Google's Pro tier is stronger. For routine background and colour work, Nano Banana 2 at $0.04 is enough; our text advantage buys you nothing there.