Setting the file. One moment.
Subchapter 40.3
references/image-api.mdMarkdown2 KBView on GitHub
This file is for the fallback CLI mode only. Use it only after the user explicitly asks to use scripts/image_gen.py instead of the built-in image_gen tool.
These parameters describe the Image API and bundled CLI fallback surface. Do not assume they are normal arguments on the built-in image_gen tool.
gpt-image-1.5, gpt-image-1, and gpt-image-1-mini).image_gen tool and the fallback CLI do not expose the same controls.POST /v1/images/generations (client.images.generate(...))POST /v1/images/edits (client.images.edit(...))prompt: text promptmodel: image modeln: number of images (1-10)size: 1024x1024, 1536x1024, 1024x1536, or autoquality: low, medium, high, or autobackground: output transparency behavior (transparent, opaque, or auto) for generated output; this is not the same thing as the prompt’s visual scene/backdropoutput_format: png (default), jpeg, webpoutput_compression: 0-100 (jpeg/webp only)moderation: auto (default) or lowimage: one or more input images. For GPT Image models, you can provide up to 16 images.mask: optional mask imageinput_fidelity: low (default) or highModel-specific note for input_fidelity:
gpt-image-1 and gpt-image-1-mini preserve all input images, but the first image gets richer textures and finer details.gpt-image-1.5 preserves the first 5 input images with higher fidelity.data[] list with b64_json per imagescripts/image_gen.py CLI decodes b64_json and writes output files for you.input_fidelity can materially increase input token usage.quality, input_fidelity, explicit masks, background, output_format, and related parameters are fallback-only execution controls.image_gen tool arguments.