← All Models
GPT Image 2
OpenAI's latest image model. High-fidelity photorealistic generation and powerful image editing with masks. Token-based pricing varies by prompt length and output quality/size.
Specifications
| Provider | OpenAI |
| Category | Image |
Pricing (Starter tier)
1,040.00 credits / 1M input tokens
3,900.00 credits / 1M output tokens
Higher tiers get volume discounts. See tiers
Quick Start
curl https://query.genx.sh/api/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-image-2","prompt":"A photorealistic golden retriever on a beach at sunset","size":"1024x1024","quality":"high"}'
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
prompt |
string | required | — | Text description of the image to generate or edit |
size |
string | optional | 1024x1024 |
Image dimensions: auto, or WxH (both multiples of 16, max edge 3840, ratio ≤3:1). Common: 1024x1024, 1536x1024, 1024x1536, 2048x2048, 3840x2160 |
quality |
string | optional | auto |
Output quality: auto, high, medium, low |
output_format |
string | optional | png |
Image format: png, jpeg, webp |
background |
string | optional | — | Background style: opaque, auto |
image |
string | optional | — | Input image URL or data URI for editing |