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": "gemini-3-pro-image",
    "prompt": "A futuristic city skyline at sunset",
    "n": 1,
    "size": "1024x1024"
  }'
{
  "created": 1702345678,
  "data": [
    {
      "url": "https://media.lumenfall.ai/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.
OpenAI CompatibilityThis endpoint implements the OpenAI Images API. You can use any OpenAI SDK by changing the base URL to https://api.lumenfall.ai/openai/v1.Lumenfall normalizes behavior across all models - mapping parameters, emulating features, and standardizing errors - so your code works consistently regardless of which provider handles the request.

Request body

You can include additional parameters not listed here. They will be passed through to the underlying provider.
Each parameter has a badge showing how Lumenfall handles it across different providers:
BadgeMeaning
PassthroughPassed as-is; some providers may ignore it
RenamedField name is mapped to the provider’s expected name
ConvertedValue is transformed to match each provider’s format
EmulatedWorks consistently on all models, even if the provider doesn’t natively support it
Learn more about unified model behavior.
prompt
string
required
A text description of the desired image. Maximum length varies by model.Renamed
model
string
required
The model to use for image generation. See Models.
n
integer
default:"1"
The number of images to generate. Must be between 1 and 10. Some models only support n=1.Emulated
size
string
default:"1024x1024"
The size of the generated images. Supported sizes vary by model:
  • 256x256
  • 512x512
  • 1024x1024
  • 1024x1792 (portrait)
  • 1792x1024 (landscape)
Converted
quality
string
default:"standard"
The quality of the image. Options: standard, hd. Only supported by some models.Passthrough
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
Emulated
output_format
string
default:"png"
The image file format to generate. Lumenfall supports more formats than OpenAI:
  • png — Lossless compression, supports transparency
  • jpeg — Lossy compression, smaller file size
  • gif — Supports animation and transparency
  • webp — Modern format with good compression
  • avif — Best compression, modern browsers only (Limited to 1,600px on the longest side. Larger images will fall back to the original format.)
If the provider returns a different format, Lumenfall automatically converts the image.Emulated
output_compression
integer
default:"100"
Compression quality for lossy formats (jpeg, webp, avif). Range: 1-100, where 100 is highest quality.Emulated
style
string
default:"vivid"
The style of the generated images. Options: vivid, natural. Only supported by some models like DALL-E 3.Passthrough
user
string
A unique identifier representing your end-user. Only used by some providers.Passthrough

Query parameters

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

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": "gemini-3-pro-image",
    "prompt": "A futuristic city skyline at sunset",
    "n": 1,
    "size": "1024x1024"
  }'
{
  "created": 1702345678,
  "data": [
    {
      "url": "https://media.lumenfall.ai/abc123.png",
      "revised_prompt": "A futuristic city skyline at sunset with flying vehicles and neon lights"
    }
  ]
}