banana-slides Documentation

一个基于nano banana pro🍌的原生AI PPT生成应用,迈向"Vibe PPT"; 支持上传任意模板图片,上传任意素材&智能解析,一句话/大纲/页面描述自动生成PPT,口头修改指定区域、一键导出可编辑ppt - An AI-native slides generator based on nano...

RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy banana-slides on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name banana-slides -p 3011:3011 --restart always anionex/banana-slides:latest
Configured Services & Ports
⚙️ app
image: build locally
🔌 Ports: ${PORT:-3011}:80
docker-compose.yml
yaml (docker-compose.yml)
services:
  app:
    build:
      context: .
      dockerfile: Dockerfile.allinone
      args:
        DOCKER_REGISTRY: ${DOCKER_REGISTRY:-}
        GHCR_REGISTRY: ${GHCR_REGISTRY:-ghcr.io/}
        APT_MIRROR: ${APT_MIRROR:-}
        PYPI_INDEX_URL: ${PYPI_INDEX_URL:-}
        NPM_REGISTRY: ${NPM_REGISTRY:-}
    container_name: banana-slides
    ports:
      - "${PORT:-3011}:80"
    env_file:
      - .env
    volumes:
      - ./backend/instance:/app/backend/instance
      - ./uploads:/app/uploads
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 15s

File: README.md

🔥 最新动态

  • [2026-08-20]:0.9.0 候选版本 4 发布,重点修复桌面打包版 LazyLLM 在线供应商不可用(qwen 等)与 SOCKS 代理依赖缺失,并恢复预览页「上一步」返回描述编辑页、修复导出任务弹层遮挡与桌面端属性抽屉交互;一键下载并安装
  • [2026-08-20]:预览页恢复「上一步」按钮,可从幻灯片预览一键返回描述编辑页继续修改
  • [2026-08-20]:修复导出任务弹层被页面属性抽屉遮挡的问题;桌面端页面属性抽屉默认展开并自动适配窗口宽度
  • [2026-07-31]:桌面打包版完整注册 11 家 LazyLLM 在线供应商(qwen / doubao / deepseek / glm / kimi / minimax / sensenova / siliconflow / ppio / aiping / openai),修复打包版报 Unsupported source: qwen 的问题
  • [2026-08-06]:0.9.0 候选版本 3 发布,重点修复火山引擎 Agent Plans 配置与凭据恢复,并带来大纲流隔离、幻灯片就地编辑、字段契约 v2、模板匹配和可编辑 PPTX 导出改进;一键下载并安装
  • [2026-07-15]:自定义大纲/描述要求预设现在会自动修复损坏的浏览器缓存,保留仍然有效的预设,避免异常缓存阻断编辑页面
  • [2026-07-11]:0.9.0 候选版本 2 发布,包含 RC1 的全部能力,并修复 Windows 桌面端可编辑 PPTX 的 MinerU 目录不一致、讲解视频 FFprobe 路径错误;一键下载并安装
  • [2026-06-23]:逐页模板上线 — 支持统一模板 / 每页独立模板两种模式,可上传图片或 PDF 构建项目模板库,AI 自动解析模板风格并一键为每页智能匹配,也可逐页手动绑定;两种模式随时双向切换(文档)
  • [2026-04-25]: 素材工具箱上线 — 在原有素材生成基础上新增整图编辑、框选编辑(overlay/replace)、智能擦除三种模式,统一入口一站式操作
  • [2026-04-25]:支持通过 OpenAI 官方 OAuth 登录绑定账号,绑定后可直接使用 Codex 作为文本/图片生成 provider,无需手动填写 API Key,plus账号五小时可生成100+ 2k图(教程)(基于 OpenAI 官方 OAuth PKCE 授权流程,非逆向)
  • [2026-04-25]:支持保存自定义文字风格描述模板,可命名、标色、持久化复用,无需每次重新输入
  • [2026-04-23]:支持了gpt-image-2模型,同时导出可编辑背景效果也因模型能力升级得到了提升(在 设置-导出选项-背景获取 选择 生成式获取)
  • [2026-04-11]:支持了cli操作并加入了agent skills
  • [2026-03]:加入了若干功能和优化,如额外字段、多比例设定等
  • [2026-02-09]: 新功能和优化
    • 新功能
      • 支持在首页、大纲、描述卡片里面粘贴图片并立即识别,并提供更好的交互体验
      • 大纲章节手动编辑:支持手动调整页面所属章节(part)。
      • Docker 多架构:镜像支持 amd64 / arm64 构建。
      • 国际化 + 暗黑模式:新增中英文切换;支持亮色/暗色/跟随系统主题;全组件适配暗黑模式。
    • 修复与体验优化
      • 修复导出相关 500、参考文件关联时序、outline/page 数据错位、任务轮询错误项目、描述生成无限轮询、图片预览内存泄漏、批量删除部分失败处理。
      • 优化格式示例提示、HTTP 错误提示文案、Modal 关闭体验、清理旧项目 localStorage、移除首次创建项目冗余提示。
      • 若干其他优化和修复

✨ 项目缘起

你是否也曾陷入这样的困境:明天就要汇报,但PPT还是一片空白;脑中有无数精彩的想法,却被繁琐的排版和设计消磨掉所有热情?

我(们)渴望能快速创作出既专业又具设计感的演示文稿,传统的AI PPT生成app,虽然大体满足“快”这一需求,却还存在以下问题:

  • 1️⃣只能选择预设模版,无法灵活调整风格
  • 2️⃣自由度低,多轮改动难以进行
  • 3️⃣成品观感相似,同质化严重
  • 4️⃣素材质量较低,缺乏针对性
  • 5️⃣图文排版割裂,设计感差

以上这些缺陷,让传统的AI ppt生成器难以同时满足我们“快”和“美”的两大PPT制作需求。即使自称Vibe PPT,但是在我的眼中还远不够“Vibe”。

但是,nano banana🍌模型的出现让一切有了转机。我尝试使用🍌pro进行ppt页面生成,发现生成的结果无论是质量、美感还是一致性,都做的非常好,且几乎能精确渲染prompt要求的所有文字+遵循参考图的风格。那为什么不基于🍌pro,做一个原生的"Vibe PPT"应用呢?

👨‍💻 适用场景

  1. 小白:零门槛快速生成美观PPT,无需设计经验,减少模板选择烦恼
  2. PPT专业人士:参考AI生成的布局和图文元素组合,快速获取设计灵感
  3. 教育工作者:将教学内容快速转换为配图教案PPT,提升课堂效果
  4. 学生:快速完成作业Pre,把精力专注于内容而非排版美化
  5. 职场人士:商业提案、产品介绍快速可视化,多场景快速适配

🎯目标: 降低 PPT 制作门槛,让每个人都能快速创作出美观专业的演示文稿

🎨 结果案例

更多可见 使用案例

🎯 功能介绍

1. 灵活多样的创作路径

支持想法、大纲、页面描述三种起步方式,满足不同创作习惯。

  • 一句话生成:输入一个主题,AI 自动生成结构清晰的大纲和逐页内容描述。
  • 自然语言编辑:支持以 Vibe 形式口头修改大纲或描述(如"把第三页改成案例分析"),AI 实时响应调整。
  • 大纲/描述模式:既可一键批量生成,也可手动调整细节。

2. 强大的素材解析能力

  • 多格式支持:上传 PDF/Docx/MD/Txt 等文件,后台自动解析内容。
  • 智能提取:自动识别文本中的关键点、图片链接和图表信息,为生成提供丰富素材。
  • 图片自动入库:文档解析出的图片会随参考文件关联项目后自动进入项目素材库,后续可直接复用。
  • 风格参考:支持上传参考图片或模板,定制 PPT 风格。

3. "Vibe" 式自然语言修改

不再受限于复杂的菜单按钮,直接通过自然语言下达修改指令。

  • 局部重绘:对不满意的区域进行口头式修改(如"把这个图换成饼图")。
  • 整页优化:基于 nano banana pro🍌 生成高清、风格统一的页面。

4. 开箱即用的格式导出

  • 多格式支持:一键导出标准 PPTX 或 PDF 文件。
  • 播放设置:导出 PPTX 前可开启页面切换动画,支持淡入淡出等经典效果
  • 完美适配:默认 16:9 比例,排版无需二次调整,直接演示。

5. 可自由编辑的pptx导出(Beta迭代中)

6. 一键导出讲解视频

  • 一键将幻灯片转换为带 AI 语音旁白和字幕的讲解视频(MP4)
  • AI 自动根据页面描述和内容生成口语化旁白
  • 支持配置多种表达风格、多语言和多种音色

🌟和notebooklm slide deck功能对比

功能 notebooklm 本项目
页数上限 15页 无限制
二次编辑 提示词修改 框选编辑+口头编辑
素材添加 生成后无法添加 生成后自由添加
导出格式 支持导出为 PDF、(不可编辑图片)pptx 导出为PDF、(图片or可编辑)pptx、讲解视频
水印 免费版有水印 无水印,自由增删元素

注:随着新功能添加,对比可能过时

🗺️ 开发计划

状态 里程碑
✅ 已完成 PPT 单页添加更多素材
✅ 已完成 PPT 单页框选区域Vibe口头编辑
✅ 已完成 素材模块: 素材生成、上传等
✅ 已完成 支持多种文件的上传+解析
✅ 已完成 支持Vibe口头调整大纲和描述
✅ 已完成 初步支持可编辑版本pptx文件导出
🔄 进行中 支持多层次、精确抠图的可编辑pptx导出
🔄 进行中 网络搜索
🔄 进行中 Agent 模式
✅ 已完成 TTS 讲解视频导出(中/英/日多音色、字幕)

📦 使用方法

(新)使用应用模板一键部署

这是最简单的方式,无需安装docker或下载项目,创建后可直接进入应用

  1. 通过雨云一键部署和启动本应用 (带宽大,适合高清图片生成和下载。新用户有免费试用)

  1. 敬请期待

使用 Docker Compose🐳

通过docker compose快速启动前后端服务。

📒 Windows/Mac用户说明

如果你使用 Windows 或 macOS,请先安装 Docker Desktop,并确保 Docker 正在运行(Windows 可检查系统托盘图标;macOS 可检查菜单栏图标),然后按文档中的相同步骤操作。

提示:如果遇到问题,Windows 用户请在 Docker Desktop 设置中启用 WSL 2 后端(推荐);同时确保端口 3011 和 5011 未被占用。

  1. 克隆代码仓库
bash
git clone https://github.com/Anionex/banana-slides
cd banana-slides
  1. 配置环境变量

创建 .env 文件(参考 .env.example):

bash
cp .env.example .env

(可选, 也可以启动后在用户界面配置,教程可点击此处) 编辑 .env 文件,配置必要的环境变量:

点击展开详情

项目中大模型接口以AIHubMix平台格式为标准,推荐使用 AIHubMix(点击此处可直接访问) 获取API密钥,减小迁移成本
友情提示:谷歌nano banana pro模型接口费用较高,请注意调用成本

env
# AI Provider格式配置 (gemini / openai / volcengine / vertex)
AI_PROVIDER_FORMAT=gemini

# Gemini 格式配置(当 AI_PROVIDER_FORMAT=gemini 时使用)
GOOGLE_API_KEY=your-api-key-here
GOOGLE_API_BASE=https://generativelanguage.googleapis.com
# 代理示例: https://api.inferera.com/gemini

# OpenAI 格式配置(当 AI_PROVIDER_FORMAT=openai 时使用)
OPENAI_API_KEY=your-api-key-here
OPENAI_API_BASE=https://api.openai.com/v1
# 代理示例: https://api.inferera.com/v1

# 火山方舟 Agent Plans 配置(当 AI_PROVIDER_FORMAT=volcengine 时使用)
# 注意: Agent Plan 需使用专属 API Key 与模型名 (doubao-seed-2.1-turbo / doubao-seedream-5.0-lite)
VOLCENGINE_API_KEY=your-volcengine-api-key-here
VOLCENGINE_API_BASE=https://ark.cn-beijing.volces.com/api/plan/v3

# Vertex AI 配置(AI_PROVIDER_FORMAT=vertex)
# 需要 GCP 项目和服务账户密钥
# VERTEX_PROJECT_ID=your-gcp-project-id
# VERTEX_LOCATION=global
# GOOGLE_APPLICATION_CREDENTIALS=./gcp-service-account.json

# Lazyllm 格式配置(当 AI_PROVIDER_FORMAT=lazyllm 时使用)
# 选择文本生成和图片生成使用的厂商
TEXT_MODEL_SOURCE=deepseek        # 文本生成模型厂商
IMAGE_MODEL_SOURCE=doubao         # 图片编辑模型厂商
IMAGE_CAPTION_MODEL_SOURCE=qwen   # 图片描述模型厂商

# 各厂商 API Key(只需配置你要使用的厂商)
DOUBAO_API_KEY=your-doubao-api-key            # 火山引擎/豆包
DEEPSEEK_API_KEY=your-deepseek-api-key        # DeepSeek
QWEN_API_KEY=your-qwen-api-key                # 阿里云/通义千问
GLM_API_KEY=your-glm-api-key                  # 智谱 GLM
SILICONFLOW_API_KEY=your-siliconflow-api-key  # 硅基流动
SENSENOVA_API_KEY=your-sensenova-api-key      # 商汤日日新
MINIMAX_API_KEY=your-minimax-api-key          # MiniMax
KIMI_API_KEY=your-kimi-api-key                # 月之暗面 Kimi
PPIO_API_KEY=your-ppio-api-key                # PPIO 派欧云
AIPING_API_KEY=your-aiping-api-key            # AIPing 爱拼
...

Banana Slides explicitly packages the LazyLLM online provider SDKs used by domestic vendors:
volcengine-python-sdk[ark] for Doubao, dashscope for Qwen/Wanxiang, and zhipuai for GLM/Zhipu.
LazyLLM also exposes lazyllm install online-advanced, but the PyPI wheel may not publish that group as a standard install extra, so Docker/prebuilt images rely on these explicit dependencies instead.

Desktop (PyInstaller) builds register every LazyLLM online vendor explicitly
(qwen, doubao, deepseek, glm, kimi, minimax, sensenova, siliconflow, ppio,
aiping, openai) so packaged backends never hit Unsupported source: ....

使用新版可编辑导出配置方法,获得更好的可编辑导出效果: 需在百度智能云平台(点击此处进入)中获取API KEY,填写在.env文件中的BAIDU_API_KEY字段(有充足的免费使用额度)。详见https://github.com/Anionex/banana-slides/issues/121 中的说明

📒 Vertex AI 配置指南(适用于 GCP 用户)

Google Cloud Vertex AI 允许通过 GCP 服务账户调用 Gemini 模型,新用户可使用赠金额度。配置步骤:

  1. 前往 GCP Console,创建一个服务账户并下载 JSON 格式的密钥文件
  2. 将密钥文件保存为项目根目录下的 gcp-service-account.json
  3. 在 .env 中设置:
    env
    AI_PROVIDER_FORMAT=vertex
    VERTEX_PROJECT_ID=your-gcp-project-id
    VERTEX_LOCATION=global
  4. 如果使用 Docker 部署,还需要在 docker-compose.yml 中取消相关注释,将密钥文件挂载到容器内并设置 GOOGLE_APPLICATION_CREDENTIALS 环境变量。

gemini-3-* 系列模型要求 VERTEX_LOCATION=global

  1. 启动服务

⚡ 使用预构建镜像(推荐)

项目在 Docker Hub 提供了构建好的前端和后端镜像(同步主分支最新版本),可以跳过本地构建步骤,实现快速部署:

bash
# 使用预构建镜像启动(无需从头构建)
docker compose -f docker-compose.prod.yml up -d

镜像名称:

  • anoinex/banana-slides-frontend:latest
  • anoinex/banana-slides-backend:latest

启动后可在应用内进入 设置 → 关于 → 检查更新,应用会根据当前版本 SHA 判断是否已有可用更新;源码运行时也会用当前 Git SHA 参与判断。

从头构建镜像

bash
docker compose up -d

[!TIP]
如遇网络问题,可在 .env 文件中取消镜像源配置的注释, 再重新运行启动命令:

env
# 在 .env 文件中取消以下注释即可使用国内镜像源
DOCKER_REGISTRY=docker.1ms.run/
GHCR_REGISTRY=ghcr.nju.edu.cn/
APT_MIRROR=mirrors.aliyun.com
PYPI_INDEX_URL=https://mirrors.cloud.tencent.com/pypi/simple
NPM_REGISTRY=https://registry.npmmirror.com/
  1. 访问应用
  1. 查看日志
bash
# 查看后端日志(最后 200 行)
docker logs --tail 200 banana-slides-backend

# 实时查看后端日志(最后 100 行)
docker logs -f --tail 100 banana-slides-backend

# 查看前端日志(最后 100 行)
docker logs --tail 100 banana-slides-frontend
  1. 停止服务
bash
docker compose down
  1. 更新项目

使用预构建镜像(docker-compose.prod.yml)

也可以先在应用内进入 设置 → 关于 → 检查更新 查看是否已有新版本。

bash
docker compose -f docker-compose.prod.yml pull
docker compose -f docker-compose.prod.yml up -d

使用本地构建(docker-compose.yml)

注:若手动修改了代码,该方法不适用,需要先将代码还原到拉取时的版本。

bash
git pull 
docker compose down
docker compose build --no-cache
docker compose up -d

注:感谢优秀开发者朋友 @ShellMonster 提供了新人部署教程,专为没有任何服务器部署经验的新手设计,可点击链接查看。

从源码部署

环境要求

  • Python 3.10 或更高版本
  • uv - Python 包管理器
  • Node.js 16+ 和 npm
  • FFmpeg - 讲解视频导出必需,且必须包含 libass / ass 字幕滤镜支持
  • 有效的 Google Gemini API 密钥
  • (可选)LibreOffice - 使用「PPT 翻新」功能上传 PPTX 文件时需要,用于将 PPTX 转换为 PDF。推荐先在本地将 PPTX 转为 PDF 后再上传,原因:LibreOffice 在服务端渲染时可能因缺少字体(如微软雅黑、Calibri 等)导致排版错位,且无法完整还原部分特效。上传 PDF 文件则不需要 LibreOffice。Docker 用户如仍需在容器内支持 PPTX 上传,可执行:
    bash
    docker exec -it banana-slides-backend bash -c "apt-get update && apt-get install -y libreoffice-impress && rm -rf /var/lib/apt/lists/*"

    注意:此方式安装的 LibreOffice 在容器重建后会丢失,需重新安装。

后端安装

  1. 克隆代码仓库
bash
git clone https://github.com/Anionex/banana-slides
cd banana-slides
  1. 安装 uv(如果尚未安装)
bash
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. 安装依赖

在项目根目录下运行:

bash
# macOS(Homebrew)
brew install ffmpeg-full
brew unlink ffmpeg 2>/dev/null || true
brew link --overwrite --force ffmpeg-full

# Ubuntu / Debian
sudo apt-get update
sudo apt-get install -y ffmpeg libass9

# 然后安装 Python 依赖
uv sync

这将根据 pyproject.toml 自动安装所有依赖。

  1. 配置环境变量

复制环境变量模板:

bash
cp .env.example .env
# 然后按照前述方法,打开编辑 `.env` 文件,配置你的 API 密钥

前端安装

  1. 进入前端目录
bash
cd frontend
  1. 安装依赖
bash
npm install
  1. 配置API地址

前端会通过 Vite proxy 自动连接到 BACKEND_PORT 指定的后端服务(默认 http://localhost:5011)。如需修改,请在项目根目录的 .env 中设置 BACKEND_PORT。

启动后端服务

(可选)如果本地已有重要数据,升级前建议先备份数据库:
cp backend/instance/database.db backend/instance/database.db.bak
备注: 默认配置下,模板、素材、成品都在uploads/文件夹中

bash
cd backend
uv run alembic upgrade head && uv run python app.py

后端服务将在 http://localhost:5011 启动。

访问 http://localhost:5011/health 验证服务是否正常运行。

启动前端开发服务器

bash
cd frontend
npm run dev

前端开发服务器将在 http://localhost:3011 启动。

打开浏览器访问即可使用应用。

🛠️ 技术架构

前端技术栈

React 18 + TypeScript + Vite 5 + Zustand

后端技术栈

Python 3.10+ + Flask 3.0 + uv + SQLite

交流群

欢迎在群中提出新功能建议或反馈~

欢迎关注作者的社交媒体,我会分享有关本项目和有关AI的信息:

**🔧 常见问题**

可见官网文档

也可以直接到 DeepWiki 提问

🤝 贡献指南

欢迎通过
Issue
和
Pull Request
为本项目贡献力量!

重要: 贡献前请阅读 CONTRIBUTING.md

📄 许可证

本项目采用 GNU Affero General Public License v3.0(AGPL-3.0) 开源,
可自由用于个人学习、研究、试验、教育或非营利科研活动等非商业用途;闭源商业用途需获取授权。

如有疑问或合作意向、获取多租户商业版本,可联系: [email protected]

🚀 Sponsor / 赞助

致谢

  • 项目贡献者们:

赞赏

开源不易🙏如果本项目对你有价值,欢迎请开发者喝杯咖啡☕️

感谢以下朋友对项目的无偿赞助支持:

@雅俗共赏、@曹峥、@以年观日、@John、@胡yun星Ethan, @azazo1、@刘聪NLP、@🍟、@苍何、@万瑾、@biubiu、@law、@方源、@寒松Falcon、@刘星宇&小陀螺AIGC
如对赞助列表有疑问,可联系作者

📈 项目统计


File: backend/README.md

Banana Slides Backend

蕉幻(Banana Slides)后端服务 - AI驱动的PPT生成系统

技术栈

  • 框架: Flask 3.0
  • 数据库: SQLite + SQLAlchemy ORM
  • AI服务: Google Gemini API
  • PPT处理: python-pptx
  • 并发处理: ThreadPoolExecutor
  • 包管理: uv

项目结构

text
backend/
├── app.py                    # Flask应用入口
├── config.py                 # 配置文件
├── models/                   # 数据库模型
│   ├── __init__.py
│   ├── project.py           # Project模型
│   ├── page.py              # Page模型
│   └── task.py              # Task模型
├── services/                 # 服务层
│   ├── __init__.py
│   ├── ai_service.py        # AI相关服务
│   ├── file_service.py      # 文件管理服务
│   ├── export_service.py    # 导出服务
│   └── task_manager.py      # 异步任务管理
├── controllers/              # 控制器层
│   ├── __init__.py
│   ├── project_controller.py
│   ├── page_controller.py
│   ├── template_controller.py
│   ├── export_controller.py
│   └── file_controller.py
├── utils/                    # 工具函数
│   ├── __init__.py
│   ├── response.py          # 统一响应格式
│   └── validators.py        # 数据验证
├── instance/                 # 数据库文件目录(自动创建)
├── uploads/                  # 文件上传目录(自动创建)
├── .env.example             # 环境变量示例
└── README.md                # 本文件

快速开始

1. 安装依赖

本项目使用 uv 管理 Python 依赖。所有依赖定义在项目根目录的 pyproject.toml 文件中。

在项目根目录下运行:

bash
uv sync

这将自动安装所有必需的依赖包。

2. 配置环境变量

复制 .env.example 为 .env 并填写配置:

bash
cp .env.example .env

编辑 .env 文件:

env
GOOGLE_API_KEY=your-google-api-key
GOOGLE_API_BASE=https://generativelanguage.googleapis.com

# 火山引擎配置(可选,用于 Inpainting 图像消除功能)
VOLCENGINE_ACCESS_KEY=your-volcengine-access-key
VOLCENGINE_SECRET_KEY=your-volcengine-secret-key
VOLCENGINE_INPAINTING_TIMEOUT=60
VOLCENGINE_INPAINTING_MAX_RETRIES=3

3. 初始化 / 升级数据库结构(Alembic 迁移)

从当前版本开始,后端使用 Alembic 管理数据库结构变更。

bash
cd backend
uv run alembic upgrade head

注意:

  • 首次运行时会自动创建 alembic_version 表并将数据库迁移到最新结构;
  • 后续新增模型字段时,只需要更新 models/,然后使用 alembic revision --autogenerate 生成迁移,再执行 alembic upgrade head。

4. 运行服务

使用 uv 运行:

bash
cd backend
uv run python app.py

服务将在 http://localhost:5011 启动。

API文档

完整的API文档请参考项目根目录的 API设计文档.md。

主要端点

项目管理

  • POST /api/projects - 创建项目
  • GET /api/projects/{project_id} - 获取项目详情
  • PUT /api/projects/{project_id} - 更新项目
  • DELETE /api/projects/{project_id} - 删除项目

大纲生成

  • POST /api/projects/{project_id}/generate/outline - 生成大纲

描述生成

  • POST /api/projects/{project_id}/generate/descriptions - 批量生成描述(异步)
  • POST /api/projects/{project_id}/pages/{page_id}/generate/description - 单页生成

图片生成

  • POST /api/projects/{project_id}/generate/images - 批量生成图片(异步)
  • POST /api/projects/{project_id}/pages/{page_id}/generate/image - 单页生成
  • POST /api/projects/{project_id}/pages/{page_id}/edit/image - 编辑图片

模板管理

  • POST /api/projects/{project_id}/template - 上传模板
  • DELETE /api/projects/{project_id}/template - 删除模板

导出

  • GET /api/projects/{project_id}/export/pptx - 导出PPTX
  • GET /api/projects/{project_id}/export/pdf - 导出PDF

静态文件

  • GET /files/{project_id}/{type}/{filename} - 获取文件

核心功能

1. AI驱动的内容生成

基于 Google Gemini API,支持:

  • 自动生成PPT大纲
  • 并行生成页面描述
  • 根据参考模板生成图片
  • 自然语言编辑图片

2. 异步任务处理

使用 ThreadPoolExecutor 实现简单但高效的异步任务处理:

  • 并行生成多个页面描述
  • 并行生成多个页面图片
  • 实时任务进度跟踪

3. 文件管理

完整的文件管理系统:

  • 项目级文件隔离
  • 模板图片管理
  • 生成图片管理
  • 自动清理机制

4. Inpainting 图像消除(可选)

基于火山引擎的 Inpainting 服务,支持:

  • 根据边界框(bbox)精确消除图像区域
  • 自动生成掩码图像
  • 重新生成背景(保留前景,消除其他区域)
  • 支持批量处理和重试机制

使用方法:

python
from services.inpainting_service import InpaintingService, remove_regions
from PIL import Image

# 方式1:使用服务类
service = InpaintingService()
image = Image.open('original.png')
bboxes = [(100, 100, 200, 200), (300, 150, 400, 250)]  # 要消除的区域
result = service.remove_regions_by_bboxes(image, bboxes)

# 方式2:使用便捷函数
result = remove_regions(image, bboxes, expand_pixels=5)

5. 数据持久化

使用 SQLite + SQLAlchemy:

  • 轻量级,无需额外配置
  • 支持关系型数据操作
  • 事务保证数据一致性

开发说明

数据模型

Project(项目)

  • 项目基本信息
  • 模板图片路径
  • 项目状态
  • 关联的页面和任务

Page(页面)

  • 页面顺序
  • 大纲内容(JSON)
  • 描述内容(JSON)
  • 生成的图片路径
  • 页面状态

Task(任务)

  • 任务类型(生成描述/生成图片)
  • 任务状态
  • 进度信息(JSON)
  • 错误信息

状态机

项目状态

text
DRAFT → OUTLINE_GENERATED → DESCRIPTIONS_GENERATED → GENERATING_IMAGES → COMPLETED

页面状态

text
DRAFT → DESCRIPTION_GENERATED → GENERATING → COMPLETED | FAILED

任务状态

text
PENDING → PROCESSING → COMPLETED | FAILED

扩展开发

添加新的AI模型

在 services/ai_service.py 中添加新的模型支持:

python
class AIService:
    def __init__(self, api_key: str, model_type: str = 'gemini'):
        if model_type == 'gemini':
            # Gemini implementation
        elif model_type == 'openai':
            # OpenAI implementation
        # ...

自定义提示词模板

修改 services/ai_service.py 中的提示词生成逻辑:

python
def generate_image_prompt(self, ...):
    prompt = dedent(f"""
        # 自定义提示词模板
        ...
    """)
    return prompt

添加新的导出格式

在 services/export_service.py 中添加新的导出方法:

python
class ExportService:
    @staticmethod
    def create_custom_format(image_paths, output_file):
        # 实现自定义格式导出
        pass

测试

健康检查

bash
curl http://localhost:5011/health

创建项目

bash
curl -X POST http://localhost:5011/api/projects \
  -H "Content-Type: application/json" \
  -d '{"creation_type":"idea","idea_prompt":"生成环保主题ppt"}'

上传模板

bash
curl -X POST http://localhost:5011/api/projects/{project_id}/template \
  -F "[email protected]"

生成大纲

bash
curl -X POST http://localhost:5011/api/projects/{project_id}/generate/outline \
  -H "Content-Type: application/json" \
  -d '{"idea_prompt":"生成环保主题ppt"}'

常见问题

Q: 数据库文件在哪里?

A: 在 backend/instance/database.db,会自动创建。

Q: 上传的文件存在哪里?

A: 在 uploads/{project_id}/ 目录下,按项目隔离。

Q: 如何修改并发数?

A: 推荐通过前端设置页修改(会同步到数据库并覆盖 .env 值);也可以在 .env 文件中修改 MAX_DESCRIPTION_WORKERS 和 MAX_IMAGE_WORKERS 作为默认值,然后在设置页点击“重置为默认值”同步到 DB。

Q: 如何切换到其他AI模型 / 修改 MinerU 地址?

A: 从当前版本开始,推荐通过前端“系统设置”页面修改:

  • 大模型提供商格式 / API Base / API Key
  • 文本模型 (TEXT_MODEL) / 图片模型 (IMAGE_MODEL)
  • MinerU 地址 (MINERU_API_BASE) / 图片识别模型 (IMAGE_CAPTION_MODEL)

这些值会保存到 settings 表并覆盖 .env 中对应配置,点击“重置为默认值”会回到 .env 的默认值。

Q: 支持哪些图片格式?

A: PNG, JPG, JPEG, GIF, WEBP。在 config.py 中的 ALLOWED_EXTENSIONS 配置。

开源字体说明

本项目包含 Noto Sans CJK SC(思源黑体简体中文)字体文件,用于 PPT 导出时的精确文本测量。

OFL 许可证允许自由使用、修改和分发该字体。

联系方式

如有问题或建议,请通过 GitHub Issues 反馈。


File: docs/features/creation.mdx


title: "Creating a Presentation"

On the home page, choose a creation method, fill in your content, and click Create New Project.

All three text-based creation modes require at least one non-whitespace character. The UI blocks whitespace-only submissions, and the API enforces the same rule while trimming extra whitespace at both ends.

From an Idea (Simplest)

Just one sentence describing your topic — AI handles the full pipeline: outline → descriptions → images.

Best for: No existing material, want a PPT generated quickly

Steps:

  1. Select the From Idea tab
  2. Enter your topic, e.g.: Create an 8-slide presentation about carbon neutrality
  3. Choose a template and aspect ratio (optional)
  4. Click Create New Project

You'll land in the Outline Editor to review and adjust the AI-generated outline.

From an Outline

You have a structure and don't want AI to guess:

Best for: You have an existing outline or table of contents

Steps:

  1. Select the From Outline tab
  2. Paste your outline — supports title + bullet points, or titles only
  3. Click Create New Project — AI automatically parses it into a structured outline

Format example:

text
Slide 1: The Origins of AI
- 1956 Dartmouth Conference
- Vision of early researchers

Slide 2: The Rise of Machine Learning
The shift from rule-based to data-driven approaches

From Descriptions

You already have detailed per-page descriptions and want to skip the outline step:

Best for: Content is fully defined, or you've generated descriptions from another AI tool

Steps:

  1. Select the From Description tab
  2. Paste your full page descriptions (including layout, color, content)
  3. Click Create New Project — skips outline, goes straight to image generation

Format example:

text
Slide 1: Cover
Clean cover page, company logo centered, white bold title, dark blue gradient background.

Slide 2: Market Overview
5-year market growth bar chart, key figures highlighted in cards.

PPT Renovation

Upload an existing PDF or PPTX — AI parses the content and regenerates a visually refreshed version:

Best for: Outdated PPT needing a visual refresh, or using an existing PPT as a starting point

Steps:

  1. Select the PPT Renovation tab
  2. Upload a PDF or PPTX file
  3. Optionally check Keep original layout to stay closer to the original structure
  4. Click Create New Project
We recommend converting PPTX to PDF locally before uploading. Direct PPTX upload requires server-side LibreOffice conversion, which may cause layout issues due to missing fonts.

Aspect Ratio

Choose an aspect ratio below the input area before creating the project:

Ratio Best for
16:9 Standard widescreen (default)
4:3 Traditional slides
21:9 Ultrawide displays
1:1 Square (social media)
9:16 Portrait (mobile)
Some image generation models don't support certain aspect ratios. If generation fails, try switching to 16:9. The ratio can also be changed in Project Settings after creation — images must be regenerated to take effect.

Template and Style

Set the visual style before creating:

Option 1: Choose a template

  • Pick from the preset template gallery, or upload a custom template image

Option 2: Text style description

  • Check Use text description for style
  • Describe the desired visual style, e.g.: Modern tech aesthetic, dark background, blue-purple gradient tones
  • Click a preset style (e.g. "Business Simple", "Tech Modern") for a professional style description
  • Or upload an image and let AI extract its visual style automatically

Save as My Style Template:

After writing a style description, click Save as template in the top-right corner of the text box. Enter a name and pick a color tag to save it. Next time, just click it in the My Styles section to fill in the description instantly. Hover to preview the description; remove unwanted templates by hovering and clicking the × button.

Upload Reference Files

Attach reference files when creating — AI extracts the content as source material:

  • Supported formats: PDF, DOCX, PPTX, XLSX, CSV, TXT, MD
  • Upload methods: Click the paperclip icon, drag and drop, or paste (Ctrl+V)
  • File size limit: 200MB

Files parse automatically after upload. Project creation is blocked until parsing completes. See Materials & Files.


File: docs/features/editing.mdx


title: "Editing Slides"

Natural Language Editing

Instead of navigating complex menus, describe your changes in plain language:

  • "Change the third page to a case study"
  • "Replace this chart with a pie chart"
  • "Make the background darker"
  • "Add a summary bullet list"

Outline Editing

In the Outline Editor, refine the structure by typing instructions like:

  • "Add a section about competitive analysis after the introduction"
  • "Merge the last two pages"
  • "Move the conclusion before the Q&A page"

You can also manually drag and drop pages to reorder them, or edit chapter assignments.

Page Properties Panel

A grip sits permanently on the right edge of the Slide Preview page — click it to open the current page's properties panel. Every field is editable in place and saves automatically about a second after you stop typing, with a Saving / Saved indicator at the top of the panel, so there is no dialog to keep opening and closing:

Field Notes
Title The page title, mirrored in the thumbnail list on the left
Section The chapter this page belongs to — leave it empty to keep the page ungrouped
Description What the image is generated from — the same content you edit in the Description Editor. Supports Markdown, pasted images, and inserting images from the material library
Description extra fields Visual Elements, Visual Focus, Layout, Speaker Notes, and so on; the list follows Description Settings → Extra Fields in the Description Editor. Fields marked Not used in image generation stay out of the image prompt
Narration script Collapsed at the very bottom of the panel. Read aloud when exporting a narration video; leave it empty and the export flow generates one

In per-page template mode a Template block appears as well, where you can swap this page's template image, write a Template prompt for it, or jump straight to Template Setup for bulk changes. The panel also shows the page's status, its position in the deck, the number of image versions, and the creation and update timestamps.

Drag the panel's left edge to resize it (300–640px), or double-click the edge to restore the default width. You can also focus the edge and nudge it with ←/→, or jump to either limit with Home/End. Both the width and the open/collapsed state are remembered, so the preview page looks the same the next time you open it. On narrow screens the panel becomes an overlay — tap the scrim to close it.

Editing a description only updates the text; it does not redraw the image. Click **Regenerate** to make your changes take effect. A page's **key points** belong to the outline stage, so they only appear in the Outline Editor. On the preview page it is the description that drives image generation.

In-place editing and Region Select

On the preview page, click Edit and a command bar smoothly expands beneath the current slide — the slide stays put at full size instead of being covered by a dialog, so you edit while watching it (narrow screens still fall back to a dialog):

  1. Describe the change in Enter edit instructions (e.g., change the background to blue, enlarge the title)
  2. Optional: click Region Select at the top-left of the image, then drag directly on the full-size slide — the boxed area is cropped and submitted as a reference image so the AI focuses on the part you care about
  3. Optional: pick more reference images from Materials or upload them
  4. Click Generate Image — the AI redraws the page using the page description, your instruction, and the reference images
The Region Select box is submitted as a **reference image** to tell the AI which part matters — it does not regenerate only inside the box while keeping the outside pixel-for-pixel. For precise erase or local replacement of an element, use the local-edit and smart-erase tools under **Material Generation** at the top.

Description Detail Level

Next to the Batch Generate Descriptions button in the Detail Editor, you can choose a detail level:

Level Description
Concise Brief descriptions, faster generation, good for quick prototypes
Default Balanced between detail and speed
Detailed Richer descriptions give AI more compositional reference, ideal for fine-tuning

Version History

Every time you regenerate a slide image, the previous version is automatically saved. Click History Versions on the preview page to view and restore any previous version — no need to worry about accidentally overwriting a result you liked.


File: docs/features/export.mdx


title: "Export Options"

Formats

Format Description
PPTX Slides are embedded as images in the PPT file. You can play and reorder pages in PowerPoint, but the text inside images cannot be directly edited
Editable PPTX (Beta) Extracts text from slide images and rebuilds it as native PowerPoint text boxes, enabling direct text editing in PowerPoint
PDF Pixel-perfect output, ready for presentation
Images Each page exported as an individual image file
Narration Video Combines slide images with AI narration into an MP4 video, with optional subtitles and camera motion
Docker deployment already installs the FFmpeg dependencies required for narration video export. For source installs, install an FFmpeg build with `libass` / the `ass` subtitle filter first, for example `brew install ffmpeg-full && brew unlink ffmpeg 2>/dev/null || true && brew link --overwrite --force ffmpeg-full` on macOS or `sudo apt-get update && sudo apt-get install -y ffmpeg libass9` on Ubuntu / Debian.

PPTX Export Panel

Regular PPTX export now opens a settings panel before generating the file. You can enable slide transitions and choose classic effects such as Fade, Page Turn, Push, Wipe, Split, Blinds, Checkerboard, and Clock. When multiple effects are selected, each slide randomly uses one of the selected effects.

Exported Files

The export tasks panel on the Slide Preview page lists export files already stored on the server for the current project. You can download PPTX, PDF, image archives, or narration videos again, or delete files you no longer need to free disk space. Deletion asks for confirmation first; after it succeeds, the file is removed from server storage and from the panel list.

Export task history is scoped by project. Clicking Clear in one project removes only that project's completed or failed tasks and leaves export history from other projects untouched. After a refresh, if the backend does not return a usable status for a restored task, the panel explicitly reports that the backend task status is unknown and offers Check Again instead of misreporting a status-check problem as an export failure.

Narration Strategy

Narration video export now includes a final-step configuration panel so you can tune narration generation without changing the slide content itself.

After you click Export as Narration Video, the menu shows a loading state while Banana Slides reads the saved output language and ElevenLabs configuration. The export panel opens only after those settings load successfully. If loading fails, the app asks you to retry instead of continuing with uncertain defaults.

  • Configure the speaker persona, target audience, speech tone, and core topic
  • Set the per-slide narration length to fit either shorter clips or deeper walkthroughs
  • Auto-generate missing narration while keeping the overall presentation flow connected from slide to slide

Aspect Ratio

Defaults to 16:9. You can change the ratio when creating a project or in Project Settings on the preview page. Supports 16:9, 4:3, 21:9, 1:1, 9:16, and more. Images must be regenerated after changing the ratio.

Editable PPTX (Beta)

The extraction process preserves font size, color, bold styling, text positioning, and table content. However, due to OCR accuracy limits and current model capabilities, complex layouts may have discrepancies from the original slide appearance.

Editable exports continue running in the backend while the preview page periodically checks task status. If a status check hits a network interruption, gateway timeout, or rate limit, the task panel shows Status checks interrupted and reconnects automatically. This means only that the frontend cannot see the latest status; it does not mark the backend export as failed. If automatic checks stop, click Check Again in the panel. If the create-task response is interrupted, the frontend uses a reserved task ID to confirm backend status instead of creating a duplicate export.

The panel shows Export Failed only after the backend explicitly reports failure. Diagnostics can include the failed stage, error code, image-recognition provider and model, per-request timeout, retry count, a redacted technical reason, and the last real progress value. Common actions include:

  • EXPORT_STYLE_MODEL_UNSUPPORTED: switch the image caption configuration to a vision-capable model.
  • EXPORT_STYLE_AUTHENTICATION: check the API key, OAuth session, and service permissions, or reconnect the account.
  • EXPORT_STYLE_RATE_LIMIT: retry later or export fewer pages at once.
  • EXPORT_STYLE_TIMEOUT / EXPORT_STYLE_NETWORK: check the network, proxy, and provider status, then retry.
  • EXPORT_STYLE_INVALID_RESPONSE / EXPORT_STYLE_INCOMPLETE_RESPONSE: retry or switch to a more reliable vision model.
  • EXPORT_CONFIGURATION_MISSING: configure and verify the image caption provider, model, and API key before retrying.
For best extraction results, configure `BAIDU_API_KEY` in your environment. See [Configuration](/configuration#baidu-api-key).

Icon Transparent Background

In Project Settings → Export Settings you can toggle Icon Transparent Background, which is enabled by default. When enabled, images classified as icons during editable PPTX export are processed via the local RMBG-2.0 model to produce transparent-background PNGs before being placed in the PPT, avoiding the icon's original background clashing with the new slide background.

Only elements classified as icons qualify (an OpenCV flood-fill heuristic runs on the ROI). Photos and illustrations keep the original rectangular crop to avoid mistakes.

Powered by local RMBG-2.0 ONNX inference on CPU. The ~512MB model is downloaded automatically on first use to `~/.cache/banana-slides/models/`; set `RMBG_MODEL_PATH` to point at an existing local copy. If extraction fails for an individual icon, the system silently falls back to the original rectangular crop without affecting export. Known limitation: icons rendered with a soft glow or anti-aliased halo against a colored slide background may retain a faint dark fringe or color cast along thin strokes after extraction, because edge pixels are originally a blend of the icon stroke and the slide background. Solid-color icons on plain backgrounds extract cleanly; complex glow effects on gradient backgrounds may need manual touch-up.

Page Selection

You can select specific pages to export rather than exporting the entire presentation. Enable Multi-select on the Slide Preview page, check the pages you want, then click Export.

The export menu checks image readiness for the current export range. PPTX, PDF, Images, and Editable PPTX require every selected page to have a generated image; unfinished draft pages outside the selection no longer block exporting finished pages. For Narration Video, if the range still includes pages without images, you must explicitly enable Include pages without images in the video export dialog before Banana Slides exports placeholder frames.

Narration Video

Narration Video combines your slide images with AI-generated narration into a single MP4, complete with subtitles.

Steps:

  1. Open a project on the Slide Preview page.
  2. Click Export → Narration Video.
  3. In the export dialog, configure:
    • Speaker persona — the speaking style (e.g. corporate executive, content creator).
    • Audience — who the narration is written for.
    • Tone — the emotional register of the script.
    • Voice — the TTS voice used for audio synthesis (see below).
    • Ken Burns effect — subtle zoom/pan motion on each slide (optional).
  4. Click Start Export. Progress is shown in the Export Tasks panel.

Voice Selection

Default (edge-tts): Free voices provided by Microsoft Edge, no API key needed. Options include Chinese (晓晓, 云希), English (Jenny, Guy), and Japanese (Nanami, Keita).

ElevenLabs: Higher-quality, more natural voices. Requires an ElevenLabs API key configured in Settings (see Configuration → ElevenLabs).

When ElevenLabs is enabled in Settings, the voice dropdown in the export dialog switches to ElevenLabs voices — Rachel, Bella, Adam, Josh, and more. The voice ID is handled automatically; you only pick a name.

ElevenLabs voices are English-optimized. For Chinese narration, edge-tts Chinese voices (e.g. 晓晓) generally produce better results.

Allow Partial Results

The Allow Partial Results option in Project Settings → Export Settings now applies consistently across export flows.

  • When disabled: the export fails immediately on critical gaps or errors, such as editable PPTX extraction failure, missing narration text for video export, or failure to generate usable narration audio.
  • When enabled: the system will continue whenever possible. For example, video export can fall back to silent clips for pages that do not have usable narration.

File: docs/features/import-export.mdx


title: "Import & Export Format"

Banana Slides uses Markdown files (.md / .markdown / .txt) to import and export outlines and page descriptions. The format is human-readable and easy to edit in any text editor.

Format Structure

markdown
# Project Title

> Generated at: 2025/1/1 12:00:00

---

## Page 1: Cover Page

> Chapter: Introduction

This cover introduces the presentation topic, company name, and date.

**Page Description:**
--- 页面文字 ---

### Annual Business Review

Company Name

April 2026

--- 页面文字结束 ---

Layout & Emphasis: large centered title, subtitle and date below; the title is the visual emphasis

---

## Page 2: Market Overview

> Chapter: Analysis

This slide summarizes industry growth, key market segments, and the main opportunity.

**Page Description:**
--- 页面文字 ---

### Market Overview

- Industry size continues to grow
- Enterprise demand is accelerating faster
- Several subsegments remain underserved

--- 页面文字结束 ---

Visuals & Assets: growth bar chart, key metric cards, market segmentation diagram

---

Field Reference

Field Syntax Required
Page header ## 第 N 页: Title or ## Page N: Title Yes
Chapter > 章节: Name or > Chapter: Name No
Outline summary One plain sentence after the page header No
Description **页面描述:** or **Page Description:**, with the slide body wrapped in --- 页面文字 --- / --- 页面文字结束 --- No

If the description ends with short extra-field lines such as Visuals & Assets: ... or Layout & Emphasis: ..., Banana Slides will preserve them on import (the older Visual Elements: ... and Layout: ... fields from existing projects are still supported).

Pages are separated by ---.

Export Options

You can export from both the Outline Editor and Detail Editor:

Source Content
Outline Editor Page titles and outline content
Detail Editor Description-only export, or full outline + descriptions

Import Behavior

  • After you paste or upload Markdown, the import dialog previews how many pages can be detected. Import stays disabled until at least one page is recognized.
  • Imported pages are appended in Markdown file order in one batch — they do not replace current pages.
  • The current recommended format is one concise outline sentence after the page title. Older **Outline Points:** / - point blocks are still accepted.
  • Both Chinese and English markers are supported: 第 N 页 / Page N, 章节 / Chapter, 大纲要点 / Outline Points, 页面描述 / Page Description.
  • HTML tags in imported content are automatically stripped.
  • Short trailing field lines in the description section, such as Layout & Emphasis: ..., are parsed as extra fields and preserved.
  • Accepts .md, .markdown, and .txt files. Non-text files such as PDF, Word, or images are rejected before reading, with a clear file-format message.

Minimal Example

A valid import file can be as simple as:

markdown
## Page 1: Introduction

This slide introduces the topic, agenda, and speaker.

## Page 2: Summary

This slide reviews the key conclusions and next steps.

Use External AI to Create Import Files

If you want to organize an outline in an external AI assistant first, or have it produce import-ready Markdown in a fixed structure, you can use the template below.

Copy the prompt into any AI assistant such as ChatGPT or Claude, replace the placeholders, and ask it to output Markdown only. You can then import that result into Banana Slides.

This is only a helper for creating import files with external AI, not the main Banana Slides workflow. In most cases, creating a project directly inside the app and using the built-in AI will be faster. Here, “page description” is not just a short visual note. In practice it is a combination of the page's actual Markdown content plus optional design fields. A good pattern is: write the slide's display content under `**Page Description:**` (it is rendered onto the slide verbatim), then optionally append short trailing fields such as `Visuals & Assets: ...`, `Layout & Emphasis: ...`, or `Speaker Notes: ...`. For outline-only import, remove the `**页面描述:**` requirement from the prompt. If you prefer English markers, you can replace `第 N 页 / 章节 / 大纲要点 / 页面描述` with `Page N / Chapter / Outline Points / Page Description`. Banana Slides' current built-in prompt is closer to this structure: after the page title, write one concise outline sentence instead of a separate `**Outline Points:**` block; inside `**Page Description:**`, `--- 页面文字 ---` / `--- 页面文字结束 ---` should now be treated as required structure, not optional decoration. The Markdown importer still supports the older `**Outline Points:**` / `- point` structure. For new content, prefer the concise summary sentence after the page title.

A slide that mirrors the current built-in prompt more closely should look like this:

markdown
## Page 3: Market Opportunity

> Chapter: Industry Analysis

This slide explains market growth, fragmented competition, and why enterprise demand is expanding.

**Page Description:**
--- 页面文字 ---

### Market Opportunity Is Expanding Fast

- The global market is projected to reach **$3.2B by 2028**
- Enterprise use cases are growing faster than consumer use cases
- The competitive landscape remains fragmented

| Dimension | Current State | Opportunity |
| --- | --- | --- |
| Market Size | High growth | Attractive |
| Competition | Moderate | Differentiable |
| Willingness to Pay | Clear | Fast validation |

--- 页面文字结束 ---

Visuals & Assets: growth curve, comparison stat cards, subsegment diagram
Layout & Emphasis: title on top, bullets on the left, stat cards on the right, table at the bottom; $3.2B by 2028 is the visual emphasis
text
Generate presentation content in the following Markdown format so it mirrors Banana Slides' current built-in prompt style.

Topic: [YOUR TOPIC]
Number of pages: [NUMBER, e.g. 8]
Language: [Chinese / English]
Style notes: [e.g. "professional and data-driven" or "playful and visual"]

Rules:
1. Each page starts with "## Page N: Title"
2. Group pages into chapters using "> Chapter: Chapter Name"
3. After the page title, write one concise sentence explaining what the slide should cover; do not generate a separate `**Outline Points:**` block
4. Under "**Page Description:**", write the actual Markdown content that should appear on the slide.
   It may include headings, bullets, short paragraphs, emphasis, or tables when appropriate.
5. Inside `**Page Description:**`, you must use this structure:
   --- 页面文字 ---
   [slide body in Markdown]
   --- 页面文字结束 ---
6. If needed, append short one-line fields at the end of the page description, for example:
   Visuals & Assets: ...
   Layout & Emphasis: ...
   Speaker Notes: ...
7. Separate pages with "---"
8. First page should be a cover, last page should be a closing/thank-you page
9. Do not output explanations, prefaces, conclusions, or code fences

Additional requirements:
- The main body under "**Page Description:**" should look like real slide content, not just abstract instructions such as "blue tech background, text on the left, image on the right"
- If a slide is best expressed as a list, comparison, timeline, or table, write it directly in Markdown
- Keep optional trailing fields short and concrete
- Omit optional fields when unnecessary

Output ONLY the Markdown, no extra explanation.

File: docs/features/materials.mdx


title: "Materials & Files"

Reference Files

Upload documents as source material — AI references the extracted content when generating outlines, descriptions, and images.

When parsed documents contain images, those images are automatically added to the project's material library once the reference file is associated with a project, so you can reuse them later from the material picker.

Supported Formats

Format Extracted Content
PDF Text + embedded images
DOCX / DOC Document content and structure
PPTX / PPT Slide content
XLSX / XLS / CSV Spreadsheet data
Markdown / TXT Plain text
PDF parsing uses [MinerU](https://mineru.net) for high-quality extraction. Configure a MinerU token for better results — see [Configuration](/configuration#mineru-pdf-parsing).

Upload Methods

  • Click the paperclip icon next to the input area to open a file picker
  • Drag and drop files into the input area
  • Paste (Ctrl+V) files or images from clipboard
  • Click Material Center to select from previously uploaded files

File size limit: 200MB. Files parse automatically after upload and show "Parsing" status until complete.

Where to Upload

Location Notes
Home page Upload before creating a project — applies to the whole project
Outline Editor Manage files in the left panel
Description Editor View and manage files in the top section
Slide Preview (single-page edit) Attach a reference image to one specific page

Pasting Images

Paste an image anywhere (Ctrl+V) in the home page, Outline Editor, or Description Cards:

  1. Copy an image (screenshot, copy from web, etc.)
  2. Press Ctrl+V in the input area
  3. The image uploads automatically — AI recognizes its content and inserts it as a Markdown image reference at the cursor position

When a page uses both an image template and materials embedded in its description, image models with multi-image input receive the template and all material images instead of only the first reference. GPT Image models accept up to 16 input images including the template; DALL-E 2 remains limited to one input image.

Style References

Upload an image as a visual style reference — AI will match its color palette, layout patterns, and design language.

Upload in the Select Style Template section on the home page, or in the Upload Images section of single-page editing.

Material Toolbox

Click Generate Material in the top navigation bar to open the unified Material Toolbox. It now covers more than prompt-to-image generation: you can also take an existing image, edit the whole frame, edit a selected region, or erase content from a selected region.

Generate

Use this mode to create a brand-new image from text:

  1. Enter a prompt such as Blue-purple gradient background with geometric shapes and tech-style lines
  2. Pick an aspect ratio
  3. Optionally add a primary reference image and extra references
  4. Click Run Tool

Full Image Edit

Use this mode when you already have an image and want to restyle or rewrite the whole frame:

  1. Choose a Source Image
  2. Enter an instruction such as Restyle the image with brushed silver metal while keeping the main composition
  3. Optionally add reference images
  4. Click Run Tool

Region Edit

Use this mode when only part of the image should change, such as a CTA, title block, object, or foreground detail:

  1. Switch to Region Edit
  2. Load a source image
  3. Click Start Selection and drag over the area to change
  4. Enter the edit instruction
  5. Choose how the result should be applied:
    • Overlay only the selected region: keep the unselected area as stable as possible and only patch the selected area back into the original image
    • Replace with the full generated image: still focus the edit on the selected area, but use the model's full-frame output as the final result
  6. Click Run Tool

Smart Erase

Use this mode to remove logos, watermarks, clutter, or other unwanted elements:

  1. Switch to Smart Erase
  2. Load a source image
  3. Select the region to remove
  4. Optionally add a short note for what should fill the erased area, such as clean light gray stone texture
  5. Click Run Tool

Continue Editing

After a run completes, click Use result as new source to send the latest output back into the toolbox for another pass. This works well for flows like:

  • erase first, then refine a local area
  • restyle the whole image, then polish one component
  • generate a material, then keep iterating on details

Every processed result is saved as a new material in the library. The original source image is not overwritten.

Material Center

Click Material Center in the top navigation bar to manage all materials:

  • Filter: By project, or view all / unassociated materials
  • Preview: Click the eye icon for fullscreen preview
  • Download: Select items and download — multiple files are packaged as ZIP
  • Delete: Individual or batch delete
  • Upload: Add new images directly from Material Center

File: docs/features/overview.mdx


title: "Features Overview"

The Workflow

text
Create Project → Edit Outline → Write Descriptions → Generate Images → Export

Every step supports AI assistance and manual fine-tuning.

Four Creation Paths

Path Best for
From an idea Just a topic — let AI generate everything
From an outline You have an existing structure
From descriptions Content is already clear, generate images directly
PPT Renovation Upload an old PPT, AI regenerates a fresh version

See Creating a Presentation.

AI-Assisted Editing

Every editing step has a top input bar — tell AI what to do in plain language:

  • Outline Editor: Add a competitive analysis section after page 3
  • Description Editor: Make all descriptions more detailed with specific text content
  • Slide Preview (single page): Change the background to dark blue, increase title font size

See Edit Outline, Write Descriptions, Generate & Refine Images.

Material Support

  • Upload reference files (PDF, DOCX, PPTX, spreadsheets, etc.) — AI extracts content to inform generation
  • Paste images — AI recognizes content and inserts them
  • Use the Material Generator to create custom backgrounds or illustrations with AI
  • Material Center manages all your materials for easy reuse

See Materials & Files.

Export

  • PPTX: Slides embedded as images, playable and reorderable in PowerPoint
  • Editable PPTX (Beta): Text extracted as native text boxes, editable in PowerPoint
  • PDF: Pixel-perfect output
  • Images: Each page as an individual file

Multiple aspect ratios supported, with selective page export. See Export Options.


File: docs/zh/features/creation.mdx


title: "创建演示文稿"

在首页选择创建方式,填写内容,点击「创建新项目」。

三种文本创建方式都需要输入至少一个非空白字符。前端会阻止只包含空格或换行的提交,API 也会执行相同校验,并自动去除输入首尾的多余空白。

从想法开始(最简单)

只需一句话描述主题,AI 自动完成大纲→描述→图片的全流程。

适合:没有现成材料,想快速生成一份 PPT

步骤:

  1. 选择「一句话生成」标签
  2. 输入主题,例如:生成一份关于碳中和的汇报 PPT,8 页
  3. 选择模板和画面比例(可选)
  4. 点击「创建新项目」

之后会进入大纲编辑器,可以检查和修改 AI 生成的大纲。

从大纲开始

已有结构思路,不想让 AI 凭空猜测:

适合:有现成大纲或目录,想让 AI 在你的框架内填充内容

步骤:

  1. 选择「从大纲生成」标签
  2. 粘贴大纲内容,支持标题 + 要点格式,也可以只写标题
  3. 点击「创建新项目」,AI 自动切分为结构化大纲

格式示例:

text
第一页:AI 的起源
- 1956 年达特茅斯会议
- 早期研究者的愿景

第二页:机器学习的发展
从规则驱动到数据驱动的转变

从描述开始

已经有详细的每页描述,想跳过大纲步骤直接生图:

适合:内容已经很明确,或从其他 AI 工具生成了完整描述

步骤:

  1. 选择「从描述生成」标签
  2. 粘贴每页的完整描述(包含布局、配色、内容等)
  3. 点击「创建新项目」,直接进入图片生成

格式示例:

text
第一页:封面
简洁封面,公司 Logo 居中,标题白色粗体,深蓝渐变背景。

第二页:市场概况
展示过去 5 年市场增长柱状图,关键数据用高亮卡片突出。

PPT 翻新

上传已有 PDF 或 PPTX,AI 解析内容并重新生成风格焕新的版本:

适合:老旧 PPT 需要视觉翻新,或想以已有 PPT 为基础重新创作

步骤:

  1. 选择「PPT 翻新」标签
  2. 上传 PDF 或 PPTX 文件
  3. 可选勾选「保留原始排版布局」,让 AI 更贴近原版结构
  4. 点击「创建新项目」
推荐先在本地将 PPTX 转为 PDF 再上传。直接上传 PPTX 需要服务端 LibreOffice 转换,可能因缺少字体导致排版偏差。

画面比例

创建项目前,在输入区域下方选择画面比例:

比例 适用场景
16:9 标准宽屏(默认)
4:3 传统幻灯片
21:9 超宽屏展示
1:1 正方形(社交媒体)
9:16 竖屏(手机展示)
部分图像生成模型不支持某些比例,若生成报错可尝试切换到 16:9。项目创建后也可在「项目设置」中修改,修改后需重新生成图片才生效。

选择模板和风格

创建前可以设定视觉风格,有两种方式:

方式一:选择模板

  • 从预设模板库中点选一个,或上传自定义模板图片

方式二:文字描述风格

  • 勾选「使用文字描述风格」
  • 在文本框中描述期望的视觉风格,例如:现代科技风,深色背景,蓝紫渐变色调
  • 可以点击预设风格(如「简约商务」「科技现代」等)快速填充专业风格描述
  • 也可以上传一张图片,AI 自动提取其视觉风格

保存为我的风格模板:

写好风格描述后,点击文本框右上角的「保存为模板」,输入名称并选择标识色即可保存。下次使用时,在「我的风格」区域直接点击即可填充,无需重复输入。鼠标悬停可预览描述内容,不再需要的模板可以悬停后点击右上角 × 删除。

上传参考文件

创建时可以附加参考文件,AI 会提取内容作为创作素材:

  • 支持格式:PDF、DOCX、DOC、PPTX、PPT、XLSX、XLS、CSV、TXT、MD
  • 上传方式:
    • 点击输入框左下角的回形针图标打开文件选择器
    • 直接把文件拖进输入框 —— 图片会作为素材插入文本,文档会上传为参考文件
    • 在输入框里粘贴(Ctrl+V),图片与文档分别走素材和参考文件路径
  • 文件大小:最大 200MB

文件上传后会自动解析,解析完成前无法创建项目。详见素材与文件。


File: docs/zh/features/editing.mdx


title: "编辑幻灯片"

自然语言编辑

直接用口头描述修改,无需菜单操作:

  • "把第三页改成案例分析"
  • "把这个图换成饼图"
  • "背景调暗一点"
  • "加一个要点列表"

大纲编辑

在大纲编辑器中输入指令调整结构:

  • "在引言后面加一节竞品分析"
  • "合并最后两页"
  • "把总结移到问答页前面"

也可以手动拖拽页面重新排序,或编辑章节归属。

页面属性面板

预览页右边缘常驻一个拉手,点开就是当前页的属性面板。所有字段都能就地修改并自动保存(停止输入约 1 秒后写回,面板顶部会显示「保存中 / 已保存」),不用来回开关弹窗:

字段 说明
标题 页面标题,同步显示在左侧缩略图列表
所属章节 页面归属的章节名,留空表示未分组
页面描述 生成图片的依据,和详细编辑器里是同一份内容,支持 Markdown、粘贴图片和从素材库插图
描述额外字段 视觉元素、视觉焦点、排版布局、演讲者备注等,字段列表跟随详细编辑器的「描述设置 → 额外字段」;标了「不影响图片生成」的字段不会进入生图提示词
旁白讲稿 折叠在面板最底部,导出讲解视频时朗读;留空则由导出流程自动生成

每页独立模板模式下还会出现「模板」区块,可以直接给这一页换模板图、写模板提示词,也能跳转到批量配置。面板底部还会展示该页的状态、页码、图片版本数和创建/更新时间。

拖动面板左边缘可调整宽度(300–640px),双击边缘恢复默认宽度,也可以聚焦边缘后用 ←/→ 微调、Home/End 直接到两端。宽度和展开状态会记住,下次打开预览页保持一致。窄屏上面板改为浮层显示,点击遮罩即可关闭。

描述改动只会更新文字,不会自动重画图片。想让改动生效,记得点「重新生成」。 页面的「要点」属于大纲阶段,只在大纲编辑器里出现;到了预览页,真正驱动出图的是页面描述。

就地编辑与区域选图

在预览页点击「编辑」,当前页下方会平滑展开一条指令栏,幻灯片原地不动、不再被弹窗遮住,让你边看大图边改(窄屏空间不足时仍改为弹窗):

  1. 在「输入修改指令」里描述要改什么(例如:把背景改成蓝色、增大标题字号)
  2. 可选:点图片左上角的「区域选图」,直接在大图上拖拽框选——框中的部分会裁剪下来作为参考图一起提交,帮 AI 聚焦到你要改的地方
  3. 可选:从素材库选择或上传更多参考图
  4. 点击「生成图片」,AI 结合页面描述、指令与参考图重绘该页
区域选图框出的部分是作为**参考图**提交的,用来告诉 AI 你关心哪一块,并不是只重画框内、框外像素级保留。想精确擦除或局部替换某个元素,可用顶部「素材生成」里的局部编辑与智能擦除工具。

描述详细程度

在详细编辑器的「批量生成描述」按钮旁,可选择描述的详细程度:

级别 说明
精简 简洁描述,生成速度更快,适合快速原型
默认 平衡详细程度与生成速度
详细 更丰富的描述,AI 有更多构图参考,适合精细打磨

历史版本

每次重新生成幻灯片图片时,旧版本会自动保留。在预览页点击「历史版本」可查看和切换到任意历史版本,不必担心误操作覆盖满意的效果。