GPT Image 2 Text to Image
openai/gpt-image-2GPT Image 2, OpenAI's latest image model, is capable of making fine-grained, detailed edits to images.
- Base price
- $0.17
$0.22USD / run - Execution
- async
- Model type
- image
- Input fields
- 5
Try the model
Playground
Examples
Select an example to load its inputs and result into the playground.
Model card
Specifications
Pricing
- Base price
- $0.17 / run
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
- Base URL
- https://api.sandbase.ai
- API
- Unified Run API
- Endpoint
- /v1/run
Human preference
Arena
Elo ratings from blind side-by-side votes, compared with other image and video models.
Rankings sourced from Artificial Analysis Arena
- Leaderboard
- Text to Image
- Rank
- #3 of 166
- Elo
- 1172 ±9
- Gap to #1
- −25
Text-to-image arena: people pick the better of two images generated from the same prompt, without seeing the model names.
- #1GPT Image 2.5 Sunburst (max)1197±9
- #2GPT Image 2.5 Flare (max)1191±9
- #3GPT Image 2 (high)1172±9
- #4Grok Imagine Image 2.01155±11
- #5MAI-Image-2.61151±10
- #6Nano Banana 2 (Gemini 3.1 Flash Image)1125±8
- #7Muse Image1115±9
- #8GPT Image 1.5 (high)1107±8
- #9MAI-Image-2.6-Flash1106±9
- #10MAI-Image-2.51104±8
API README
GPT Image 2 Text to Image
GPT Image 2 generates detailed images with strong instruction following and accurate in-image text, at three quality levels and 1K to 4K.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 50,000 characters. |
quality | low / medium / high | high | Higher quality costs more; high is the default. |
resolution | 1k / 2k / 4k | — | Output size tier; omit for 1K. |
aspect_ratio | 1:1 / 1:2 / 2:1 / 1:3 / 3:1 / 2:3 / 3:2 / 3:4 / 4:3 / 4:5 / 5:4 / 9:16 / 16:9 / 9:21 / 21:9 | 1:1 | Output frame shape. |
output_format | jpeg / png / webp | png | Output file format. |
Billing
Price depends on quality and resolution, per image:
| Quality | 1k | 2k | 4k |
|---|---|---|---|
| low | $0.01 | $0.02 | $0.03 |
| medium | $0.06 | $0.10 | $0.18 |
| high (default) | $0.22 | $0.40 | $0.72 |
Failed runs are not charged.
Prompting
- Quote any text that must appear.
- Draft at
low, finish athigh.
Limits
- One image per request.
Also on SandBase
Other GPT Image endpoints: openai/gpt-image-2.5-sunburst, openai/gpt-image-2.5-sunburst/edit, openai/gpt-image-2.5-flare, openai/gpt-image-2.5-flare/edit, openai/gpt-image-2/edit.
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 | Type | Default price | Released |
|---|---|---|---|
GPT Image 2 Text to ImageThis model OpenAI | Image | $0.22 / run | Apr 21, 2026 |
OpenAI | Image | $0.09 / run | Aug 20, 2026 |
OpenAI | Image | $0.10 / run | Aug 20, 2026 |
OpenAI | Image | $0.09 / run | Aug 20, 2026 |
OpenAI | Image | $0.10 / run | Aug 20, 2026 |
OpenAI | Image | $0.23 / run | Apr 21, 2026 |
Questions
FAQ
How do I call OpenAI GPT Image 2 Text to Image through SandBase?
Create a SandBase API key, then send requests with the model ID "openai/gpt-image-2" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.
Do I need a separate OpenAI account?
No. One SandBase API key and balance gives you access to OpenAI GPT Image 2 Text to Image and the other models in the catalog; you do not need to sign up with OpenAI separately.

