Image API Workbench
Purpose
Run reproducible Images API generation or editing against OpenAI or a reviewed
compatible gateway. The CLI validates requests, catalogs, streaming partials,
outputs, and evidence. Default to gpt-image-2; catalogs are route evidence,
not endpoint proof.
Workflow
- Read model support before changing models or advanced parameters.
- Use
scripts/image_api_workbench.py --dry-runfor every new parameter combination. - Use
--list-remote-modelsto inspect the configured gateway without spending image credits. - Generate with
/v1/images/generations; add--input-imageto switch to/v1/images/edits. - Use
--background transparent --output-format pngorwebpfor alpha. - Use
--stream --partial-images 1..3only when the gateway relays image SSE. - Save assets outside this skill and inspect the image plus metadata sidecar.
Safety Defaults
gpt-image-1.5,gpt-image-1-mini, andchatgpt-image-latestrequire--allow-deprecated-model; all are scheduled to shut down on 2026-12-01.- Retired DALL-E models are blocked unless
--allow-retired-modelis explicit. - Known GPT Image parameters are model-validated. Provider extensions require
--allow-provider-extensions. - Credentials come from environment variables or token files. Never persist keys in prompts, metadata, skill files, reports, or logs.
- Metadata stores a prompt hash by default. Prompt preview is opt-in.
Editing And Localization
For matched bilingual visuals, create one approved master and edit that exact
image for each language. Preserve composition and non-text details; replace
visible copy only. Build a side-by-side review with
scripts/bilingual_contact_sheet.py.
See operating guide for commands, error
classification, streaming behavior, and verification.
Routing boundaries are covered by evals/trigger_cases.json.
Output Contract
A successful paid call requires:
- stdout JSON has
ok: true; - final image exists and is non-empty;
- metadata sidecar exists unless explicitly disabled;
- detected format and dimensions are plausible;
actual_size_matches_requestis checked rather than inferred;- edit metadata identifies each input by path, bytes, SHA-256, and dimensions.
Catalogs and dry runs do not prove endpoint support. Paid probes require user approval.