curl -X POST "https://api.lemondata.cc/v1/images/generations" \ -H "Authorization: Bearer sk-your-api-key" \ -H "Content-Type: application/json" \ -d '{ "model": "dall-e-3", "prompt": "A white cat sitting on a windowsill watching rain", "size": "1024x1024", "quality": "standard", "n": 1 }'
نسخ
{ "created": 1706000000, "data": [ { "url": "https://...", "revised_prompt": "A fluffy white cat with bright eyes sitting peacefully on a wooden windowsill, watching raindrops stream down the glass window..." } ]}
Images
إنشاء صورة
إنشاء صورة بناءً على وصف نصي
POST
/
v1
/
images
/
generations
نسخ
curl -X POST "https://api.lemondata.cc/v1/images/generations" \ -H "Authorization: Bearer sk-your-api-key" \ -H "Content-Type: application/json" \ -d '{ "model": "dall-e-3", "prompt": "A white cat sitting on a windowsill watching rain", "size": "1024x1024", "quality": "standard", "n": 1 }'
نسخ
{ "created": 1706000000, "data": [ { "url": "https://...", "revised_prompt": "A fluffy white cat with bright eyes sitting peacefully on a wooden windowsill, watching raindrops stream down the glass window..." } ]}
مصفوفة ببيانات مؤقتة. url سيكون فارغاً حتى الاكتمال.
عند استلام status: "pending"، استخدم نقطة النهاية الحصول على حالة الصورة للاستعلام عن النتيجة.
نسخ
curl -X POST "https://api.lemondata.cc/v1/images/generations" \ -H "Authorization: Bearer sk-your-api-key" \ -H "Content-Type: application/json" \ -d '{ "model": "dall-e-3", "prompt": "A white cat sitting on a windowsill watching rain", "size": "1024x1024", "quality": "standard", "n": 1 }'
نسخ
{ "created": 1706000000, "data": [ { "url": "https://...", "revised_prompt": "A fluffy white cat with bright eyes sitting peacefully on a wooden windowsill, watching raindrops stream down the glass window..." } ]}