slidespeak

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

SlideSpeak Presentation Skill

SlideSpeak 演示文稿功能

This skill enables you to create and edit PowerPoint presentations using the SlideSpeak API.
此功能允许您使用SlideSpeak API创建和编辑PowerPoint演示文稿。

IMPORTANT: Timing Behavior

重要提示:计时行为

Presentation generation takes 30-60 seconds.
演示文稿生成需要30-60秒。

Option 1: Wait for completion (default)

选项1:等待完成(默认)

Run the command and wait. The script polls internally until complete:
bash
node scripts/slidespeak.mjs generate --text "Topic"
  • Blocks until the task finishes (typically 30-60 seconds)
  • Returns the complete result with download URL
运行命令并等待。脚本会在内部轮询直到任务完成:
bash
node scripts/slidespeak.mjs generate --text "Topic"
  • 会阻塞直到任务完成(通常需要30-60秒)
  • 返回包含下载URL的完整结果

Option 2: Return immediately with
--no-wait

选项2:使用
--no-wait
立即返回

If you cannot wait for the command to complete, use
--no-wait
:
bash
node scripts/slidespeak.mjs generate --text "Topic" --no-wait
Returns immediately with:
json
{
  "success": true,
  "data": {
    "task_id": "abc123...",
    "message": "Task started. Check status with: node scripts/slidespeak.mjs status abc123..."
  }
}
Then poll the status until complete:
bash
node scripts/slidespeak.mjs status <task_id>
When
task_status
is
SUCCESS
, use the
request_id
to download.
如果您无法等待命令完成,请使用
--no-wait
bash
node scripts/slidespeak.mjs generate --text "Topic" --no-wait
立即返回以下内容:
json
{
  "success": true,
  "data": {
    "task_id": "abc123...",
    "message": "Task started. Check status with: node scripts/slidespeak.mjs status abc123..."
  }
}
之后轮询状态直到完成:
bash
node scripts/slidespeak.mjs status <task_id>
task_status
SUCCESS
时,使用
request_id
进行下载。

Timeout behavior

超时行为

If the script times out while waiting, it returns the task_id so you can continue polling:
json
{
  "success": true,
  "data": {
    "complete": false,
    "task_id": "abc123...",
    "task_status": "STARTED",
    "message": "Task still processing. Check status with: node scripts/slidespeak.mjs status abc123..."
  }
}
如果脚本在等待时超时,它会返回task_id以便您可以继续轮询:
json
{
  "success": true,
  "data": {
    "complete": false,
    "task_id": "abc123...",
    "task_status": "STARTED",
    "message": "Task still processing. Check status with: node scripts/slidespeak.mjs status abc123..."
  }
}

Setup

设置

The
SLIDESPEAK_API_KEY
environment variable must be set. Get your API key from https://app.slidespeak.co/settings/developer
必须设置
SLIDESPEAK_API_KEY
环境变量。请从https://app.slidespeak.co/settings/developer获取您的API密钥。

Quick Reference

快速参考

All commands use the helper script at
scripts/slidespeak.mjs
. The script handles API authentication and waits for async tasks to complete automatically (no manual polling needed).
所有命令都使用位于
scripts/slidespeak.mjs
的辅助脚本。该脚本会处理API认证,并自动等待异步任务完成(无需手动轮询)。

Generate a Presentation from Text

从文本生成演示文稿

bash
node scripts/slidespeak.mjs generate --text "Your topic or content" --length 6
Options:
  • --text
    (required): Topic or content for the presentation
  • --length
    : Number of slides (default: 10)
  • --template
    : Template name or ID (default: "default")
  • --language
    : Output language (default: "ORIGINAL")
  • --tone
    : casual, professional, funny, educational, sales_pitch
  • --verbosity
    : concise, standard, text-heavy
  • --no-images
    : Disable stock image fetching
  • --no-cover
    : Exclude cover slide
  • --no-toc
    : Exclude table of contents
bash
node scripts/slidespeak.mjs generate --text "Your topic or content" --length 6
选项:
  • --text
    (必填):演示文稿的主题或内容
  • --length
    :幻灯片数量(默认值:10)
  • --template
    :模板名称或ID(默认值:"default")
  • --language
    :输出语言(默认值:"ORIGINAL")
  • --tone
    :casual(随意)、professional(专业)、funny(有趣)、educational(教育性)、sales_pitch(销售推介)
  • --verbosity
    :concise(简洁)、standard(标准)、text-heavy(文本密集)
  • --no-images
    :禁用库存图片获取
  • --no-cover
    :排除封面幻灯片
  • --no-toc
    :排除目录

Generate from an Uploaded Document

从上传的文档生成演示文稿

First upload the document, then generate:
bash
undefined
先上传文档,然后生成:
bash
undefined

Upload a document (PDF, DOCX, PPTX, etc.)

上传文档(PDF、DOCX、PPTX等)

node scripts/slidespeak.mjs upload /path/to/document.pdf
node scripts/slidespeak.mjs upload /path/to/document.pdf

Use the returned document_uuid to generate

使用返回的document_uuid生成演示文稿

node scripts/slidespeak.mjs generate --document <document_uuid> --length 10

Supported formats: `.pdf`, `.docx`, `.doc`, `.pptx`, `.ppt`, `.xlsx`, `.txt`, `.md`
node scripts/slidespeak.mjs generate --document <document_uuid> --length 10

支持的格式:`.pdf`, `.docx`, `.doc`, `.pptx`, `.ppt`, `.xlsx`, `.txt`, `.md`

List Available Templates

列出可用模板

bash
undefined
bash
undefined

Default templates

默认模板

node scripts/slidespeak.mjs templates
node scripts/slidespeak.mjs templates

Branded templates (if configured)

品牌模板(如果已配置)

node scripts/slidespeak.mjs templates --branded
undefined
node scripts/slidespeak.mjs templates --branded
undefined

Download a Presentation

下载演示文稿

After generation completes, use the
request_id
to download:
bash
node scripts/slidespeak.mjs download <request_id>
Returns a JSON object with a short-lived download URL.
生成完成后,使用
request_id
进行下载:
bash
node scripts/slidespeak.mjs download <request_id>
返回包含短期有效下载URL的JSON对象。

Edit an Existing Presentation

编辑现有演示文稿

Edit slides in an existing presentation:
bash
undefined
编辑现有演示文稿中的幻灯片:
bash
undefined

Insert a new slide at position 2

在位置2插入新幻灯片

node scripts/slidespeak.mjs edit-slide
--presentation-id <id>
--type INSERT
--position 2
--prompt "Content about market analysis"
node scripts/slidespeak.mjs edit-slide
--presentation-id <id>
--type INSERT
--position 2
--prompt "Content about market analysis"

Regenerate slide at position 3

重新生成位置3的幻灯片

node scripts/slidespeak.mjs edit-slide
--presentation-id <id>
--type REGENERATE
--position 3
--prompt "Updated content for this slide"
node scripts/slidespeak.mjs edit-slide
--presentation-id <id>
--type REGENERATE
--position 3
--prompt "Updated content for this slide"

Remove slide at position 4

删除位置4的幻灯片

node scripts/slidespeak.mjs edit-slide
--presentation-id <id>
--type REMOVE
--position 4

Edit types:
- `INSERT`: Add a new slide at the position
- `REGENERATE`: Replace existing slide content
- `REMOVE`: Delete the slide (no prompt needed)
node scripts/slidespeak.mjs edit-slide
--presentation-id <id>
--type REMOVE
--position 4

编辑类型:
- `INSERT`:在指定位置添加新幻灯片
- `REGENERATE`:替换现有幻灯片内容
- `REMOVE`:删除幻灯片(无需提示)

Check Task Status

检查任务状态

For debugging or manual polling:
bash
node scripts/slidespeak.mjs status <task_id>
用于调试或手动轮询:
bash
node scripts/slidespeak.mjs status <task_id>

Get Account Info

获取账户信息

bash
node scripts/slidespeak.mjs me
bash
node scripts/slidespeak.mjs me

Slide-by-Slide Generation

逐幻灯片生成

For precise control over each slide, use the slide-by-slide endpoint. See
references/API.md
for the full schema.
bash
node scripts/slidespeak.mjs generate-slides --config slides.json
Where
slides.json
contains:
json
{
  "slides": [
    {"title": "Introduction", "layout": "title", "content": "Welcome message"},
    {"title": "Key Points", "layout": "bullets", "item_amount": 4, "content": "Main discussion points"}
  ],
  "template": "default"
}
如需对每张幻灯片进行精确控制,请使用逐幻灯片端点。有关完整架构,请参阅
references/API.md
bash
node scripts/slidespeak.mjs generate-slides --config slides.json
其中
slides.json
包含:
json
{
  "slides": [
    {"title": "Introduction", "layout": "title", "content": "Welcome message"},
    {"title": "Key Points", "layout": "bullets", "item_amount": 4, "content": "Main discussion points"}
  ],
  "template": "default"
}

Webhooks

Webhook

Subscribe to receive notifications when tasks complete:
bash
undefined
订阅以在任务完成时接收通知:
bash
undefined

Subscribe

订阅

node scripts/slidespeak.mjs webhook-subscribe --url "https://your-webhook.com/endpoint"
node scripts/slidespeak.mjs webhook-subscribe --url "https://your-webhook.com/endpoint"

Unsubscribe

取消订阅

node scripts/slidespeak.mjs webhook-unsubscribe --url "https://your-webhook.com/endpoint"
undefined
node scripts/slidespeak.mjs webhook-unsubscribe --url "https://your-webhook.com/endpoint"
undefined

Error Handling

错误处理

The script outputs JSON with either:
  • Success:
    {"success": true, "data": {...}}
  • Error:
    {"success": false, "error": "message"}
脚本会输出以下两种JSON之一:
  • 成功:
    {"success": true, "data": {...}}
  • 错误:
    {"success": false, "error": "message"}

Common Workflows

常见工作流

Create a presentation about a topic

创建关于某个主题的演示文稿

bash
node scripts/slidespeak.mjs generate --text "Introduction to Machine Learning" --length 8 --tone educational
bash
node scripts/slidespeak.mjs generate --text "Introduction to Machine Learning" --length 8 --tone educational

Create a presentation from a PDF report

从PDF报告创建演示文稿

bash
undefined
bash
undefined

Upload the PDF

上传PDF

RESULT=$(node scripts/slidespeak.mjs upload report.pdf) DOC_ID=$(echo $RESULT | jq -r '.data.document_uuid')
RESULT=$(node scripts/slidespeak.mjs upload report.pdf) DOC_ID=$(echo $RESULT | jq -r '.data.document_uuid')

Generate presentation

生成演示文稿

node scripts/slidespeak.mjs generate --document "$DOC_ID" --length 12
undefined
node scripts/slidespeak.mjs generate --document "$DOC_ID" --length 12
undefined

Edit a presentation to add a new slide

编辑演示文稿以添加新幻灯片

bash
node scripts/slidespeak.mjs edit-slide \
  --presentation-id "abc123" \
  --type INSERT \
  --position 5 \
  --prompt "Add a slide about quarterly revenue growth with charts"
bash
node scripts/slidespeak.mjs edit-slide \
  --presentation-id "abc123" \
  --type INSERT \
  --position 5 \
  --prompt "Add a slide about quarterly revenue growth with charts"

Additional Resources

其他资源

For detailed API documentation including all parameters, layout types, and constraints, read
references/API.md
.
有关包含所有参数、布局类型和约束条件的详细API文档,请阅读
references/API.md