Gamma技能使用说明
2026-03-29
新闻来源:网淘吧
围观:20
电脑广告
手机广告
Gamma.app API
使用AI生成精美的演示文稿、文档和社交媒体帖子。
设置
export GAMMA_API_KEY="sk-gamma-xxxxx"
快速命令
# Generate a presentation
{baseDir}/scripts/gamma.sh generate "Your content or topic here"
# Generate with options
{baseDir}/scripts/gamma.sh generate "Content" --format presentation --cards 12
# Check generation status
{baseDir}/scripts/gamma.sh status <generationId>
# List recent generations (if supported)
{baseDir}/scripts/gamma.sh list
脚本使用
生成
{baseDir}/scripts/gamma.sh generate "<content>" [options]
Options:
--format presentation|document|social (default: presentation)
--cards Number of cards/slides (default: 10)
--instructions Additional instructions for styling/tone
--amount concise|detailed (default: detailed)
--tone e.g., "professional", "casual", "technical"
--audience e.g., "investors", "developers", "general"
--image-source aiGenerated|web|none (default: aiGenerated)
--image-style illustration|photo|mixed (default: illustration)
--wait Wait for completion and return URL
示例
# Simple presentation
{baseDir}/scripts/gamma.sh generate "The future of AI automation" --wait
# Pitch deck with specific styling
{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
# Social carousel
{baseDir}/scripts/gamma.sh generate "5 tips for productivity" \
--format social \
--cards 5 \
--wait
# Document/report
{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}
}
格式选项
| 格式 | 尺寸 | 用例 |
|---|---|---|
| 演示文稿 | 流动式,16x9,4x3 | 商业计划书,幻灯片演示 |
| 文档 | 流动式,无页面式,信纸尺寸,A4尺寸 | 报告,文档 |
| 社交 | 1x1、4x5、9x16 | Instagram、LinkedIn 轮播图 |
注意事项
- 生成通常需要 1-3 分钟
- 每次生成会扣除积分(每套约 150-300 积分)
- 输入文本可采用 Markdown 格式
- 使用
--wait标志可阻塞直至完成并直接获取 URL
文章底部电脑广告
手机广告位-内容正文底部


微信扫一扫,打赏作者吧~