GPT Image 2 Editing
openai/gpt-image-2/editGPT Image 2 Editing supports image editing and multi-image synthesis with high-quality results.
- Base price
- $0.20USD / run
- Execution
- async
- Model type
- image
- Input fields
- 6
Try the model
Playground
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
Your output will appear here
Complete the inputs, then click Run.
Specifications
Pricing
- Base price
- $0.20 / run
- Billing formula
- (params.aspect_ratio == "21:9" || params.aspect_ratio == "9:21") ? ((params.quality ?? "high") == "low" ? 0.03 : ((params.quality ?? "high") == "medium" ? 0.08 : 0.30)) : ((params.quality ?? "high") == "low" ? 0.015 : ((params.quality ?? "high") == "medium" ? 0.05 : 0.20))
Context & modalities
- Input
- Schema-defined
- Output
- image
Capabilities
- Chat
- Not supported
- Vision
- Not supported
- Reasoning
- Not supported
- Structured output
- Not supported
- Function calling
- Not supported
- Audio input
- Not supported
Access
- Provider
- OpenAI
- Model ID
- openai/gpt-image-2/edit
- Execution
- async
- API
- Unified Run API
- Endpoint
- /v1/run
API README
OpenAI GPT Image 2 Edit
Precision image editing powered by OpenAI's GPT Image 2. Modify existing images with natural language — swap backgrounds, combine multiple sources, add or remove elements — while preserving the original style and quality.
- Need to generate from scratch? Try OpenAI GPT Image 2.
Highlights
Multi-image synthesis — Accepts up to 16 input images in a single request. Combine product photos into a gift basket, merge reference images into a cohesive scene, or apply style from one image to another.
Context-aware editing — Understands what to change and what to preserve. Edits blend naturally with surrounding pixels, maintaining lighting consistency, material textures, and perspective.
High-fidelity input — Processes source images at full resolution without downsampling. Fine details like fabric weave, text on labels, and subtle gradients survive the editing process.
Pricing
| Quality | Standard Size | Large (21:9 / 9:21) |
|---|---|---|
| Low | $0.015 | $0.03 |
| Medium | $0.05 | $0.08 |
| High | $0.20 | $0.30 |
Standard covers most aspect ratios (1:1, 2:3, 3:2, 4:3, 16:9, etc). Large applies to ultra-wide/tall formats only.
When to Use
| ✅ Good fit | ❌ Consider alternatives |
|---|---|
| Product photo background swaps | Generating images from zero (use Generation model) |
| Combining multiple items into one scene | Pixel-perfect mask control (limited stability) |
| Packaging and label visualization | Real-time interactive editing |
| Style transfer across images | Video frame manipulation |
| Adding text overlays to existing photos | Simple crops or color adjustments |
Input Requirements
- Images provided as publicly accessible URLs
- Supported formats: PNG, JPEG, WebP
- Up to 16 images per request
- Max file size: 50MB per image
- For best results: use consistent lighting and resolution across input images
Technical Specs
| Spec | Value |
|---|---|
| Input | Text prompt + 1–16 image URLs |
| Output | PNG, JPEG, or WebP |
| Resolution | 655,360 – 8,294,400 total pixels |
| Max edge | 3,840 px |
| Aspect ratio | Up to 3:1 |
| Edge constraint | Multiples of 16 |
| Execution | Async (submit → poll for result) |
Related
- OpenAI GPT Image 2 — Text-to-image generation from scratch
Start building
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "openai/gpt-image-2/edit",
"images": [
"https://cdn.openai.com/API/docs/images/body-lotion.png",
"https://cdn.openai.com/API/docs/images/soap.png",
"https://cdn.openai.com/API/docs/images/incense-kit.png",
"https://cdn.openai.com/API/docs/images/bath-bomb.png"
],
"prompt": "Generate a photorealistic image of a gift basket on a white background labeled 'Relax & Unwind' with a ribbon and handwriting-like font, containing all the items in the reference pictures.",
"quality": "high",
"output_format": "png"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"Choose your model
Compare models
| Model | Context | Input / 1M | Output / 1M | Released |
|---|---|---|---|---|
GPT Image 2 EditingThis model OpenAI | — | — | — | Apr 21, 2026 |
OpenAI | — | — | — | Aug 20, 2026 |
OpenAI | — | — | — | Aug 20, 2026 |
OpenAI | — | — | — | Aug 20, 2026 |
OpenAI | — | — | — | Aug 20, 2026 |
OpenAI | — | — | — | Apr 21, 2026 |
