用途
Gamma 技能用于通过 Gamma.app API 生成 AI 驱动的演示文稿、文档和社交媒体帖子。当用户需要创建演示文稿、路演幻灯片、文档或社交轮播图时,可以使用该技能。
主要能力
- 生成三种格式的内容:演示文稿(presentation)、文档(document)、社交媒体帖子(social)。
- 可指定卡片/幻灯片数量(默认 10)。
- 可提供额外的样式或语气指令。
- 可设置内容详细程度(简洁或详细,默认详细)。
- 可指定语气(如专业、随意、技术性)。
- 可指定目标受众(如投资者、开发者、普通大众)。
- 可设置图片来源(AI 生成、网络、无,默认 AI 生成)和图片风格(插画、照片、混合,默认插画)。
- 支持等待生成完成并直接返回 URL。
- 支持查询生成状态和列出最近生成(如支持)。
使用方式
环境配置
export GAMMA_API_KEY="sk-gamma-xxxxx"
快速命令
生成演示文稿:
{baseDir}/scripts/gamma.sh generate "Your content or topic here"
带选项生成:
{baseDir}/scripts/gamma.sh generate "Content" --format presentation --cards 12
检查生成状态:
{baseDir}/scripts/gamma.sh status
列出最近生成(如支持):
{baseDir}/scripts/gamma.sh list
脚本用法
生成命令:
{baseDir}/scripts/gamma.sh generate "<content>" [options]
选项:
--format:presentation|document|social(默认:presentation)--cards:卡片/幻灯片数量(默认:10)--instructions:用于样式/语气的额外指令--amount:concise|detailed(默认:detailed)--tone:例如 "professional"、"casual"、"technical"--audience:例如 "investors"、"developers"、"general"--image-source:aiGenerated|web|none(默认:aiGenerated)--image-style:illustration|photo|mixed(默认:illustration)--wait:等待完成并返回 URL
示例:
简单演示文稿:
{baseDir}/scripts/gamma.sh generate "The future of AI automation" --wait
带特定样式的路演幻灯片:
{baseDir}/scripts/gamma.sh generate "$(cat pitch.md)" \
--format presentation \
--cards 15 \
--instructions "Make it a professional pitch deck for investors" \
--tone "professional" \
--audience "investors" \
--wait
社交轮播图:
{baseDir}/scripts/gamma.sh generate "5 tips for productivity" \
--format social \
--cards 5 \
--wait
文档/报告:
{baseDir}/scripts/gamma.sh generate "Q4 2025 Performance Report" \
--format document \
--amount detailed \
--wait
API 参考
端点:
POST https://public-api.gamma.app/v1.0/generations
请求头:
X-API-KEY: <your-api-key>
Content-Type: application/json
请求体:
{
"inputText": "Your content (1-750,000 chars)",
"textMode": "generate",
"format": "presentation|document|social",
"numCards": 10,
"additionalInstructions": "Styling instructions",
"textOptions": {
"amount": "concise|detailed",
"tone": "professional",
"audience": "target audience"
},
"imageOptions": {
"source": "aiGenerated|web|none",
"model": "flux-kontext-pro",
"style": "illustration|photo"
},
"cardOptions": {
"dimensions": "fluid|16x9|4x3|1x1|4x5|9x16"
}
}
响应:
初始响应:
{"generationId": "abc123"}
轮询状态:
GET https://public-api.gamma.app/v1.0/generations/<generationId>
完成响应:
{
"generationId": "abc123",
"status": "completed",
"gammaUrl": "https://gamma.app/docs/xxxxx",
"credits": {"deducted": 150, "remaining": 7500}
}
格式选项
| 格式 | 尺寸 | 用途 |
|---|---|---|
| presentation | fluid, 16x9, 4x3 | 路演幻灯片、幻灯片演示 |
| document | fluid, pageless, letter, a4 | 报告、文档 |
| social | 1x1, 4x5, 9x16 | Instagram、LinkedIn 轮播图 |
适用场景
- 创建演示文稿、路演幻灯片、幻灯片演示。
- 生成报告、文档。
- 制作社交媒体轮播图(如 Instagram、LinkedIn)。
限制
- 生成通常需要 1-3 分钟。
- 每次生成会扣除积分(约 150-300 积分/套)。
- 输入文本支持 markdown 格式。
- 使用
--wait标志可阻塞直到完成并直接获取 URL。