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:
stream = client.chat.completions.create( model="google/gemini-3-flash-preview", messages=[ {"role": "user", "content": "Tell me a fun fact about capybaras"} ], stream=True)for chunk in stream: if chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="")
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)
Video generation is asynchronous. Submit a request with client.videos.create(), then poll with client.videos.retrieve() until the video is ready.
Copy
import time# Submit a video generation requestvideo = client.videos.create( model="sora-2", prompt="A capybara splashing in a river at golden hour", seconds=5, size="1920x1080",)# Poll until the video is readywhile video.status not in ("completed", "failed"): time.sleep(5) video = client.videos.retrieve(video.id)print(video.output.url)
Lumenfall passes through any additional parameters to the upstream provider. This allows you to use provider-specific features that aren’t part of the standard OpenAI API.
Copy
response = client.images.generate( model="gemini-3-pro-image", prompt="A capybara relaxing in a hot spring", size="1024x1024", extra_body={ "seed": 12345, "custom_provider_param": "value" })
Additional parameters are passed directly to the provider. Check the provider’s documentation for supported parameters. Unsupported parameters may be silently ignored.