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
Python
JavaScript / TypeScript
Go
C# / .NET
Java (Maven)
Ruby
Configuration
Python
JavaScript / TypeScript
Go
C# / .NET
Java
Ruby
from openai import OpenAI
client = OpenAI(
api_key = "lmnfl_your_api_key" ,
base_url = "https://api.lumenfall.ai/openai/v1"
)
Generate images
Python
JavaScript / TypeScript
Go
C# / .NET
Java
Ruby
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
Python
JavaScript / TypeScript
Go
C# / .NET
Java
Ruby
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
Parameter Type Default Description modelstring required Model ID (e.g., gemini-3-pro-image, gpt-image-1.5, flux.2-max) promptstring required Text description of the desired image ninteger 1Number of images to generate (1-10) sizestring 1024x1024Image dimensions qualitystring standardImage quality (standard or hd) response_formatstring urlResponse format (url or b64_json) stylestring vividImage style (vivid or natural)
Next steps