Skip to main content
Lumenfall is fully compatible with all official OpenAI SDKs. Since Lumenfall implements the OpenAI API specification, you can use any official SDK by simply changing the base URL and API key. Official SDKs:

Installation

pip install openai

Configuration

from openai import OpenAI

client = OpenAI(
    api_key="lmnfl_your_api_key",
    base_url="https://api.lumenfall.ai/openai/v1"
)

Generate images

response = client.images.generate(
    model="gemini-3-pro-image",
    prompt="A serene mountain landscape at sunset with dramatic clouds",
    n=1,
    size="1024x1024"
)

print(response.data[0].url)

Edit images

response = client.images.edit(
    model="gpt-image-1.5",
    image=open("original.png", "rb"),
    prompt="Add a rainbow in the sky",
    n=1,
    size="1024x1024"
)

print(response.data[0].url)

Environment variables

All SDKs support environment variables for configuration:
export OPENAI_API_KEY="lmnfl_your_api_key"
export OPENAI_BASE_URL="https://api.lumenfall.ai/openai/v1"
Store your API key in environment variables rather than hardcoding it in your source code. Never commit API keys to version control.

Generation options

ParameterTypeDefaultDescription
modelstringrequiredModel ID (e.g., gemini-3-pro-image, gpt-image-1.5, flux.2-max)
promptstringrequiredText description of the desired image
ninteger1Number of images to generate (1-10)
sizestring1024x1024Image dimensions
qualitystringstandardImage quality (standard or hd)
response_formatstringurlResponse format (url or b64_json)
stylestringvividImage style (vivid or natural)

Next steps