Skip to main content
POST

Authorizations

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

Body

string
default:"gpt_image_2_official"
required
Name of the image generation modelFixed value gpt_image_2_official (OpenAI official gpt-image-2 model)
object
required
Model parameters object
string
required
Initiator task IDUser-defined task identifier, required

Size × Resolution Mapping Table

aspect_ratio × resolution → OpenAI Actual Pixels (13 ratios × 3 tiers):
3:2 / 2:3 @ 2K are actually 2048×1360 (approximate ratio, error < 0.5%); 4K supports only 6 ratios (combinations exceeding OpenAI’s total pixel limit are unavailable).

Response

integer
Response status code
array
Returned data array

Query Task Result

Upon successful submission, a task_id is returned. Poll the task status using GET /v1/tasks/{task_id}. For details, see the Task Query Endpoint.

Polling Recommendations

  • Initial Query Delay: Wait 10~20 seconds after submission before starting to query
  • Query Interval: Recommend every 3~5 seconds
  • Timeout Reference: high + 2K/4K combination can take up to 130 seconds; client timeout recommendation ≥ 180 seconds