Skip to main content

Try GPT Image 2 Edit in the Workbench

Run this model interactively, tune parameters, and compare outputs.
Model ID: gpt-image-2-edit GPT Image 2 Edit is OpenAI’s image editing model available through Fal. It transforms one or more reference images using a text prompt, supporting multi-image composition and accurate preservation of subject identity, text, and layout. Ideal for photo modifications, style transfer, composition changes, and product mockups.

Example request

Use the Workbench as a request builder: configure parameters for this model in the UI, then open the API tab to copy the exact cURL or Python call.
See the image editing reference for more details.
curl -X POST https://hub.oxen.ai/api/ai/images/edit \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OXEN_API_KEY" \
  -d '{
  "model": "gpt-image-2-edit",
  "prompt": "Place the subject on the surface of the moon with Earth rising in the background, photorealistic, cinematic lighting.",
  "input_image": [
    "https://hub.oxen.ai/api/repos/elau/assets/file/main/bloxy/bloxy_cropped_512x512.png"
  ]
}'

Fetch model details

The models endpoint returns the full model object, including its json_request_schema.
curl -H "Authorization: Bearer $OXEN_API_KEY" https://hub.oxen.ai/api/ai/models/gpt-image-2-edit

Request parameters

Required parameters

FieldTypeDefaultDescription
promptstring"Place the subject on the surface of the moon with Earth rising in the background, photorealistic, cinematic lighting."Text description of how to edit the input image(s).
input_imagearray<string>One or more reference images to transform. Multiple URLs are composed together by the model.

Optional parameters

FieldTypeDefaultDescription
resolutionstring"1024x1024"Output image resolution. HD sizes (1920x1080 and lower) bill at the standard tier; QHD+ sizes (2560x1440 and higher) bill at the high-resolution tier. One of: 1024x768, 1024x1024, 1024x1536, 1920x1080, 2560x1440, 3840x2160.
qualitystring"high"Output quality tier. Locked to high for best fidelity. One of: high.
num_imagesinteger1Number of images to generate per request. Range: 1 – 4.
output_formatstring"png"File format for the generated image. One of: png, jpeg, webp.
mask_urlstringOptional mask image URL. White pixels mark regions to edit; black pixels are preserved. Leave empty to edit the whole image. Format: uri.