Image

Generate images with GPT Image 2.5

variant "flare" balances speed and quality; "sunburst" emphasizes fine detail and takes longer.

Rules: channel "stable" needs a fixed aspect_ratio ("auto" returns invalid_request). channel "economy" requires a successful credits or plan purchase; otherwise returns purchase_required (HTTP 403).

post/api/v1/image/gpt-image-2-5

Request

Headers

Idempotency-Keystring

Strongly recommended on every POST. Once a request has created (and charged for) a task, a retry with the same key and the same body within 24 hours replays that response instead of creating a second paid task. Errors raised before anything was charged, such as insufficient_credits or service_busy, are not replayed, so after fixing the cause the same key runs the request again. Reusing a key with a different body, or while the first request is still running, returns idempotency_conflict (HTTP 409). Surrounding whitespace is trimmed; keys longer than 120 characters are ignored, which disables the protection.

Request body

OR

Response

Task accepted. Poll GET /api/v1/tasks/{id} with the returned id (prefix gpt25_) until status is completed or failed, and read the files from result_urls there.

idstring required
status'processing' | 'completed' required

Usually processing. A channel that waits for the image inside the request returns completed; the task's result_urls are then ready at GET /api/v1/tasks/{id}.

model'gpt-image-2.5' required
credits_usednumber

Credits charged for this task.

remaining_creditsnumber

Changes

No recorded changes to this operation across all 1 revision of this API.