slidespeak
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSlideSpeak 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
--no-wait选项2:使用--no-wait
立即返回
--no-waitIf you cannot wait for the command to complete, use :
--no-waitbash
node scripts/slidespeak.mjs generate --text "Topic" --no-waitReturns 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 is , use the to download.
task_statusSUCCESSrequest_id如果您无法等待命令完成,请使用:
--no-waitbash
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_statusSUCCESSrequest_idTimeout 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 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密钥。
SLIDESPEAK_API_KEYQuick Reference
快速参考
All commands use the helper script at . The script handles API authentication and waits for async tasks to complete automatically (no manual polling needed).
scripts/slidespeak.mjs所有命令都使用位于的辅助脚本。该脚本会处理API认证,并自动等待异步任务完成(无需手动轮询)。
scripts/slidespeak.mjsGenerate a Presentation from Text
从文本生成演示文稿
bash
node scripts/slidespeak.mjs generate --text "Your topic or content" --length 6Options:
- (required): Topic or content for the presentation
--text - : Number of slides (default: 10)
--length - : Template name or ID (default: "default")
--template - : Output language (default: "ORIGINAL")
--language - : casual, professional, funny, educational, sales_pitch
--tone - : concise, standard, text-heavy
--verbosity - : Disable stock image fetching
--no-images - : Exclude cover slide
--no-cover - : Exclude table of contents
--no-toc
bash
node scripts/slidespeak.mjs generate --text "Your topic or content" --length 6选项:
- (必填):演示文稿的主题或内容
--text - :幻灯片数量(默认值:10)
--length - :模板名称或ID(默认值:"default")
--template - :输出语言(默认值:"ORIGINAL")
--language - :casual(随意)、professional(专业)、funny(有趣)、educational(教育性)、sales_pitch(销售推介)
--tone - :concise(简洁)、standard(标准)、text-heavy(文本密集)
--verbosity - :禁用库存图片获取
--no-images - :排除封面幻灯片
--no-cover - :排除目录
--no-toc
Generate from an Uploaded Document
从上传的文档生成演示文稿
First upload the document, then generate:
bash
undefined先上传文档,然后生成:
bash
undefinedUpload 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
undefinedbash
undefinedDefault templates
默认模板
node scripts/slidespeak.mjs templates
node scripts/slidespeak.mjs templates
Branded templates (if configured)
品牌模板(如果已配置)
node scripts/slidespeak.mjs templates --branded
undefinednode scripts/slidespeak.mjs templates --branded
undefinedDownload a Presentation
下载演示文稿
After generation completes, use the to download:
request_idbash
node scripts/slidespeak.mjs download <request_id>Returns a JSON object with a short-lived download URL.
生成完成后,使用进行下载:
request_idbash
node scripts/slidespeak.mjs download <request_id>返回包含短期有效下载URL的JSON对象。
Edit an Existing Presentation
编辑现有演示文稿
Edit slides in an existing presentation:
bash
undefined编辑现有演示文稿中的幻灯片:
bash
undefinedInsert 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"
--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"
--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"
--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"
--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
--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
--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 mebash
node scripts/slidespeak.mjs meSlide-by-Slide Generation
逐幻灯片生成
For precise control over each slide, use the slide-by-slide endpoint. See for the full schema.
references/API.mdbash
node scripts/slidespeak.mjs generate-slides --config slides.jsonWhere contains:
slides.jsonjson
{
"slides": [
{"title": "Introduction", "layout": "title", "content": "Welcome message"},
{"title": "Key Points", "layout": "bullets", "item_amount": 4, "content": "Main discussion points"}
],
"template": "default"
}如需对每张幻灯片进行精确控制,请使用逐幻灯片端点。有关完整架构,请参阅。
references/API.mdbash
node scripts/slidespeak.mjs generate-slides --config slides.json其中包含:
slides.jsonjson
{
"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
undefinedSubscribe
订阅
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"
undefinednode scripts/slidespeak.mjs webhook-unsubscribe --url "https://your-webhook.com/endpoint"
undefinedError 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 educationalbash
node scripts/slidespeak.mjs generate --text "Introduction to Machine Learning" --length 8 --tone educationalCreate a presentation from a PDF report
从PDF报告创建演示文稿
bash
undefinedbash
undefinedUpload 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
undefinednode scripts/slidespeak.mjs generate --document "$DOC_ID" --length 12
undefinedEdit 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