curl -X POST "https://api.lemondata.cc/v1/images/variations" \ -H "Authorization: Bearer sk-your-api-key" \ -F "[email protected]" \ -F "n=2" \ -F "size=1024x1024"
{ "created": 1706000000, "data": [ { "url": "https://..." }, { "url": "https://..." } ] }
创建给定图像的变体
multipart/form-data
dall-e-2
256x256
512x512
1024x1024
url
b64_json
用作变体基础的图像。必须是有效的 PNG 文件,小于 4MB,且为正方形。
用于图像变体的模型。目前仅支持 dall-e-2 。
要生成的图像数量。必须在 1 到 10 之间。
生成图像的尺寸。必须是 256x256 、 512x512 或 1024x1024 之一。
返回生成图像的格式。必须是 url 或 b64_json 。
代表终端用户的唯一标识符,用于滥用监控。
Response 200
图像创建时间的 Unix 时间戳。
生成的图像变体数组。 每个对象包含: url (string): 变体图像的 URL(如果 response_format 是 url ) b64_json (string): Base64 编码的图像(如果 response_format 是 b64_json )