GPT Image 2
openai/gpt-image-2GPT Image 2, OpenAI's latest image model, is capable of making fine-grained, detailed edits to images.
- Base price
- $0.20USD / run
- Execution
- async
- Model type
- image
- Input fields
- 5
Try the model
Playground
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
- Execution
- async
- API
- Unified Run API
- Endpoint
- /v1/run
API README
OpenAI GPT Image 2 Text-to-Image
OpenAI's most capable image generation model. Excels at complex scenes with accurate text rendering, strong prompt adherence, and photorealistic output across Latin and CJK scripts.
- Need to edit an existing image? Try OpenAI GPT Image 2 Edit.
Highlights
Near-perfect text rendering — Generates readable text inside images including signage, UI labels, handwritten notes, and posters. Supports Chinese, Japanese, Korean, and Latin scripts with correct spelling and consistent spacing.
Extreme prompt adherence — Follows complex multi-part instructions faithfully. Composition, lighting, material properties, and fine-grained details described in long prompts are preserved without drift.
Neutral, accurate color — Eliminates the warm color cast present in earlier models. Colors render true-to-intent across all scene types, critical for brand assets and product photography.
Flexible resolution up to 4K — Supports preset sizes and custom dimensions. Both edges must be multiples of 16, max single edge 3840px, total pixels between 655K and 8.3M.
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 |
|---|---|
| Text-heavy images (posters, ads, packaging) | Simple icons or flat illustrations |
| Complex multi-object scenes | Real-time / sub-second generation |
| Brand-accurate color requirements | Iterative mask-based editing (use Edit model) |
| Multilingual text in images | Video or animation |
| Product mockups and concept art | Extremely large batch jobs on budget |
Prompt Guide
Structure your prompts for best results:
Scene: [environment, time of day, background]
Subject: [main focus, position, action]
Details: [materials, lighting, camera angle, mood]
Text: [exact text to render, font style, placement]
Constraints: [no watermark, specific aspect ratio, color palette]
Example:
A minimalist product photo of a ceramic coffee mug on a marble countertop, morning sunlight from the left, soft shadows. The mug has "Good Morning" written in a clean serif font. White background, 3:2 aspect ratio, no other objects.
Technical Specs
| Spec | Value |
|---|---|
| Input | Text prompt (max 32,000 characters) |
| 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 Edit — Edit existing images with multi-image input support
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",
"prompt": "Generate an image of gray tabby cat hugging an otter with an orange scarf",
"quality": "high",
"aspect_ratio": "1:1",
"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 2This 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 |
