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

docs: add explicit Gemini API key configuration instructions

hugohe3b6bc2e4f8579
diff --git a/README.md b/README.md
index 4129db9c..612c907f 100644
--- a/README.md
+++ b/README.md
@@ -105,7 +105,21 @@ AI:好的,先确认是否使用模板;确认后我会继续八项确认并
> 💡 **模型推荐**:Claude Opus 效果最佳,但大部分主流模型(如 Kimi 2.5、MiniMax 2.7 等,可通过 Codebuddy IDE 使用)目前均能生成不错的内容,仅在细节排版效果上可能存在差距。因目前某些 IDE (如 Antigravity) 的 Opus 极不稳定,请优先使用其他稳定的 AI 客户端进行创作。
-> 💡 **生图能力集成**:建议配置 Google AI 的环境变量(`GEMINI_API_KEY`,如需代理可添加 `GEMINI_BASE_URL`),以便借助本项目的 `skills/ppt-master/scripts/nano_banana_gen.py` 在 AI 客户端中集成 nano banana 2 的强大生图能力。若使用 Antigravity 代理,调用时请注意需传入模型参数(`-m gemini-3.1-flash-image`)。
+#### Gemini 生图 API(可选)
+
+本项目的 `nano_banana_gen.py` 可通过 Gemini API 在 AI 客户端中直接生成高质量配图。使用前需配置环境变量:
+
+```bash
+# 必需:Gemini API Key(从 https://aistudio.google.com/apikey 获取)
+export GEMINI_API_KEY="your-api-key"
+
+# 可选:自定义 API 端点(用于代理服务)
+export GEMINI_BASE_URL="https://your-proxy-url.com/v1beta"
+```
+
+> 💡 **持久化**:将上述 `export` 命令添加到 `~/.zshrc`(macOS/Linux zsh)或 `~/.bashrc`(Linux bash)中,重启终端即可永久生效。
+
+> 💡 若使用 Antigravity 代理,调用时需传入模型参数(`-m gemini-3.1-flash-image`)。
> 💡 **AI 迷失上下文?** 可提示 AI 优先阅读 `skills/ppt-master/SKILL.md`;如需一个仓库级入口概览,再参考 `AGENTS.md`
diff --git a/README_EN.md b/README_EN.md
index ada0c3ee..72b32952 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -106,7 +106,21 @@ AI: Sure. First we'll confirm whether to use a template; after that Strategist w
> 💡 **Model Recommendation**: Claude Opus works best, but most mainstream models today (like Kimi 2.5 and MiniMax 2.7, tested via Codebuddy IDE) can also generate decent results with only minor gaps in layout details. Due to the instability of Opus on some IDEs (like Antigravity), trying other stable AI clients is recommended.
-> 💡 **Image Generation Integration**: Configure Google AI environment variables (`GEMINI_API_KEY`, optionally `GEMINI_BASE_URL` for proxy) to integrate nano banana 2 image generation via `skills/ppt-master/scripts/nano_banana_gen.py`. If using the Antigravity proxy, pass the model parameter (`-m gemini-3.1-flash-image`).
+#### Gemini Image Generation API (Optional)
+
+The `nano_banana_gen.py` tool can generate high-quality images via the Gemini API directly within AI clients. Configure the following environment variables before use:
+
+```bash
+# Required: Gemini API Key (obtain from https://aistudio.google.com/apikey)
+export GEMINI_API_KEY="your-api-key"
+
+# Optional: Custom API endpoint (for proxy services)
+export GEMINI_BASE_URL="https://your-proxy-url.com/v1beta"
+```
+
+> 💡 **Persist settings**: Add the `export` commands above to `~/.zshrc` (macOS/Linux zsh) or `~/.bashrc` (Linux bash), then restart your terminal.
+
+> 💡 If using the Antigravity proxy, pass the model parameter (`-m gemini-3.1-flash-image`).
> 💡 **AI Lost Context?** Ask the AI to read `skills/ppt-master/SKILL.md` first; use `AGENTS.md` as the repository-level entry overview.
diff --git a/skills/ppt-master/scripts/nano_banana_gen.py b/skills/ppt-master/scripts/nano_banana_gen.py
index 764bc9d7..3afbeb84 100644
--- a/skills/ppt-master/scripts/nano_banana_gen.py
+++ b/skills/ppt-master/scripts/nano_banana_gen.py
@@ -3,6 +3,14 @@
Nano Banana Image Generator (Gemini Nano)
通过 Google GenAI API (Gemini) 生成高质量图片的工具。
+环境变量:
+ GEMINI_API_KEY (必需) Gemini API Key,从 https://aistudio.google.com/apikey 获取
+ GEMINI_BASE_URL (可选) 自定义 API 端点,用于代理服务
+
+ 配置示例:
+ export GEMINI_API_KEY="your-api-key"
+ export GEMINI_BASE_URL="https://your-proxy-url.com/v1beta" # 仅代理时需要
+
连接方式:
- 无 GEMINI_BASE_URL → 直连 Google 官方 API
- 有 GEMINI_BASE_URL → 通过代理 API (使用相同的 Official 协议)