Skip to main content
POST
https://api.lumenfall.ai
/
openai
/
v1
/
images
/
edits
curl https://api.lumenfall.ai/openai/v1/images/edits \
  -H "Authorization: Bearer $LUMENFALL_API_KEY" \
  -F "model=gemini-3-pro-image" \
  -F "image=@original.png" \
  -F "prompt=Add a red hat to the person" \
  -F "size=1024x1024"
{
  "created": 1702345678,
  "data": [
    {
      "url": "https://media.lumenfall.ai/abc123.png",
      "revised_prompt": "Add a stylish red fedora hat to the person in the image"
    }
  ]
}
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.
Each parameter has a badge showing how Lumenfall handles it across different providers:
BadgeMeaning
PassthroughPassed as-is; some providers may ignore it
RenamedField name is mapped to the provider’s expected name
ConvertedValue is transformed to match each provider’s format
EmulatedWorks consistently on all models, even if the provider doesn’t natively support it
Learn more about unified model behavior.
image
file or array
required
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
prompt
string
required
A text description of the desired edit. Maximum length varies by model.Renamed
model
string
required
The model to use for image editing. See Models.
mask
file
An 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
n
integer
default:"1"
The number of images to generate. Must be between 1 and 10. Some models only support n=1.Emulated
size
string
default:"1024x1024"
The size of the generated images. Supported sizes vary by model:
  • 256x256
  • 512x512
  • 1024x1024
  • 1024x1536 (portrait)
  • 1536x1024 (landscape)
Converted
quality
string
default:"auto"
The quality of the image. Options vary by model: auto, low, medium, high, standard, hd.Passthrough
response_format
string
default:"url"
The format of the generated images. Options:
  • url — Returns a URL to the generated image
  • b64_json — Returns the image as base64-encoded JSON
Emulated
user
string
A unique identifier representing your end-user. Only used by some providers.Passthrough

Query parameters

dryRun
boolean
default:"false"
If true, returns a cost estimate without editing the image. See Cost estimation.

Response

created
integer
Unix timestamp of when the request was created.
data
array
Array of generated image objects.
curl https://api.lumenfall.ai/openai/v1/images/edits \
  -H "Authorization: Bearer $LUMENFALL_API_KEY" \
  -F "model=gemini-3-pro-image" \
  -F "image=@original.png" \
  -F "prompt=Add a red hat to the person" \
  -F "size=1024x1024"
{
  "created": 1702345678,
  "data": [
    {
      "url": "https://media.lumenfall.ai/abc123.png",
      "revised_prompt": "Add a stylish red fedora hat to the person in the image"
    }
  ]
}