Text-to-Image (Sync)
Image Services
Text-to-Image (Sync)
同步文生图,兼容 OpenAI POST /v1/images/generations。成功响应后立即扣费,在 data 中返回图片结果,无需轮询。
POST
Text-to-Image (Sync)
This is a synchronous endpoint compatible with OpenAI
POST /v1/images/generations. On success, billing is applied immediately and image results are returned in data (b64_json or url) — no task polling required.Unlike Create Image Task (async POST /images), which returns a task_id and requires Query Image Task.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Text prompt for image generation
Model name. Default: gpt-image-2
Example:
"gpt-image-2"
Output size. Default: 1024x1024
Example:
"1024x1024"
Number of images. MAX: 1
Quality tier (affects billing for gpt-image-2)
Available options:
low, medium, high, auto Available options:
transparent, opaque, auto Available options:
png, jpeg, webp