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

Aspect Ratio × Resolution Mapping Table

aspect_ratio × resolution → Actual Pixels (10 aspect ratios × 3 tiers):
4K supports all 10 aspect ratios; 2:1, 1:2, and 9:21 are not supported and will return 400 if passed.

Custom Dimensions (size Parameter)

When you need precise control over pixel dimensions, you can use the size parameter instead of the aspect_ratio + resolution combination. Valid Range: Total pixels 655,360 ~ 8,294,400 (official upstream limit) Tested Effective Lower Limit: Total pixels ≥ 2,088,960 (equivalent area to approximately 1440×1452 or 2048×1020) Below this lower limit, the upstream will not report an error, but will silently replace it with a ~1.57M pixel size of a similar aspect ratio.

Common size Examples

Do not pass this simultaneously with aspect_ratio or resolution, otherwise a 400 error 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)