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 }'
Kopieren
{ "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
Bild erstellen
Erstellt ein Bild basierend auf einem Prompt
POST
/
v1
/
images
/
generations
Kopieren
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 }'
Kopieren
{ "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..." } ]}
Array mit Platzhalterdaten. url ist leer bis zur Fertigstellung.
Wenn Sie status: "pending" erhalten, verwenden Sie den Bildstatus abrufen Endpunkt, um das Ergebnis abzufragen.
Kopieren
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 }'
Kopieren
{ "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..." } ]}