返回 ppt-master
.env.example
根目录 / .env.example
1 # ─────────────────────────────────────────────────────────────
2 # Image Generation Configuration / 图片生成配置
3 # ─────────────────────────────────────────────────────────────
4
5 # This file is an optional fallback config source for image_gen.py.
6 # Current process environment variables take precedence over this file.
7 # 当前文件是 image_gen.py 的可选 fallback 配置来源。
8 # 当前进程环境变量优先于这个文件。
9 #
10 # Resolution order (only the FIRST existing file is read; keys are NOT merged across files):
11 # 1. ./.env in your current working directory
12 # 2. <skill-dir>/.env (skill install, e.g. ~/.agents/skills/ppt-master/.env)
13 # 3. <repo-root>/.env (when running from a clone)
14 # 4. ~/.ppt-master/.env (user-level config)
15 # 查找顺序(只读第一个存在的文件,多个 .env 之间不合并):
16 # 1. 当前工作目录下的 ./.env
17 # 2. skill 安装目录下的 .env(如 ~/.agents/skills/ppt-master/.env)
18 # 3. 仓库根目录下的 .env(仅在 clone 模式下)
19 # 4. ~/.ppt-master/.env(用户级配置)
20
21 # Active backend (required) / 当前启用后端(必需)
22 # Recommended core backends: openai / gemini / qwen / zhipu / volcengine
23 # 推荐核心后端:openai / gemini / qwen / zhipu / volcengine
24 # IMAGE_BACKEND=openai
25
26 # Max concurrent requests in --manifest batch mode (default 3).
27 # Auto-halves on rate-limit; 1 is the serial fallback.
28 # --manifest 批量模式下的最大并发数(默认 3)。命中限流自动减半,最低 1(=串行)。
29 # IMAGE_CONCURRENCY=3
30
31 # You may also provide the same variables directly via the current process environment.
32 # 也可以不写 .env,而是直接通过当前运行进程的环境变量提供同样的配置。
33
34 # IMPORTANT:
35 # - IMAGE_API_KEY / IMAGE_MODEL / IMAGE_BASE_URL are no longer supported.
36 # - Use provider-specific keys only.
37 # 重要:
38 # - 不再支持 IMAGE_API_KEY / IMAGE_MODEL / IMAGE_BASE_URL。
39 # - 请只使用各提供商自己的变量。
40
41 # ─────────────────────────────────────────────────────────────
42 # Example: OpenAI / OpenAI 示例 (recommended / 推荐)
43 # ─────────────────────────────────────────────────────────────
44 # IMAGE_BACKEND=openai
45 # OPENAI_API_KEY=sk-xxx
46 # OPENAI_MODEL=gpt-image-2
47 # OPENAI_BASE_URL=http://127.0.0.1:3000/v1
48 # OpenAI-compatible providers may need these compatibility knobs.
49 # OpenAI-compatible 第三方平台可按需开启以下兼容参数。
50 # OPENAI_SIZE_PRESET=auto
51 # OPENAI_RESPONSE_FORMAT=auto
52 # OPENAI_QUALITY=auto
53 # Allowed values: png / jpeg / webp
54 # OPENAI_OUTPUT_FORMAT=png
55 # jpeg/webp only, 0-100
56 # OPENAI_OUTPUT_COMPRESSION=80
57 # gpt-image-2: auto / opaque
58 # OPENAI_BACKGROUND=auto
59 # auto / low
60 # OPENAI_MODERATION=auto
61
62 # ─────────────────────────────────────────────────────────────
63 # Example: Gemini / Gemini 示例
64 # ─────────────────────────────────────────────────────────────
65 # IMAGE_BACKEND=gemini
66 # GEMINI_API_KEY=your-gemini-api-key
67 # GEMINI_MODEL=gemini-3.1-flash-image-preview
68 # GEMINI_BASE_URL=https://your-proxy-url.com
69
70 # ─────────────────────────────────────────────────────────────
71 # Example: MiniMax / MiniMax 示例
72 # ─────────────────────────────────────────────────────────────
73 # IMAGE_BACKEND=minimax
74 # MINIMAX_API_KEY=your-minimax-key
75 # MINIMAX_MODEL=image-01
76 # Default China endpoint / 默认国内地址
77 # MINIMAX_BASE_URL=https://api.minimaxi.com/v1/image_generation
78 # Optional overseas endpoint / 可选海外地址
79 # MINIMAX_BASE_URL=https://api.minimax.io/v1/image_generation
80
81 # ─────────────────────────────────────────────────────────────
82 # Example: Qwen / 通义生图示例
83 # ─────────────────────────────────────────────────────────────
84 # IMAGE_BACKEND=qwen
85 # QWEN_API_KEY=your-dashscope-key
86 # QWEN_MODEL=qwen-image-2.0-pro
87 # QWEN_BASE_URL=https://dashscope.aliyuncs.com/api/v1/services/aigc/text2image/image-synthesis
88
89 # ─────────────────────────────────────────────────────────────
90 # Example: Zhipu / 智谱生图示例
91 # ─────────────────────────────────────────────────────────────
92 # IMAGE_BACKEND=zhipu
93 # ZHIPU_API_KEY=your-zhipu-key
94 # ZHIPU_MODEL=glm-image
95 # ZHIPU_BASE_URL=https://open.bigmodel.cn/api/paas/v4/images/generations
96
97 # ─────────────────────────────────────────────────────────────
98 # Example: Volcengine / 火山引擎示例
99 # ─────────────────────────────────────────────────────────────
100 # IMAGE_BACKEND=volcengine
101 # VOLCENGINE_API_KEY=your-volcengine-key
102 # VOLCENGINE_MODEL=doubao-seedream-4-5-251128
103 # VOLCENGINE_BASE_URL=https://operator.las.cn-beijing.volces.com/api/v1/images/generations
104
105 # ─────────────────────────────────────────────────────────────
106 # Extended / Experimental backends
107 # 扩展 / 实验后端
108 # ─────────────────────────────────────────────────────────────
109 # STABILITY_API_KEY=your-stability-key
110 # STABILITY_MODEL=stable-image-core
111 # STABILITY_BASE_URL=https://api.stability.ai
112 #
113 # BFL_API_KEY=your-bfl-key
114 # BFL_MODEL=flux-pro-1.1-ultra
115 # BFL_BASE_URL=https://api.bfl.ai
116 #
117 # IDEOGRAM_API_KEY=your-ideogram-key
118 # IDEOGRAM_MODEL=ideogram-v3
119 # IDEOGRAM_BASE_URL=https://api.ideogram.ai
120 #
121 # MINIMAX_API_KEY=your-minimax-key
122 # MINIMAX_MODEL=image-01
123 # Default China endpoint / 默认国内地址
124 # MINIMAX_BASE_URL=https://api.minimaxi.com/v1/image_generation
125 # Optional overseas endpoint / 可选海外地址
126 # MINIMAX_BASE_URL=https://api.minimax.io/v1/image_generation
127 #
128 # SILICONFLOW_API_KEY=your-siliconflow-key
129 # SILICONFLOW_MODEL=Qwen/Qwen-Image
130 # SILICONFLOW_BASE_URL=https://api.siliconflow.cn/v1/images/generations
131 #
132 # FAL_KEY=your-fal-key
133 # FAL_MODEL=fal-ai/imagen3/fast
134 # FAL_BASE_URL=https://fal.run
135 #
136 # REPLICATE_API_TOKEN=r8_xxx
137 # REPLICATE_MODEL=black-forest-labs/flux-1.1-pro
138 # REPLICATE_BASE_URL=https://api.replicate.com/v1/predictions
139 #
140 # OPENROUTER_API_KEY=sk-or-v1-xxx
141 # OPENROUTER_MODEL=google/gemini-3.1-flash-image-preview
142 # OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
143 #
144 # OpenAI-compatible example: Agnes AI / OpenAI-compatible 示例:Agnes AI
145 # IMAGE_BACKEND=openai
146 # OPENAI_API_KEY=your-agnes-key
147 # OPENAI_MODEL=agnes-image-2.1-flash
148 # OPENAI_BASE_URL=https://apihub.agnes-ai.com/v1
149 # OPENAI_SIZE_PRESET=gpt-image-2
150 # OPENAI_RESPONSE_FORMAT=omit
151 # OPENAI_QUALITY=omit
152 #
153 # IMAGE_BACKEND=modelscope
154 # MODELSCOPE_API_KEY=your-modelscope-key
155 # MODELSCOPE_MODEL=Tongyi-MAI/Z-Image-Turbo
156 # MODELSCOPE_BASE_URL=https://api-inference.modelscope.cn/v1
157
158 # ─────────────────────────────────────────────────────────────
159 # Multi-provider example / 多提供商共存示例
160 # ─────────────────────────────────────────────────────────────
161 # IMAGE_BACKEND=openai
162 # OPENAI_API_KEY=sk-xxx
163 # OPENAI_MODEL=gpt-image-2
164 # OPENAI_OUTPUT_FORMAT=png
165 # GEMINI_API_KEY=your-gemini-api-key
166 # GEMINI_MODEL=gemini-3.1-flash-image-preview
167 #
168 # Switch providers by changing IMAGE_BACKEND only.
169 # 切换提供商时,只改 IMAGE_BACKEND 即可。
170
171 # ─────────────────────────────────────────────────────────────
172 # Audio narration TTS (notes_to_audio.py) / 旁白音频 TTS
173 # ─────────────────────────────────────────────────────────────
174 # edge-tts is the default narration backend and needs no API key.
175 # Use cloud providers only when you want high-quality or cloned voices —
176 # all four (ElevenLabs / MiniMax / Qwen / CosyVoice) accept a cloned voice_id.
177 # Clone the voice in the provider's console first, then pass --voice-id to
178 # notes_to_audio.py. See docs/audio-narration.md "Use a cloned voice".
179 # edge-tts 是默认旁白后端,无需 API Key。
180 # 需要高质量云端旁白或复刻音色时再配置云端提供商——
181 # ElevenLabs / MiniMax / Qwen / CosyVoice 四家都支持传入复刻 voice_id。
182 # 先在 provider 控制台复刻得到 voice_id,再用 --voice-id 传给 notes_to_audio.py。
183 # 详见 docs/zh/audio-narration.md "使用复刻音色"。
184 #
185 # ELEVENLABS_API_KEY=your-elevenlabs-api-key
186 # MINIMAX_API_KEY=your-minimax-key
187 # QWEN_API_KEY=your-dashscope-key
188 # COSYVOICE_API_KEY=your-dashscope-key
189 # DASHSCOPE_API_KEY=your-dashscope-key
190 #
191 # Optional provider-specific TTS endpoint overrides.
192 # 可选:按提供商覆盖 TTS 接入点。
193 # Default China endpoint / 默认国内地址
194 # MINIMAX_TTS_BASE_URL=https://api.minimaxi.com/v1/t2a_v2
195 # Optional overseas endpoint / 可选海外地址
196 # MINIMAX_TTS_BASE_URL=https://api.minimax.io/v1/t2a_v2
197 # QWEN_TTS_BASE_URL=https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
198 # COSYVOICE_TTS_BASE_URL=https://dashscope.aliyuncs.com/api/v1/services/audio/tts/SpeechSynthesizer
199
200 # ─────────────────────────────────────────────────────────────
201 # Web image search (image_search.py) / 网络图片搜索
202 # ─────────────────────────────────────────────────────────────
203 # Used by scripts/image_search.py — separate from IMAGE_BACKEND above.
204 # image_search.py 用,与上面的 IMAGE_BACKEND 互不影响。
205 #
206 # Openverse and Wikimedia work with no key, but image quality can be uneven.
207 # For polished stock-style PPT images, configure Pexels and/or Pixabay.
208 # Openverse 和 Wikimedia 无需 Key,但图片质量不稳定。
209 # 如需更稳定的商业图库风格 PPT 配图,建议配置 Pexels 和/或 Pixabay。
210 #
211 # Sign up: https://www.pexels.com/api/
212 # PEXELS_API_KEY=your-pexels-key
213 # Sign up: https://pixabay.com/api/docs/
214 # PIXABAY_API_KEY=your-pixabay-key
215
215 lines Plain Text