创建图片(异步)
创建新的图片生成任务。
ratio 指定画面比例(如 1:1、16:9),默认 auto。同步 OpenAI 兼容接口(/images/generations、/images/edits)仍使用 size 表示像素尺寸(如 1024x1024)。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
Model name (supported: gpt-image-2, nano-banana, nano-banana-2, nano-banana-pro)
Text prompt for image generation
Aspect ratio. Supported values: auto, 1:1 (Square), 3:2 (Landscape), 2:3 (Portrait), 4:3 (Landscape), 3:4 (Portrait), 5:4 (Landscape), 4:5 (Portrait), 16:9 (Widescreen), 9:16 (Vertical), 2:1 (Landscape), 1:2 (Portrait), 3:1 (Wide Landscape), 1:3 (Tall Portrait), 21:9 (Ultrawide), 9:21 (Ultrawide Vertical)
auto, 1:1, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 16:9, 9:16, 2:1, 1:2, 3:1, 1:3, 21:9, 9:21 Reference image URLs or base64 strings
Image resolution (supported by gpt-image-2, nano-banana-2, etc.). Supported values: 1k, 2k, 4k. Note: gpt-image-2 with 4K resolution only supports the following aspect ratios: 16:9 / 9:16 / 2:1 / 1:2 / 21:9 / 9:21.
1k, 2k, 4k Image quality (supported by gpt-image-2). Supported values: low, medium, high.
low, medium, high