Request Body
Model to use (e.g., dall-e-3, flux-1.1-pro, midjourney).
Text description of the desired image.
Number of images to generate (1-4, model dependent).
size
string
default:"1024x1024"
Image size. Options vary by model:
- DALL-E 3:
1024x1024, 1792x1024, 1024x1792
- Other models:
512x512, 1024x1024, etc.
Image quality (standard or hd). DALL-E 3 only.
Response format: url or b64_json.
Style for DALL-E 3: vivid or natural.
Response
Unix timestamp of creation.
Array of generated images.Each object contains:
url (string): URL of the generated image
b64_json (string): Base64-encoded image (if requested)
revised_prompt (string): The prompt used (DALL-E 3)
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..."
}
]
}
Available Models
| Model | Features |
|---|
dall-e-3 | Best quality, prompt enhancement |
dall-e-2 | Faster, more affordable |
flux-1.1-pro | Photorealistic |
flux-1-schnell | Very fast |
midjourney | Artistic style |
ideogram-v3 | Best text rendering |