Tools can generate an image using the OpenAI image API and, when needed, create an exact local output size without replacing the untouched provider result.
The image generator is available at /admin/openai/images.
The generator separates two concepts:
When the selected model can generate the requested final size natively, Tools uses that size directly and no local resize is performed.
When the requested final size is not a valid native provider size, Tools selects a suitable provider resolution and creates the exact final derivative locally.
The UI includes common presets such as:
Custom dimensions are accepted up to 4096 pixels per edge.
GPT Image 2 can use flexible native sizes when the requested dimensions satisfy the provider constraints used by Tools:
If the target satisfies those constraints, Tools requests it directly from OpenAI.
If it does not, Tools calculates a suitable native source size and performs only the final local resize.
Tools avoids destructive raster upscaling where possible. Raster enlargement cannot recreate source detail that does not exist.
For generated output, Tools prefers a provider image that is at least as large as the requested target so the local step can downscale instead of enlarge. Requests that would require a larger unnecessary upscale are rejected rather than silently degrading the output.
The exception is Spotify artwork at 3000x3000. GPT Image 2 cannot produce 3000x3000 within its total-pixel limit, so Tools uses a 2880x2880 provider image and creates the required 3000x3000 derivative. The untouched 2880x2880 original remains stored alongside the derivative.
When a derivative is required, Tools uses:
The derivative is written as PNG to avoid adding JPEG or WebP generation loss during the local resize step.
If a request requires local resizing and neither Imagick nor GD is available, validation fails before the image job is started.
Uploaded reference images can optionally be resized before they are sent to OpenAI.
Reference processing is stricter than generated-output processing:
This prevents Tools from degrading a reference image merely to force it into a larger raster size.
When a final derivative is created, Tools keeps both versions:
The image generator UI exposes both links. The resized output is stored as a generated-image source variant instead of replacing the original generated-image record.
The image-generation endpoints continue to accept the normal provider size and quality fields and additionally support final-output planning fields used by the Tools image layer:
target_size - exact WIDTHxHEIGHT output, or customtarget_width - custom widthtarget_height - custom heightresize_references - resize eligible uploaded references before the provider requestThe response can contain both image_url for the final result and original_image_url when a derivative was created.
This functionality was introduced through Tools API issue #247 and pull request #250.