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 )