English
cURL
curl --request POST \ --url https://llm.ai-nebula.com/v1/images/generations \ --header 'Authorization: <authorization>' \ --header 'Content-Type: application/json' \ --data ' { "model": "<string>", "prompt": "<string>", "response_format": "<string>", "contents": [ {} ] } '
{ "code": 200, "msg": "Success", "data": { "data": [ { "url": "", "b64_json": "iVBORw0KGgoAAAANSUhEUgAABAAAAAQA...", "revised_prompt": "" } ], "created": 1757320007 } }
Bearer sk-xxxxxxxxxx
gemini-2.5-flash-image-preview
b64_json
url
curl -X POST "https://llm.ai-nebula.com/v1/images/generations" \ -H "Authorization: Bearer sk-xxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "model": "gemini-2.5-flash-image-preview", "prompt": "A cute orange kitten sitting in a garden, sunny day, high quality photography", "response_format": "b64_json" }'
curl -X POST "https://llm.ai-nebula.com/v1/images/generations" \ -H "Authorization: Bearer sk-xxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "model": "gemini-2.5-flash-image-preview", "response_format": "b64_json", "contents": [ { "role": "user", "parts": [ {"text": "Generate a bird eye view of Canton Tower based on this image"}, {"image": "data:image/png;base64,iVBORw0KGgoAAxxxx..."} ] } ] }'
curl -X POST "https://llm.ai-nebula.com/v1/images/generations" \ -H "Authorization: Bearer sk-xxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "model": "gemini-2.5-flash-image-preview", "response_format": "b64_json", "contents": [ { "role": "user", "parts": [ {"text": "Generate a bird eye view of Canton Tower based on this image"}, {"image": "data:image/png;base64,iVBORw0KGgoAAxxxx..."} ] }, { "role": "model", "parts": [ {"text": "Generated 1 image for you"}, {"image": "data:image/png;base64,iVBORw0KGgoAAxxxx..."} ] }, { "role": "user", "parts": [ {"text": "Change the scene to a snowy night"} ] } ] }'