Creates images from text prompts with OpenAI-compatible image generation models.
Authorization: Bearer {API_KEY} 鉴权/v1/images/editsgpt-image-1、dall-e-3 和 dall-e-2 的可选参数不同,重点差异已经放进上方原生参数区url,建议由服务端尽快转存;如果返回 b64_json,避免前端一次性解码过多大图Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Text prompt for the desired image.
"一只可爱的小猫在花园里玩耍,阳光明媚,油画风格"
Image generation model.
gpt-image-1, dall-e-3, dall-e-2 Only supported by gpt-image-1.
transparent, opaque, auto Only supported by gpt-image-1.
auto, low Number of images to generate. dall-e-3 only supports 1.
1 <= x <= 10Compression level for gpt-image-1 jpeg/webp output.
0 <= x <= 100Only supported by gpt-image-1.
png, jpeg, webp Number of partial images for streaming previews.
0 <= x <= 3Supported values vary by model.
auto, high, medium, low, hd, standard Only applies to dall-e-2 and dall-e-3.
url, b64_json Allowed values depend on the selected model.
1024x1024, 1536x1024, 1024x1536, auto, 256x256, 512x512, 1792x1024, 1024x1792 Only supported by gpt-image-1.
Only supported by dall-e-3.
vivid, natural Unique identifier for the end user.