From 9e6b4dc7faad40761c8b72e74ec22b72bc76ec78 Mon Sep 17 00:00:00 2001 From: imbytecat Date: Tue, 19 May 2026 00:24:13 +0800 Subject: [PATCH] feat: add 16:9 and 2K size presets for gpt-image-2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add 1536x864, 864x1536, 2048x1152, 1152x2048, 2560x1440 to the size dropdown. 2560x1440 is the OpenAI cookbook's recommended upper widescreen reliability boundary - Note that sizes above 2560x1440 are experimental and the max-edge rule is strictly <3840 (3840x2160 is out, use 3824x2144 instead) - 1920x1080 is invalid because 1080 isn't a multiple of 16 — captured in AGENTS.md alongside the full constraint set so future agents stop proposing it --- AGENTS.md | 8 ++++++++ index.html | 15 ++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 9634f29..8bfdcc9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -91,6 +91,14 @@ Three files do everything: - Targets the **gpt-image series only** (gpt-image-2 default). Do not reintroduce DALL·E-only fields like `response_format` — gpt-image always returns `b64_json`. + - `gpt-image-2` size constraints (per the OpenAI cookbook): both edges + multiple of 16, max edge **< 3840**, long/short ≤ 3:1, total pixels + in 655,360–8,294,400, `auto` not supported. Exact 16:9 requires + `16k × 9k` with `k` a multiple of 16 (so `1280×720`, `1536×864`, + `2048×1152`, `2560×1440`, …). Sizes above 2560×1440 are + experimental — the popular 4K target `3840×2160` violates the + `< 3840` rule, round down to `3824×2144` if you need it. Common + misses: `1920×1080` is **not valid** (1080 % 16 ≠ 0). - `client.ts` — browser entry, loaded via `