Create, copy and delete API keys in your account. Each request uses the credits associated with your key.
IMAGE GENERATION API
GPT Image
2.5 API.
Create and edit images in your application. One API key, an asynchronous generation request, and a status endpoint for your results.
Examples from the shared GPT Image 2 pipeline; not an independent GPT Image 2.5 benchmark.
From API key to image
Your key. Your account.
Create, copy and delete API keys in your account. Each request uses the credits associated with your key.
Get API keyGenerate or edit
Send a text prompt or reference image URLs. Choose an aspect ratio and a supported 1K, 2K or 4K resolution.
Poll for the result
Keep the returned task ID and poll with the same API key. Read the final image URLs when the task succeeds.
export GPTIMAGE25_API_KEY='YOUR_API_KEY'
curl --fail-with-body 'https://gptimage25api.com/api/v1/images/generate' \
-H "Authorization: Bearer $GPTIMAGE25_API_KEY" \
-H 'Content-Type: application/json' \
--data '{
"model": "gpt-image-2.5",
"variant": "flare",
"prompt": "Studio photograph of a translucent green glass chair",
"aspect_ratio": "3:2",
"resolution": "1K",
"public": false
}'
# Use data.task_id from the response, with the SAME key.
curl --fail-with-body \
'https://gptimage25api.com/api/v1/images/status?task_id=YOUR_TASK_ID' \
-H "Authorization: Bearer $GPTIMAGE25_API_KEY"Everything you need to get started
Find request parameters, code examples and error handling in one guide. Copy the AI integration prompt to get help writing your client.
Image tools for your application
Send a text prompt or reference image URLs. Choose an aspect ratio and a supported 1K, 2K or 4K resolution.
Keep the returned task ID and poll with the same API key. Read the final image URLs when the task succeeds.
Integrate with cURL, Python or JavaScript using the API reference and OpenAPI.
Three steps to your first image
- 01Your key. Your account.
Create, copy and delete API keys in your account. Each request uses the credits associated with your key.
- 02Generate or edit
Send a text prompt or reference image URLs. Choose an aspect ratio and a supported 1K, 2K or 4K resolution.
- 03Poll for the result
Keep the returned task ID and poll with the same API key. Read the final image URLs when the task succeeds.
Frequently asked questions
Is this the official OpenAI API?
No. This is an independent third-party service, not affiliated with OpenAI.
How much does a request cost?
GPT Image 2.5 Flare and Sunburst: 1K = 4 credits, 2K = 6 credits, 4K = 10 credits per request.
Should I retry a timed-out request?
Do not automatically resubmit. If you received a task ID, check its status with the same key first.
Build your next image feature
Create a key and follow the guide to send your first request.
Get API key