πŸŽ‰ Get Free $5 on Signup!
Models
Enterprise
Subscribe
Resource
Documentation
Console

/openai/gpt-image-2

O

OpenAI: GPT Image 2

GPT Image 2 is OpenAI's high-quality image generation and editing model. It supports text-to-image generation, image editing, high-fidelity image inputs, custom resolutions, transparent backgrounds, and multiple output formats. It is designed for professional creative workflows such as advertising, e-commerce, product rendering, posters, concept art, and visual design.

Modetext、image β†’ image
Input price$2.5 per M tokens
Output price$15 per M tokens
Context length
Listed at2026-04-21T00:00:00Z

OpenAI

Latencyβ€”
Throughputβ€”
Upload rateβ€”
Context lengthβ€”
Max outputβ€”
Input price$2.5per 1M tokens
Output price$15per 1M tokens
Cache readβ€”per 1M tokens
Cache writeβ€”per 1M tokens

Performance

Avg TPSβ€”
Avg latencyβ€”
Avg success rateβ€”
TPSβ€”
TTFTβ€”
Latencyβ€”
Success rateβ€”

Success rate

Speed

Code Example

curl ${API_BASE_URL}/v1/images/edits \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "Describe the image you want"
  }'

Replace <YOUR_API_KEY> with the API key generated on your token management page.

Authentication

All requests must include the Authorization: Bearer <TOKEN> header.

Endpoint Path

POST
openai-image-edit

Supported Parameters

ParameterTypeDefaultDescription
stringautoOutput image size. Supports custom resolutions such as 1024x1024, 1536x1024, and 1024x1536.
stringautoImage quality. Supported values: auto, low, medium, high.
stringautoBackground mode. Supported values: auto, opaque, transparent.
stringpngOutput image format. Supported values: png, jpeg, webp.
integer100Compression level from 0 to 100. Only applies to JPEG and WebP output.
integer1Number of images to generate in a single request. Supported range: 1–10.
integer0Number of partial images returned during streaming generation. Supported range: 0–3.
stringautoControls content moderation level. Supported values: auto, low.

Rate Limits

GroupRPMTPMRPD

RPM = requests per minute, TPM = tokens per minute, RPD = requests per day. Limits apply by token group.

Pricing

ProviderBilling typePrice summary
O
OpenAI-Default0%
Per token
Input price$2.5per 1M tokens
Completion price$15per 1M tokens
Cache read price$β€”per 1M tokens
Cache write price$β€”per 1M tokens