Skip to main content
POST

Authorizations

string
required
All endpoints require authentication using a Bearer Token.Get the API Key:Visit the API Key Management Page to obtain your API Key.Add the following header in the request:

Body

string
required
Model NameFixed value: "gpt_image_2"
object
required
Model Parameters Object
string
required
Initiator Task IDUser-defined task identifier, required

Size × Resolution Mapping Table

aspect_ratio × resolution → Actual Pixels (13 ratios × 3 levels):
3:2 / 2:3 @ 2K is actually 2048×1360 (approximate ratio, error < 0.5%); 4K now supports all 13 ratios.

Custom Size (size parameter)

When you need precise control over pixel dimensions, use the size parameter instead of the aspect_ratio + resolution combination. Valid range: Total pixels 655,360 ~ 8,294,400 (upstream official limit) Tested effective lower limit: Total pixels ≥ 2,088,960 (approximately 1440×1452 or 2048×1020 equivalent area) Below this lower limit, the upstream does not report an error but silently replaces it with a close proportion size of about 1.57M pixels.

Common size examples

Do not pass together with aspect_ratio or resolution, otherwise a 400 will be returned.

Response

string
Initiator task ID, which can be used to query the result
string
Initial status, fixed to "pending"
number
Estimated consumed credits
string
Creation time (ISO format)