Images
Edit images
Edit images using text prompts
POST
Edit or extend images using AI models from various providers. This endpoint accepts
multipart/form-data requests for file uploads.
OpenAI CompatibilityThis endpoint implements the OpenAI Images Edit 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.
What do the parameter badges mean?
What do the parameter badges mean?
Each parameter has a badge showing how Lumenfall handles it across different providers:
Learn more about unified model behavior.
| Badge | Meaning |
|---|---|
| Passthrough | Passed as-is; some providers may ignore it |
| Renamed | Field name is mapped to the provider’s expected name |
| Converted | Value is transformed to match each provider’s format |
| Emulated | Works consistently on all models, even if the provider doesn’t natively support it |
The image(s) to edit. Must be a supported image file (PNG, WebP, or JPG) or an array of images. Maximum file size varies by model.Renamed
A text description of the desired edit. Maximum length varies by model. Not required when using an upscale model - pass
scale_factor instead.RenamedAn image whose fully transparent areas (where alpha is zero) indicate where the image should be edited. Must be a valid PNG file with the same dimensions as the source image.Passthrough
The number of images to generate. Must be between 1 and 10. Some models only support
n=1.EmulatedThe size of the generated images. Supported sizes vary by model:
256x256512x5121024x10241024x1536(portrait)1536x1024(landscape)
The quality of the image. Options vary by model:
auto, low, medium, high, standard, hd.PassthroughThe format of the generated images. Options:
url— Returns a URL to the generated imageb64_json— Returns the image as base64-encoded JSON
The image file format to generate. Lumenfall supports more formats than OpenAI:
pngLossless compression, supports transparencyjpeg— Lossy compression, smaller file sizegif— Supports animation and transparencywebp— Modern format with good compressionavif— Best compression, modern browsers only (Limited to 1,600px on the longest side. Larger images will fall back to the original format.)
Compression quality for lossy formats (
jpeg, webp, avif). Range: 1-100, where 100 is highest quality.EmulatedUsed only when calling an upscale model. Multiplies the input dimensions on each axis (e.g.,
2 doubles width and height). Supported values vary by model. When omitted, each upscale model uses its default. Ignored by non-upscale models.RenamedControls the model’s internal reasoning effort. Options:
off— no extra reasoningon— enable reasoning at the level the model treats as sensibleminimal— light reasoninghigh— maximum reasoning
enum in its model schema (/openai/v1/models?schema=true) - a model with simple on/off support advertises ["off", "on"], while a model with graded levels advertises ["off", "on", "minimal", "high"]. Sending a value the chosen model does not support returns a 400 listing the supported set. thinking_level is accepted as an alias. Omit to use the model’s default.ConvertedWhether an LLM rewrites and expands your prompt before generation. Options:
on, off. When enabled and the provider returns the rewritten prompt, it appears in the response as revised_prompt. If the routed model does not support enhancement, the parameter is ignored. Omit to use the model’s default.ConvertedA unique identifier representing your end-user. Only used by some providers.Passthrough
Query parameters
If
true, returns a cost estimate without editing the image. See Cost estimation.Response
Unix timestamp of when the request was created.
Actual output dimensions as
"WIDTHxHEIGHT" (e.g., "1024x1024"). Extracted from the generated image. May differ from the requested size if the model produced a different resolution.Array of generated image objects.