Images 图像
Images 图像
1. Create image
prompt
(string,必填)
所需图像的文本描述。 DALL-E-2的最大长度为1000个字符,而DALL-E-3的最大长度为4000个字符。model
(string,必填,默认为dall-e-2)
用于图像生成的模型。n
(integer,选填,Defaults to 1)
要生成的图像数。必须在1到10之间。对于DALL-E-3,仅支持N = 1。quality
(string,选填,Defaults to standard)
将生成的图像的质量。hd 创建图像,并在整个图像中更加细节和更大的一致性。此参数仅支持DALL-E-3。response_format
(string,选填,Defaults to url)
返回生成图像的格式。必须是URL或B64_JSON之一。 URL仅在生成图像后的60分钟内有效。size
(string,选填,Defaults to 1024x1024)
生成图像的大小。对于DALL-E-2,必须是256x256、512x512或1024x1024之一。对于DALL-E-3型号,必须是1024x1024、1792X1024或1024x1792之一。style
(string or null,选填,Defaults to vivid)
生成图像的样式。必须是vivid or natural之一。vivid使模型倾向于产生超现实和戏剧性的图像。natural会导致模型产生更自然的,较不现实的图像。此参数仅支持DALL-E-3。user
(string,选填)一个唯一的标识符,代表您的终端用户,可以帮助OpenAI监测和检测滥用。了解更多信息。
示例1
2. Create image edit
image
(file,必填)要编辑的图像。必须是有效的PNG文件,小于4MB且为正方形。如果未提供遮罩,则图像必须具有透明度,该透明度将用作遮罩。 prompt
(string,必填)所需图像的文本描述。最大长度为1000个字符。 mask
(string,选填)一个额外的图像,其完全透明的区域(例如 alpha 值为零的区域)指示应该编辑图像的位置。 image
必须是有效的 PNG 文件,小于 4MB,并且具有与image
相同的尺寸。model
(string,必填)
用于图像生成的模型。此时仅支持DALL-E-2。n
(integer,选填,Defaults to 1)要生成的图像数量。必须在1到10之间。 size
(string,选填,Defaults to 1024x1024)
生成图像的大小。必须是256x256、512x512或1024x1024之一。response_format
(string,选填,Defaults to url)
返回生成图像的格式。必须是URL或B64_JSON之一。 URL仅在生成图像后的60分钟内有效。user
(string,选填)一个唯一的标识符,代表您的终端用户,可以帮助OpenAI监测和检测滥用。了解更多信息。
示例1
3. Create image variation
image
(file,必填)用作变体基础的图像。必须是有效的PNG文件,小于4MB,并且为正方形。 model
(string,选填,Defaults to dall-e-2)
用于图像生成的模型。此时仅支持DALL-E-2。n
(integer,选填,Defaults to 1)要生成的图像数量。必须在1到10之间。 response_format
(string,选填,Defaults to url)生成的图像返回格式。必须是 url
或b64_json
之一。size
(string,选填,Defaults to 1024x1024)生成图像的尺寸。必须是 256x256
、512x512
或1024x1024
之一。
user
(string,选填)一个唯一的标识符,代表您的终端用户,可以帮助OpenAI监测和检测滥用。了解更多信息。
示例1
修改于 2024-05-15 01:22:40