gpt-image-2
Provided by OpenAI · Image model
Parameters
| Input modalities | text, image |
|---|
| Output modalities | image |
|---|
Capabilities
Vision inputPrompt cachingStructured output
Official pricing
| Input | $5/M |
|---|
| Output | $30/M |
|---|
| Cache read | $1.25/M |
|---|
Tiers
| 低 1K | $0.006 |
|---|
| 低 1.5K | $0.005 |
|---|
| 中 1K | $0.053 |
|---|
| 中 1.5K | $0.041 |
|---|
| 高 1K | $0.211 |
|---|
| 高 1.5K | $0.165 |
|---|
Call example
curl https://api.openai.com/v1/images/generations -H "Authorization: Bearer $OPENAI_API_KEY" -H "Content-Type: application/json" -d '{"model":"gpt-image-2","prompt":"a red fox in a snowy forest","size":"1024x1024","quality":"medium"}'