Skip to main content
Lumenfall implements the OpenAI API specification for image generation. This means you can use any OpenAI-compatible SDK, tool, or library with Lumenfall by simply changing the base URL.

Supported endpoints

EndpointDescription
POST /images/generationsGenerate images from text prompts
POST /images/editsEdit images using text instructions
GET /modelsList available models
GET /models/{id}Get details about a specific model
All endpoints are served under the base URL:
https://api.lumenfall.ai/openai/v1

Using OpenAI SDKs

Any official OpenAI SDK works with Lumenfall. Configure the base URL and use your Lumenfall API key:
from openai import OpenAI

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

response = client.images.generate(
    model="gemini-3-pro-image",
    prompt="A mountain landscape at sunset"
)
See the OpenAI SDK guide for complete examples in all supported languages.

Environment variables

You can configure most OpenAI-compatible tools using environment variables:
export OPENAI_API_KEY="lmnfl_your_api_key"
export OPENAI_BASE_URL="https://api.lumenfall.ai/openai/v1"

Errors

Lumenfall returns errors using the same format and codes as the OpenAI API. Provider-specific errors are transformed to match OpenAI’s error structure, so your existing error handling works without changes. See Unified Model Behavior for details on how errors are normalized across providers.

Next steps