Skip to content

AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He

feat(image-gen): default Google image generation to Nano Banana 2.1

hugohe335508e34e49e
diff --git a/.env.example b/.env.example
index 689b2246..68d22ef1 100644
--- a/.env.example
+++ b/.env.example
@@ -51,17 +51,23 @@
# OpenAI-compatible 第三方平台可按需开启以下兼容参数。
# OPENAI_SIZE_PRESET=auto
# OPENAI_RESPONSE_FORMAT=auto
+# GPT Image: auto / omit / low / medium / high; xhigh / max only for
+# gpt-image-2.5-sunburst / gpt-image-2.5-flare and their snapshots.
+# GPT Image:auto / omit / low / medium / high;xhigh / max 仅限上述 2.5 型号及快照。
# OPENAI_QUALITY=auto
# Allowed values: png / jpeg / webp
# OPENAI_OUTPUT_FORMAT=png
# jpeg/webp only, 0-100
# OPENAI_OUTPUT_COMPRESSION=80
-# gpt-image-2: auto / opaque
+# GPT Image: auto / opaque / transparent (png/webp only; gpt-image-2 support is in preview)
+# GPT Image:auto / opaque / transparent(透明背景仅限 png/webp;gpt-image-2 为预览支持)
# OPENAI_BACKGROUND=auto
# auto / low
# OPENAI_MODERATION=auto
-# Reference edits except gpt-image-2: high / low
-# 除 gpt-image-2 外的参考图编辑:high / low
+# Reference edits: gpt-image-1 / gpt-image-1.5 high / low; gpt-image-1-mini low only.
+# Leave unset for gpt-image-2 and the two 2.5 models (including snapshots).
+# 参考图编辑:gpt-image-1 / gpt-image-1.5 支持 high / low;gpt-image-1-mini 仅支持 low。
+# gpt-image-2 与上述两种 2.5 型号(含快照)不设置此项。
# OPENAI_INPUT_FIDELITY=high
# ─────────────────────────────────────────────────────────────
@@ -69,7 +75,7 @@
# ─────────────────────────────────────────────────────────────
# IMAGE_BACKEND=gemini
# GEMINI_API_KEY=your-gemini-api-key
-# GEMINI_MODEL=gemini-3.1-flash-image
+# GEMINI_MODEL=gemini-nano-banana-2.1
# GEMINI_BASE_URL=https://your-proxy-url.com
# ─────────────────────────────────────────────────────────────
@@ -106,6 +112,8 @@
# LAS_API_KEY=your-las-key
# VOLCENGINE_MODEL=doubao-seedream-4-5-251128
# VOLCENGINE_BASE_URL=https://operator.las.cn-beijing.volces.com/api/v1
+# Optional Ark base URL / 可选 Ark 基址
+# VOLCENGINE_BASE_URL=https://ark.cn-beijing.volces.com/api/v3
# ─────────────────────────────────────────────────────────────
# Example: Tencent Cloud TokenHub / 腾讯云 TokenHub 生图示例
@@ -192,7 +200,7 @@
# SILICONFLOW_BASE_URL=https://api.siliconflow.cn/v1/images/generations
#
# FAL_KEY=your-fal-key
-# FAL_MODEL=fal-ai/nano-banana-2
+# FAL_MODEL=google/nano-banana-2.1
# FAL_BASE_URL=https://fal.run
#
# REPLICATE_API_TOKEN=r8_xxx
@@ -200,7 +208,7 @@
# REPLICATE_BASE_URL=https://api.replicate.com/v1
#
# OPENROUTER_API_KEY=sk-or-v1-xxx
-# OPENROUTER_MODEL=google/gemini-3.1-flash-image
+# OPENROUTER_MODEL=google/gemini-nano-banana-2.1
# OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
#
# OpenAI-compatible example: Agnes AI / OpenAI-compatible 示例:Agnes AI
@@ -225,7 +233,7 @@
# OPENAI_MODEL=gpt-image-2
# OPENAI_OUTPUT_FORMAT=png
# GEMINI_API_KEY=your-gemini-api-key
-# GEMINI_MODEL=gemini-3.1-flash-image
+# GEMINI_MODEL=gemini-nano-banana-2.1
#
# Switch providers by changing IMAGE_BACKEND only.
# 切换提供商时,只改 IMAGE_BACKEND 即可。
diff --git a/README.md b/README.md
index 78f7b029..d4f0a335 100644
--- a/README.md
+++ b/README.md
@@ -106,7 +106,7 @@ Why you'd choose it, and where it isn't the right fit → [Why PPT Master](./doc
> [!IMPORTANT]
> ### This is a tool, not a wishing well
-> `harness + model = agent` — PPT Master only owns the workflow; the model sets the ceiling. Recommended: **Kimi K3 (or Claude) with a large context window (~1M tokens) + AI image generation (`gpt-image-2` or Google `gemini-3.1-flash-image`)**; other models can run the pipeline, with a quality gap.
+> `harness + model = agent` — PPT Master only owns the workflow; the model sets the ceiling. Recommended: **Kimi K3 (or Claude) with a large context window (~1M tokens) + AI image generation (`gpt-image-2` or Google `gemini-nano-banana-2.1`)**; other models can run the pipeline, with a quality gap.
>
> And don't expect a finished, perfect deck in one shot. The tool's value is taking most of the tedious work off your plate; the polishing that's left is yours — a natively editable deck exists precisely so you can keep working on it, not a flat image you can't touch. The cheaper the model, the more there is to do; if results disappoint, upgrade the model first, then check your usage against [Getting Started](./docs/getting-started.md) and the [example projects](https://hugohe3.github.io/ppt-master-examples/).
@@ -217,7 +217,7 @@ Never used one of these? Don't worry — in this project they play exactly one r
| **IDE plugin / extension** | [Claude Code](https://claude.ai/code) (VS Code / JetBrains extension), [GitHub Copilot](https://github.com/features/copilot), [Cline](https://cline.bot/), etc. | Installed inside hosts like VS Code or JetBrains |
| **CLI agent** | [Claude Code](https://claude.ai/code) CLI, [Codex CLI](https://github.com/openai/codex), Gemini CLI, etc. | Runs in the terminal; suits scripting, remote, or server use |
-> **Model recommendation**: for the best results, use **[Kimi K3](https://www.kimi.com/code/?aff=ppt-master)** (or Claude) to drive the pipeline, paired with AI image generation — **`gpt-image-2`** (OpenAI) or **`gemini-3.1-flash-image`** (Google). Kimi Code, the project sponsor, is a great pick for pay-as-you-go access.
+> **Model recommendation**: for the best results, use **[Kimi K3](https://www.kimi.com/code/?aff=ppt-master)** (or Claude) to drive the pipeline, paired with AI image generation — **`gpt-image-2`** (OpenAI) or **`gemini-nano-banana-2.1`** (Google). Kimi Code, the project sponsor, is a great pick for pay-as-you-go access.
**🔑 Want to use Claude / GPT / Gemini but don't have access yet?** Project sponsors **[PackyCode](https://www.packyapi.ai/register?aff=ppt-master)**, **[APIKEY.FAN](https://apikey.fan/register?aff=PPT-MASTER)** and **[RunAPI](https://runapi.host/register?aff=WMLJ)** offer pay-as-you-go access to Claude, GPT, Gemini and more — no subscription required, with exclusive discounts for our users (details at the top of this page).
diff --git a/README_CN.md b/README_CN.md
index e550703f..8bed91ff 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -106,7 +106,7 @@
> [!IMPORTANT]
> ### 这是一个工具,不是一个许愿池
-> `harness + model = agent`——PPT Master 只负责工作流,产出上限由模型决定。推荐 **Kimi K3(或 Claude)大上下文窗口(~100 万 token)+ AI 生图(`gpt-image-2` 或 Google `gemini-3.1-flash-image`)**;其他模型能跑通流程,但有质量差距。
+> `harness + model = agent`——PPT Master 只负责工作流,产出上限由模型决定。推荐 **Kimi K3(或 Claude)大上下文窗口(~100 万 token)+ AI 生图(`gpt-image-2` 或 Google `gemini-nano-banana-2.1`)**;其他模型能跑通流程,但有质量差距。
>
> 也别指望一把就拿到完美成品。它的价值是帮你把大部分枯燥的活儿干掉,剩下的打磨交给你——做原生可编辑的 PPT,本就是为了让你接着改,而不是甩给你一张改不动的图。模型越便宜,要补的人工就越多;效果不理想,先升级模型,再对照[快速入门](./docs/zh/getting-started.md)和[示例工程](https://hugohe3.github.io/ppt-master-examples/)检查用法。
@@ -217,7 +217,7 @@ PPT Master 在**任何具备 agent 能力**(可读写文件、执行命令、
| **IDE 插件 / 扩展** | [Claude Code](https://claude.ai/code)(VS Code / JetBrains 扩展)、[GitHub Copilot](https://github.com/features/copilot)、[Cline](https://cline.bot/)、通义灵码 等 | 装在 VS Code / JetBrains 等宿主里使用 |
| **CLI agent** | [Claude Code](https://claude.ai/code) CLI、[Codex CLI](https://github.com/openai/codex)、Gemini CLI 等 | 终端里运行,适合脚本化 / 远程 / 服务器场景 |
-> **模型推荐**:追求最佳效果,语言模型选 **[Kimi K3](https://www.kimi.com/code/?aff=ppt-master)**(或 Claude)驱动流程,搭配 AI 生图 —— **`gpt-image-2`**(OpenAI)或 **`gemini-3.1-flash-image`**(Google)。本项目赞助商 Kimi Code 支持按量调用,很适合上手。
+> **模型推荐**:追求最佳效果,语言模型选 **[Kimi K3](https://www.kimi.com/code/?aff=ppt-master)**(或 Claude)驱动流程,搭配 AI 生图 —— **`gpt-image-2`**(OpenAI)或 **`gemini-nano-banana-2.1`**(Google)。本项目赞助商 Kimi Code 支持按量调用,很适合上手。
**🔑 想用 Claude / GPT / Gemini 但还没有渠道?** 本项目赞助商 **[PackyCode](https://www.packyapi.ai/register?aff=ppt-master)**、**[APIKEY.FAN](https://apikey.fan/register?aff=PPT-MASTER)** 与 **[RunAPI](https://runapi.host/register?aff=WMLJ)** 均支持按量调用 Claude、GPT、Gemini 等主流模型,无需订阅、支持国内支付,并为本项目用户提供专属优惠(详情见页首)。
diff --git a/skills/ppt-master/.env.example b/skills/ppt-master/.env.example
index 8c529b77..0ee07cd7 100644
--- a/skills/ppt-master/.env.example
+++ b/skills/ppt-master/.env.example
@@ -51,17 +51,23 @@
# OpenAI-compatible 第三方平台可按需开启以下兼容参数。
# OPENAI_SIZE_PRESET=auto
# OPENAI_RESPONSE_FORMAT=auto
+# GPT Image: auto / omit / low / medium / high; xhigh / max only for
+# gpt-image-2.5-sunburst / gpt-image-2.5-flare and their snapshots.
+# GPT Image:auto / omit / low / medium / high;xhigh / max 仅限上述 2.5 型号及快照。
# OPENAI_QUALITY=auto
# Allowed values: png / jpeg / webp
# OPENAI_OUTPUT_FORMAT=png
# jpeg/webp only, 0-100
# OPENAI_OUTPUT_COMPRESSION=80
-# gpt-image-2: auto / opaque
+# GPT Image: auto / opaque / transparent (png/webp only; gpt-image-2 support is in preview)
+# GPT Image:auto / opaque / transparent(透明背景仅限 png/webp;gpt-image-2 为预览支持)
# OPENAI_BACKGROUND=auto
# auto / low
# OPENAI_MODERATION=auto
-# Reference edits except gpt-image-2: high / low
-# 除 gpt-image-2 外的参考图编辑:high / low
+# Reference edits: gpt-image-1 / gpt-image-1.5 high / low; gpt-image-1-mini low only.
+# Leave unset for gpt-image-2 and the two 2.5 models (including snapshots).
+# 参考图编辑:gpt-image-1 / gpt-image-1.5 支持 high / low;gpt-image-1-mini 仅支持 low。
+# gpt-image-2 与上述两种 2.5 型号(含快照)不设置此项。
# OPENAI_INPUT_FIDELITY=high
# ─────────────────────────────────────────────────────────────
@@ -69,7 +75,7 @@
# ─────────────────────────────────────────────────────────────
# IMAGE_BACKEND=gemini
# GEMINI_API_KEY=your-gemini-api-key
-# GEMINI_MODEL=gemini-3.1-flash-image
+# GEMINI_MODEL=gemini-nano-banana-2.1
# GEMINI_BASE_URL=https://your-proxy-url.com
# ─────────────────────────────────────────────────────────────
@@ -106,6 +112,8 @@
# LAS_API_KEY=your-las-key
# VOLCENGINE_MODEL=doubao-seedream-4-5-251128
# VOLCENGINE_BASE_URL=https://operator.las.cn-beijing.volces.com/api/v1
+# Optional Ark base URL / 可选 Ark 基址
+# VOLCENGINE_BASE_URL=https://ark.cn-beijing.volces.com/api/v3
# ─────────────────────────────────────────────────────────────
# Example: Tencent Cloud TokenHub / 腾讯云 TokenHub 生图示例
@@ -150,7 +158,7 @@
# SILICONFLOW_BASE_URL=https://api.siliconflow.cn/v1/images/generations
#
# FAL_KEY=your-fal-key
-# FAL_MODEL=fal-ai/nano-banana-2
+# FAL_MODEL=google/nano-banana-2.1
# FAL_BASE_URL=https://fal.run
#
# REPLICATE_API_TOKEN=r8_xxx
@@ -158,7 +166,7 @@
# REPLICATE_BASE_URL=https://api.replicate.com/v1
#
# OPENROUTER_API_KEY=sk-or-v1-xxx
-# OPENROUTER_MODEL=google/gemini-3.1-flash-image
+# OPENROUTER_MODEL=google/gemini-nano-banana-2.1
# OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
#
# OpenAI-compatible example: Agnes AI / OpenAI-compatible 示例:Agnes AI
@@ -183,7 +191,7 @@
# OPENAI_MODEL=gpt-image-2
# OPENAI_OUTPUT_FORMAT=png
# GEMINI_API_KEY=your-gemini-api-key
-# GEMINI_MODEL=gemini-3.1-flash-image
+# GEMINI_MODEL=gemini-nano-banana-2.1
#
# Switch providers by changing IMAGE_BACKEND only.
# 切换提供商时,只改 IMAGE_BACKEND 即可。
diff --git a/skills/ppt-master/SPONSORS.md b/skills/ppt-master/SPONSORS.md
index 44d79af3..5e36f8fb 100644
--- a/skills/ppt-master/SPONSORS.md
+++ b/skills/ppt-master/SPONSORS.md
@@ -8,7 +8,7 @@ Want to support the project or discuss a partnership? See the [sponsorship guide
## Current Model Recommendation
-For the best results, use **[Kimi K3](https://www.kimi.com/code/?aff=ppt-master)** (or Claude) to drive the workflow, paired with **`gpt-image-2`** (OpenAI) or **`gemini-3.1-flash-image`** (Google) for AI image generation. If model capability is limiting output quality, upgrade the driving model before weakening the workflow or its quality requirements.
+For the best results, use **[Kimi K3](https://www.kimi.com/code/?aff=ppt-master)** (or Claude) to drive the workflow, paired with **`gpt-image-2`** (OpenAI) or **`gemini-nano-banana-2.1`** (Google) for AI image generation. If model capability is limiting output quality, upgrade the driving model before weakening the workflow or its quality requirements.
## Kimi
diff --git a/skills/ppt-master/SPONSORS_CN.md b/skills/ppt-master/SPONSORS_CN.md
index b4159e68..1e32f54a 100644
--- a/skills/ppt-master/SPONSORS_CN.md
+++ b/skills/ppt-master/SPONSORS_CN.md
@@ -8,7 +8,7 @@ PPT Master 始终免费开源。以下赞助方共同支持项目的持续维护
## 当前模型推荐
-追求最佳效果,语言模型选 **[Kimi K3](https://www.kimi.com/code/?aff=ppt-master)**(或 Claude)驱动流程,搭配 AI 生图模型 **`gpt-image-2`**(OpenAI)或 **`gemini-3.1-flash-image`**(Google)。如果模型能力正在拖累产出质量,应先升级驱动模型,而不是削弱工作流或质量要求。
+追求最佳效果,语言模型选 **[Kimi K3](https://www.kimi.com/code/?aff=ppt-master)**(或 Claude)驱动流程,搭配 AI 生图模型 **`gpt-image-2`**(OpenAI)或 **`gemini-nano-banana-2.1`**(Google)。如果模型能力正在拖累产出质量,应先升级驱动模型,而不是削弱工作流或质量要求。
## Kimi
diff --git a/skills/ppt-master/scripts/docs/image.md b/skills/ppt-master/scripts/docs/image.md
index 463aa375..5e2f0528 100644
--- a/skills/ppt-master/scripts/docs/image.md
+++ b/skills/ppt-master/scripts/docs/image.md
@@ -49,7 +49,7 @@ python3 scripts/image_gen.py --list-backends
Backends are grouped into Core / Extended / Experimental tiers. Run `python3 scripts/image_gen.py --list-backends` for the current list.
-Each backend accepts its own subset of `--aspect_ratio` values; the authority is the `VALID_ASPECT_RATIOS` constant in its `scripts/image_backends/backend_<name>.py`, and `--manifest` rejects an unsupported ratio before any request. Gemini 3.1 image models take `1:1 1:4 1:8 2:3 3:2 3:4 4:1 4:3 4:5 5:4 8:1 9:16 16:9 21:9` (no `3:1`); the `gemini-2.5-flash-image` models take only `1:1 2:3 3:2 3:4 4:3 4:5 5:4 9:16 16:9 21:9` at `1K`.
+Each backend accepts its own subset of `--aspect_ratio` values; the authority is the `VALID_ASPECT_RATIOS` constant in its `scripts/image_backends/backend_<name>.py`, and `--manifest` rejects an unsupported ratio before any request. The default Gemini model, `gemini-nano-banana-2.1`, takes `1:1 1:4 1:8 2:3 3:2 3:4 4:1 4:3 4:5 5:4 8:1 9:16 16:9 21:9` (including extreme ratios, no `3:1`) at `1K/2K/4K`, but not `512px`. `gemini-3.1-flash-image` retains the same ratios and also supports `512px`; `gemini-2.5-flash-image` takes only `1:1 2:3 3:2 3:4 4:3 4:5 5:4 9:16 16:9 21:9` at `1K`.
Backend selection:
@@ -84,12 +84,13 @@ OPENAI_MODEL=gpt-image-2
# OpenAI-compatible provider knobs:
# OPENAI_SIZE_PRESET=auto
# OPENAI_RESPONSE_FORMAT=auto
+# GPT Image: auto / omit / low / medium / high; xhigh / max only for the two 2.5 models
# OPENAI_QUALITY=auto
# Allowed values: png / jpeg / webp
# OPENAI_OUTPUT_FORMAT=png
# jpeg/webp only, 0-100
# OPENAI_OUTPUT_COMPRESSION=80
-# gpt-image-2: auto / opaque
+# GPT Image: auto / opaque / transparent (png/webp only; gpt-image-2 support is in preview)
# OPENAI_BACKGROUND=auto
# auto / low
# OPENAI_MODERATION=auto
@@ -111,7 +112,10 @@ OpenAI backend notes:
- Requests are sent with plain `requests.post()` to improve compatibility with
OpenAI-compatible proxies that block the OpenAI SDK's `httpx` transport.
- For `gpt-image-2`, `image_size=512px` means a low-quality draft preset, not a literal 512px edge. The model requires both edges to be multiples of 16px, a long:short ratio no greater than 3:1, and total pixels between 655,360 and 8,294,400.
-- `OPENAI_BACKGROUND=transparent` is not supported by `gpt-image-2`; use `auto` or `opaque`.
+- `OPENAI_BACKGROUND=transparent` is supported by `gpt-image-2` (in preview), `gpt-image-2.5-sunburst`, and `gpt-image-2.5-flare`, including their published snapshots; use PNG (the default) or WebP, not JPEG.
+- `OPENAI_QUALITY=xhigh` and `max` are accepted only for `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their published snapshots; older GPT Image models retain `auto/omit/low/medium/high`. See the [Images API parameters](https://developers.openai.com/api/reference/resources/images/methods/generate).
+- For reference edits, `OPENAI_INPUT_FIDELITY` accepts `high/low` on `gpt-image-1` and `gpt-image-1.5`, but only `low` on `gpt-image-1-mini`. Leave it unset for `gpt-image-2` and the two 2.5 models (including snapshots); this backend keeps the existing omission requirement for 2.5 because its support is not explicitly documented in the [edit API parameters](https://developers.openai.com/api/reference/resources/images/methods/edit).
+- OpenAI schedules `gpt-image-1` shutdown for 2026-10-23 and `gpt-image-1-mini` / `gpt-image-1.5` for 2026-12-01; see [deprecations](https://developers.openai.com/api/docs/deprecations).
- If `OPENAI_OUTPUT_FORMAT=jpeg` or `webp`, generated files use `.jpg` or `.webp` extensions instead of `.png`.
- OpenAI-compatible providers that reject OpenAI-specific fields can use `OPENAI_RESPONSE_FORMAT=omit`, `OPENAI_QUALITY=omit`, and `OPENAI_SIZE_PRESET=<preset>`. Valid response formats are `auto`, `b64_json`, `url`, and `omit`; valid size presets are `auto`, `legacy`, `gpt-image`, `gpt-image-2`, and `dall-e-2`.
@@ -151,7 +155,7 @@ MINIMAX_API_KEY=your-api-key
## `image_gen.py --manifest` runner and legacy manifest spellings
-Validates the file behind every `Generated` row before skipping it, iterates retryable rows with bounded adaptive concurrency, and writes each status atomically; a missing or corrupt file returns to `Failed`, and persistent rate limits end the run as retryable `Failed`. Options: `--concurrency` (default `IMAGE_CONCURRENCY` or 3; halves on rate limit, min 1), `--image_size`, `--output`/`-o`, `--backend`/`-b`, `--model`/`-m`, `--list-backends`. Interrupting is safe (completed items stay `Generated`); the Markdown sidecar re-renders on completion, or run `--render-md` after an interruption. Configuration: process environment first, then the first `.env` in cwd, the skill directory, the clone root, `~/.ppt-master/.env` — `IMAGE_BACKEND` (required; `--list-backends` shows the set and support tiers), `IMAGE_CONCURRENCY`, provider-specific `{PROVIDER}_API_KEY` / `_BASE_URL` / `_MODEL` (never `IMAGE_API_KEY` / `IMAGE_MODEL` / `IMAGE_BASE_URL`), and for OpenAI-compatible platforms `OPENAI_SIZE_PRESET` (`auto|legacy|gpt-image|gpt-image-2|dall-e-2`), `OPENAI_RESPONSE_FORMAT` (`auto|b64_json|url|omit`), `OPENAI_QUALITY` (`auto|omit|low|medium|high|standard|hd`) under `IMAGE_BACKEND=openai`; see `.env.example`. The single-image form `image_gen.py "prompt" --filename …` remains for ad-hoc re-rolls.
+Validates the file behind every `Generated` row before skipping it, iterates retryable rows with bounded adaptive concurrency, and writes each status atomically; a missing or corrupt file returns to `Failed`, and persistent rate limits end the run as retryable `Failed`. Options: `--concurrency` (default `IMAGE_CONCURRENCY` or 3; halves on rate limit, min 1), `--image_size`, `--output`/`-o`, `--backend`/`-b`, `--model`/`-m`, `--list-backends`. Interrupting is safe (completed items stay `Generated`); the Markdown sidecar re-renders on completion, or run `--render-md` after an interruption. Configuration: process environment first, then the first `.env` in cwd, the skill directory, the clone root, `~/.ppt-master/.env` — `IMAGE_BACKEND` (required; `--list-backends` shows the set and support tiers), `IMAGE_CONCURRENCY`, provider-specific `{PROVIDER}_API_KEY` / `_BASE_URL` / `_MODEL` (never `IMAGE_API_KEY` / `IMAGE_MODEL` / `IMAGE_BASE_URL`), and for OpenAI-compatible platforms `OPENAI_SIZE_PRESET` (`auto|legacy|gpt-image|gpt-image-2|dall-e-2`), `OPENAI_RESPONSE_FORMAT` (`auto|b64_json|url|omit`), `OPENAI_QUALITY` (`auto|omit|low|medium|high|xhigh|max|standard|hd`; `xhigh/max` only for the two 2.5 models and their snapshots) under `IMAGE_BACKEND=openai`; see `.env.example`. The single-image form `image_gen.py "prompt" --filename …` remains for ad-hoc re-rolls.
**Compatibility**: legacy `type` values read as `background` → `hero_page` + no type, `hero` → `hero_page` + Primitive A, `portrait` → `local` + Primitive B, `typography` → `hero_page` + `embedded` + Primitive C; a missing `page_role` is `local`, a missing `text_policy` is `none` (one aggregate warning per manifest); an existing manifest lacking `deck_rendering` or an item lacking `type` replays its assembled `prompt` verbatim without reconstruction; a legacy `deck_style_anchor` or `deck_palette` never overrides `deck_rendering` / `color_scheme`; legacy `page_role: full_page` reads as `hero_page`.
diff --git a/skills/ppt-master/scripts/image_backends/backend_fal.py b/skills/ppt-master/scripts/image_backends/backend_fal.py
index 2a0c0605..56fdaef6 100644
--- a/skills/ppt-master/scripts/image_backends/backend_fal.py
+++ b/skills/ppt-master/scripts/image_backends/backend_fal.py
@@ -5,7 +5,7 @@ fal.ai image generation backend.
Configuration keys:
FAL_KEY / FAL_API_KEY (required)
FAL_BASE_URL (optional)
- FAL_MODEL (optional; nano-banana-2 only)
+ FAL_MODEL (optional; google/nano-banana-2.1 or fal-ai/nano-banana-2)
"""
import sys
@@ -47,8 +47,8 @@ VALID_ASPECT_RATIOS = [
"4:3", "4:5", "5:4", "8:1", "9:16", "16:9", "21:9",
]
DEFAULT_ENDPOINT = "https://fal.run"
-DEFAULT_MODEL = "fal-ai/nano-banana-2"
-SUPPORTED_MODELS = {DEFAULT_MODEL}
+DEFAULT_MODEL = "google/nano-banana-2.1"
+SUPPORTED_MODELS = {DEFAULT_MODEL, "fal-ai/nano-banana-2"}
IMAGE_SIZE_TO_RESOLUTION = {
"512px": "0.5K",
@@ -75,6 +75,10 @@ def _resolve_request_options(
f"Supported: {VALID_ASPECT_RATIOS}"
)
normalized_size = normalize_image_size(image_size)
+ if resolved_model == "google/nano-banana-2.1" and normalized_size in {"512px", "0.5K"}:
+ raise ValueError(
+ f"Unsupported image size '{image_size}' for {resolved_model}. Supported: 1K, 2K, 4K."
+ )
resolution = IMAGE_SIZE_TO_RESOLUTION.get(normalized_size)
if not resolution:
raise ValueError(
diff --git a/skills/ppt-master/scripts/image_backends/backend_gemini.py b/skills/ppt-master/scripts/image_backends/backend_gemini.py
index e4162009..59b4069f 100644
--- a/skills/ppt-master/scripts/image_backends/backend_gemini.py
+++ b/skills/ppt-master/scripts/image_backends/backend_gemini.py
@@ -58,11 +58,10 @@ VALID_ASPECT_RATIOS = [
VALID_IMAGE_SIZES = ["512px", "1K", "2K", "4K"]
-DEFAULT_MODEL = "gemini-3.1-flash-image"
+DEFAULT_MODEL = "gemini-nano-banana-2.1"
GEMINI_2_5_FLASH_IMAGE_MODELS = {
"gemini-2.5-flash-image",
- "gemini-2.5-flash-image-preview",
}
GEMINI_2_5_VALID_ASPECT_RATIOS = [
"1:1", "2:3", "3:2", "3:4", "4:3",
@@ -71,8 +70,8 @@ GEMINI_2_5_VALID_ASPECT_RATIOS = [
GEMINI_2_5_VALID_IMAGE_SIZES = ["1K"]
MINIMAL_THINKING_MODELS = {
+ "gemini-nano-banana-2.1",
"gemini-3.1-flash-image",
- "gemini-3.1-flash-image-preview",
}
REFERENCE_IMAGE_MIME_TYPES = {
@@ -101,6 +100,10 @@ def _request_image_size(image_size: str) -> str:
def _validate_model_options(model: str, aspect_ratio: str, image_size: str) -> None:
"""Enforce limits only for Gemini models with a known narrower contract."""
+ if _model_id(model) == "gemini-nano-banana-2.1" and image_size == "512px":
+ raise ValueError(
+ f"Invalid image size '{image_size}' for {model}. Valid: 1K, 2K, 4K."
+ )
if _model_id(model) not in GEMINI_2_5_FLASH_IMAGE_MODELS:
return
if aspect_ratio not in GEMINI_2_5_VALID_ASPECT_RATIOS:
@@ -277,7 +280,7 @@ def generate(prompt: str,
image_size: Image size ("512px", "1K", "2K", "4K", case-insensitive)
output_dir: Output directory
filename: Output filename (without extension)
- model: Model name (default: gemini-3.1-flash-image)
+ model: Model name (default: gemini-nano-banana-2.1)
max_retries: Maximum number of retries
reference_image: Optional source image path. When set, the image and
edit instruction are sent together as multimodal input.
diff --git a/skills/ppt-master/scripts/image_backends/backend_openrouter.py b/skills/ppt-master/scripts/image_backends/backend_openrouter.py
index 45a82206..51b9889c 100644
--- a/skills/ppt-master/scripts/image_backends/backend_openrouter.py
+++ b/skills/ppt-master/scripts/image_backends/backend_openrouter.py
@@ -55,7 +55,7 @@ VALID_ASPECT_RATIOS = [
VALID_IMAGE_SIZES = ["512px", "1K", "2K", "4K"]
-DEFAULT_MODEL = "google/gemini-3.1-flash-image"
+DEFAULT_MODEL = "google/gemini-nano-banana-2.1"
DEFAULT_ENDPOINT = "https://openrouter.ai/api/v1"
# ╔══════════════════════════════════════════════════════════════════╗
@@ -195,6 +195,11 @@ def generate(prompt: str,
if image_size not in VALID_IMAGE_SIZES:
raise ValueError(f"Invalid image size '{image_size}'. Valid: {VALID_IMAGE_SIZES}")
+ if model.strip().lower() == "google/gemini-nano-banana-2.1" and image_size == "512px":
+ raise ValueError(
+ f"Invalid image size '{image_size}' for {model}. Valid: 1K, 2K, 4K."
+ )
+
last_error = None
for attempt in range(max_retries + 1):
try:
diff --git a/skills/ppt-master/scripts/image_gen.py b/skills/ppt-master/scripts/image_gen.py
index 7507f138..dece33e9 100644
--- a/skills/ppt-master/scripts/image_gen.py
+++ b/skills/ppt-master/scripts/image_gen.py
@@ -108,7 +108,7 @@ BACKEND_REGISTRY = {
"module": "backend_gemini",
"tier": "core",
"label": "Google Gemini",
- "default_model": "gemini-3.1-flash-image",
+ "default_model": "gemini-nano-banana-2.1",
"default_image_size": "1K",
"key_hint": "GEMINI_API_KEY",
"aliases": ["google"],
@@ -216,7 +216,7 @@ BACKEND_REGISTRY = {
"module": "backend_fal",
"tier": "experimental",
"label": "fal.ai",
- "default_model": "fal-ai/nano-banana-2",
+ "default_model": "google/nano-banana-2.1",
"default_image_size": "1K",
"key_hint": "FAL_KEY / FAL_API_KEY",
"aliases": ["fal-ai"],
@@ -233,7 +233,7 @@ BACKEND_REGISTRY = {
"module": "backend_openrouter",
"tier": "experimental",
"label": "OpenRouter",
- "default_model": "google/gemini-3.1-flash-image",
+ "default_model": "google/gemini-nano-banana-2.1",
"default_image_size": "1K",
"key_hint": "OPENROUTER_API_KEY",
},