Skip to main content
POST
https://api.lumenfall.ai
/
openai
/
v1
/
images
/
generations
curl https://api.lumenfall.ai/openai/v1/images/generations \
  -H "Authorization: Bearer $LUMENFALL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "imagen-3",
    "prompt": "A futuristic city skyline at sunset",
    "n": 1,
    "size": "1024x1024"
  }'
{
  "created": 1702345678,
  "data": [
    {
      "url": "https://storage.lumenfall.ai/generated/abc123.png",
      "revised_prompt": "A futuristic city skyline at sunset with flying vehicles and neon lights"
    }
  ]
}
Generate images from a text prompt using AI models from various providers.

Request body

prompt
string
required
A text description of the desired image. Maximum length varies by model.
model
string
required
The model to use for image generation. See available models.
n
integer
default:"1"
The number of images to generate. Must be between 1 and 10. Some models only support n=1.
size
string
default:"1024x1024"
The size of the generated images. Supported sizes vary by model:
  • 256x256
  • 512x512
  • 1024x1024
  • 1024x1792 (portrait)
  • 1792x1024 (landscape)
quality
string
default:"standard"
The quality of the image. Options: standard, hd. Only supported by some models.
response_format
string
default:"url"
The format of the generated images. Options:
  • url — Returns a URL to the generated image
  • b64_json — Returns the image as base64-encoded JSON
style
string
default:"vivid"
The style of the generated images. Options: vivid, natural. Only supported by some models like DALL-E 3.

Query parameters

dryRun
boolean
default:"false"
If true, returns a cost estimate without generating the image.

Response

created
integer
Unix timestamp of when the request was created.
data
array
Array of generated image objects.
curl https://api.lumenfall.ai/openai/v1/images/generations \
  -H "Authorization: Bearer $LUMENFALL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "imagen-3",
    "prompt": "A futuristic city skyline at sunset",
    "n": 1,
    "size": "1024x1024"
  }'
{
  "created": 1702345678,
  "data": [
    {
      "url": "https://storage.lumenfall.ai/generated/abc123.png",
      "revised_prompt": "A futuristic city skyline at sunset with flying vehicles and neon lights"
    }
  ]
}