OpenAI: gpt-image-2
gpt-image-2
GPT-Image-2 is OpenAI's next-generation image generation and editing model, improving image quality, instruction following, text rendering, and iterative editing.
Provider: OpenAI|Input types
Output types|Publish Time: None
Group price
Price information for different user groups
Auto Group routing → default
| Group | Billing type | Input Price | Output Price |
|---|---|---|---|
| default | Pay as you go | $4.0000 / M tokens$8.0000 / M tokens | $15.0000 / M tokens$30.0000 / M tokens |
Provider
Pricing$4.0000 / M tokens
Input video-
Input audio-
Web Search-
Cache pricing-
Context window-
Max output-
Latency397 ms
Throughput170 TPS
Availability97.50%
Image output
API call example
Connect quickly using the standard OpenAI-compatible APIPython
1
import openai2
3
client = openai.OpenAI(4
api_key="<YOUR_API_KEY>",5
base_url="http://localhost:3000/v1"6
)7
8
response = client.chat.completions.create(9
model="gpt-image-2",10
messages=[11
{"role": "user", "content": "What model are you?"}12
]13
)14
15
print(response.choices[0].message.content)