网淘吧来吧,欢迎您!

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、9x16Instagram、LinkedIn 轮播图

注意事项

  • 生成通常需要 1-3 分钟
  • 每次生成会扣除积分(每套约 150-300 积分)
  • 输入文本可采用 Markdown 格式
  • 使用--wait标志可阻塞直至完成并直接获取 URL
免责申明
部分文章来自各大搜索引擎,如有侵权,请与我联系删除。
打赏
文章底部电脑广告
手机广告位-内容正文底部

相关文章

您是本站第326264名访客 今日有221篇新文章/评论