Quotaflow
llms.txtOpenAPIDashboard
Model Library

GPT Image 2 — Image generation API

ItemValue
Modelgpt-image-2
Aliasopenai/gpt-image-2
EndpointPOST https://api.quotaflow.ai/openai/v1/images/generations
ExecutionSynchronous V3 runtime
BillingImmutable token-based Image2 BillingFact
curl https://api.quotaflow.ai/openai/v1/images/generations \
  -H "Authorization: Bearer $QUOTAFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A clean editorial illustration of an AI workflow.",
    "size": "1024x1024",
    "quality": "medium",
    "response_format": "b64_json"
  }'

Generation, editing and streaming

gpt-image-2 supports /openai/v1/images/generations and /openai/v1/images/edits, including reference images and masks. An edit accepts multipart image files or JSON image references; OpenAI account file_id references are not accessible here. Asynchronous image jobs and the Responses image_generation tool are not this interface.

stream: true with n: 1 returns SSE. Generation ends with image_generation.completed; editing ends with image_edit.completed. partial_images (0–3) requires streaming. Partial generation frames require matching capacity and can be fewer than requested; edits can complete without partial frames.

Request parameters

The public response's usage is the request's billable usage, from validated reporting or supported estimates. It is not a raw supplier token-count contract. Prices depend on the model and account terms.

For edit and streaming cURL examples, request-size limits and error handling, read the Images API guide. GPT Image 2.5/2.6 have separate model IDs and additional quality/output options; see their own guides rather than copying those fields to GPT Image 2.