Skip to main content
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..."
    }
  ]
}

Request Body

model
string
default:"dall-e-3"
Model to use (e.g., dall-e-3, flux-1.1-pro, midjourney).
prompt
string
required
Text description of the desired image.
n
integer
default:"1"
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.
quality
string
default:"standard"
Image quality (standard or hd). DALL-E 3 only.
response_format
string
default:"url"
Response format: url or b64_json.
style
string
default:"vivid"
Style for DALL-E 3: vivid or natural.

Response

created
integer
Unix timestamp of creation.
data
array
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

ModelFeatures
dall-e-3Best quality, prompt enhancement
dall-e-2Faster, more affordable
flux-1.1-proPhotorealistic
flux-1-schnellVery fast
midjourneyArtistic style
ideogram-v3Best text rendering