popai-powerpoint-pptx

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PopAI PPT Skill

PopAI PPT Skill

Create presentations programmatically via PopAI's API. The API has powerful built-in research and information gathering capabilities — it will automatically search, collect, and organize relevant content. Optionally upload files as reference material or templates. If a
.pptx
template is provided, the output will fully preserve the template's layout, styles, and design — 100% faithful reproduction based on your template. After initial generation, you can send follow-up modification instructions using the same channel ID.
通过 PopAI API 编程式创建演示文稿。该 API 内置强大的研究和信息收集能力,可以自动搜索、收集并整理相关内容。可选择上传文件作为参考素材或模板。如果提供了
.pptx
模板,输出结果会完全保留模板的布局、样式和设计,100% 忠实还原你的模板。首次生成后,你可以使用相同的 channel ID 发送后续修改指令。

Setup

配置步骤

  1. Ask user to sign up and obtain their Access Token at: https://www.popai.pro/popai-skill
  2. Once user provides the token, set it in environment:
    export POPAI_ACCESS_TOKEN=<token>
Tips: You can save the key in
TOOLS.md
for future reference.
  1. 请用户前往 https://www.popai.pro/popai-skill 注册并获取 Access Token
  2. 用户提供 token 后,将其设置到环境变量中:
    export POPAI_ACCESS_TOKEN=<token>
提示:你可以将密钥保存在
TOOLS.md
中供后续使用。

Scripts

脚本

  • generate_ppt.py
    - Generate PPT via PopAI API (upload files → create channel → SSE stream → get pptx); also supports multi-round modification via
    --channel-id
  • generate_ppt.py
    - 通过 PopAI API 生成 PPT(上传文件 → 创建频道 → SSE 流 → 获取 pptx);也支持通过
    --channel-id
    参数进行多轮修改

Usage Examples

使用示例

bash
undefined
bash
undefined

Generate PPT from topic only

Generate PPT from topic only

python3 generate_ppt.py --query "AI Development Trends Report"
python3 generate_ppt.py --query "AI Development Trends Report"

With reference files (max 5)

With reference files (max 5)

python3 generate_ppt.py --query "Tesla Earnings PPT" --file data.pdf chart.png
python3 generate_ppt.py --query "Tesla Earnings PPT" --file data.pdf chart.png

With a PPT template file (applied as layout template)

With a PPT template file (applied as layout template)

python3 generate_ppt.py --query "Tesla Annual Report" --tpl template.pptx
python3 generate_ppt.py --query "Tesla Annual Report" --tpl template.pptx

With both template and reference files

With both template and reference files

python3 generate_ppt.py --query "Tesla Annual Report" --tpl template.pptx --file data.pdf chart.png
python3 generate_ppt.py --query "Tesla Annual Report" --tpl template.pptx --file data.pdf chart.png

Multi-round modification: modify an existing PPT (template cannot be changed)

Multi-round modification: modify an existing PPT (template cannot be changed)

python3 generate_ppt.py --channel-id "CHANNEL_ID" --query "Add a competitive analysis slide and make the color scheme blue"
python3 generate_ppt.py --channel-id "CHANNEL_ID" --query "Add a competitive analysis slide and make the color scheme blue"

With URLs as reference material (included in query)

With URLs as reference material (included in query)

python3 generate_ppt.py --query "Create a PPT summarizing this article: https://example.com/report.html"
python3 generate_ppt.py --query "Create a PPT summarizing this article: https://example.com/report.html"

Multi-round modification with additional reference files

Multi-round modification with additional reference files

python3 generate_ppt.py --channel-id "CHANNEL_ID" --query "Update the financial data with this new report" --file new_data.pdf
undefined
python3 generate_ppt.py --channel-id "CHANNEL_ID" --query "Update the financial data with this new report" --file new_data.pdf
undefined

Agent Steps

Agent 执行步骤

Initial Generation

首次生成

  1. Get PPT topic from user
  2. If user provides reference material:
    • Local files: pass as
      --file
      (max 5) and/or
      --tpl
      (PPT template for layout)
    • URLs: include directly in the
      --query
      text — the API will fetch and process them automatically
  3. Run script (timeout: 1200000):
    bash
    python3 generate_ppt.py --query "TOPIC" [--file FILE1 FILE2 ...] [--tpl TEMPLATE.pptx]
    Tell user: "Generating your PPT, estimated 5 minutes..."
  4. While the script is running, monitor stdout JSON lines and report progress to user in real time (e.g. task status updates, search actions, tool results)
  5. When generation completes, present final results to user:
    • Show
      summary
      text (from
      NODE_END
      event) as the generation summary
    • Show
      pptx_url
      as the download link: "Download PPT: <pptx_url>"
    • Show
      web_url
      as the site link: "View/Edit online: <web_url>"
  6. If user requests the pptx file directly, download it from
    pptx_url
    and deliver the file to user
  7. Save the
    channel_id
    from
    web_url
    (last path segment of
    https://www.popai.pro/agentic-pptx/<channelId>
    ) for potential follow-up modifications
  1. 从用户处获取 PPT 主题
  2. 如果用户提供了参考素材:
    • 本地文件:作为
      --file
      参数传入(最多 5 个),和/或作为
      --tpl
      参数传入(用于布局的 PPT 模板)
    • URL 链接:直接包含在
      --query
      文本中,API 会自动抓取并处理
  3. 运行脚本(超时时间:1200000 毫秒):
    bash
    python3 generate_ppt.py --query "TOPIC" [--file FILE1 FILE2 ...] [--tpl TEMPLATE.pptx]
    告知用户:"Generating your PPT, estimated 5 minutes..."
  4. 脚本运行过程中,监听标准输出的 JSON 行,实时向用户同步进度(例如任务状态更新、搜索动作、工具返回结果等)
  5. 生成完成后,向用户展示最终结果:
    • 展示
      NODE_END
      事件中的
      summary
      文本作为生成摘要
    • 展示
      pptx_url
      作为下载链接:"Download PPT: <pptx_url>"
    • 展示
      web_url
      作为站点链接:"View/Edit online: <web_url>"
  6. 如果用户直接需要 pptx 文件,从
    pptx_url
    下载文件并交付给用户
  7. 保存
    web_url
    中的
    channel_id
    (是
    https://www.popai.pro/agentic-pptx/<channelId>
    的最后一段路径),用于后续可能的修改操作

Multi-Round Modification

多轮修改

Use when the user wants to revise or improve an already-generated PPT (e.g. "add a slide", "change the title", "use a darker theme").
Rules:
  • Required:
    --channel-id
    (from previous generation) +
    --query
    (modification instruction)
  • Optional:
    --file
    to supply new reference files for the revision
  • Not supported:
    --tpl
    is ignored in modify mode — the original template cannot be changed
  1. Confirm the
    channel_id
    from the previous generation (stored from
    web_url
    )
  2. Get modification instruction from user
  3. If user provides additional reference files, pass as
    --file
  4. Run script (timeout: 1200000):
    bash
    python3 generate_ppt.py --channel-id "CHANNEL_ID" --query "MODIFICATION_INSTRUCTION" [--file FILE1 ...]
    Tell user: "Applying your modifications, estimated 3-5 minutes..."
  5. Parse and present results the same way as initial generation (new
    pptx_url
    and
    web_url
    )
当用户需要修订或优化已生成的 PPT 时使用(例如 "add a slide"、"change the title"、"use a darker theme")。
规则:
  • 必填参数
    --channel-id
    (来自上一次生成) +
    --query
    (修改指令)
  • 可选参数
    --file
    用于为修订提供新的参考文件
  • 不支持:修改模式下会忽略
    --tpl
    参数,无法更换原始模板
  1. 确认上一次生成对应的
    channel_id
    (从
    web_url
    中存储的)
  2. 从用户处获取修改指令
  3. 如果用户提供了额外的参考文件,作为
    --file
    参数传入
  4. 运行脚本(超时时间:1200000 毫秒):
    bash
    python3 generate_ppt.py --channel-id "CHANNEL_ID" --query "MODIFICATION_INSTRUCTION" [--file FILE1 ...]
    告知用户:"Applying your modifications, estimated 3-5 minutes..."
  5. 按照首次生成的方式解析并展示结果(新的
    pptx_url
    web_url

Output

输出

Event types (stdout, one JSON per line):
json
{"type": "task", "id": "1", "content": "Search for Tesla latest earnings data", "status": "progressing"}
{"type": "search", "action": "Web Searching", "results": [{"title": "...", "url": "...", "snippet": "...", "date": "..."}]}
{"type": "tool_result", "event": "TOOL_CALLS-xxx", "action": "...", "result": "..."}
{"type": "summary", "text": "Tesla earnings PPT has been created..."}
{"type": "stream_end"}
Final result (
is_end: true
):
json
{
  "type": "pptx_ready",
  "is_end": true,
  "pptx_url": "https://popai-file-boe.s3-accelerate.amazonaws.com/.../xxx.pptx",
  "file_name": "xxx.pptx",
  "preview_images": ["https://...0.jpeg"],
  "preview_count": xx,
  "web_url": "https://www.popai.pro/agentic-pptx/<channelId>"
}
  • pptx_url
    : Download link for the .pptx file
  • web_url
    : PopAI site link for online viewing and editing
  • preview_images
    : Page-by-page screenshots of the generated PPT (one image per slide)
  • preview_count
    : Total number of preview images (i.e. number of slides)
  • summary
    : Final summary text from the
    NODE_END
    event, shown to the user as a generation recap
事件类型(标准输出,每行一个 JSON):
json
{"type": "task", "id": "1", "content": "Search for Tesla latest earnings data", "status": "progressing"}
{"type": "search", "action": "Web Searching", "results": [{"title": "...", "url": "...", "snippet": "...", "date": "..."}]}
{"type": "tool_result", "event": "TOOL_CALLS-xxx", "action": "...", "result": "..."}
{"type": "summary", "text": "Tesla earnings PPT has been created..."}
{"type": "stream_end"}
最终结果(
is_end: true
):
json
{
  "type": "pptx_ready",
  "is_end": true,
  "pptx_url": "https://popai-file-boe.s3-accelerate.amazonaws.com/.../xxx.pptx",
  "file_name": "xxx.pptx",
  "preview_images": ["https://...0.jpeg"],
  "preview_count": xx,
  "web_url": "https://www.popai.pro/agentic-pptx/<channelId>"
}
  • pptx_url
    :.pptx 文件的下载链接
  • web_url
    :用于在线查看和编辑的 PopAI 站点链接
  • preview_images
    :生成的 PPT 逐页截图(每张图片对应一页幻灯片)
  • preview_count
    :预览图片总数量(即幻灯片页数)
  • summary
    :来自
    NODE_END
    事件的最终摘要文本,作为生成回顾展示给用户

Support

支持

For any issues, contact customerservice@popai.pro
如有任何问题,请联系 customerservice@popai.pro

Technical Notes

技术说明

  • Streaming: SSE stream;
    TOOL_CALLS-pptx
    event contains final .pptx download URL;
    last:true
    marks stream end
  • File Upload: Presigned POST to S3 via
    getPresignedPost
    , supports any file type
  • Timeout: Generation typically takes ~5 minutes;
  • Channel ID: Extractable from
    web_url
    — last path segment of
    https://www.popai.pro/agentic-pptx/<channelId>
  • Multi-round: Calls
    send_generate
    directly with existing
    channel_id
    ;
    tpl_info
    is never passed (template is fixed after channel creation)
  • 流式传输:SSE 流;
    TOOL_CALLS-pptx
    事件包含最终的 .pptx 下载链接;
    last:true
    标记流结束
  • 文件上传:通过
    getPresignedPost
    预签名 POST 请求上传到 S3,支持任意文件类型
  • 超时:生成通常耗时约 5 分钟
  • Channel ID:可从
    web_url
    中提取,即
    https://www.popai.pro/agentic-pptx/<channelId>
    的最后一段路径
  • 多轮修改:直接使用现有
    channel_id
    调用
    send_generate
    接口;不会传入
    tpl_info
    (频道创建后模板即固定)