Gamma Generate API
What this skill really does
Gamma's Generate API (v1.0, GA since Nov 2025) creates a Gamma (presentation /
document / social / webpage) from text — a one-line prompt up to ~400k characters of
content — and can export it to PDF, PPTX or PNG. It is a generation-only API:
you send input text, poll for completion, and get a shareable gammaUrl plus an
optional exportUrl.
It is asynchronous and one-shot per generation. There is no slide-by-slide edit
API, no "outline" endpoint, no templates endpoint. (The previous version of this skill
documented api.gamma.app/v1/generate, /v1/presentations, update_slide,
list_templates — none of those exist. They were removed.)
Helper: scripts/gamma_client.py (correct endpoints, verified against the live API).
Status / honesty notes (verified 2026-07-22)
- Base URL, path and header below were probed live and are correct (a bad key returns
HTTP 401
Invalid API key, i.e. the request reaches the real endpoint).
- ⚠️ The
GAMMA_API_KEY stored in ~/.claude/.credentials.master.env currently returns
401 Invalid API key — it is expired/revoked or on the wrong plan. GAMMA_API_KEY_2
is a broken placeholder (os.getenv(...)), ignore it.
- Before anything works: regenerate a key at gamma.app → Settings → API keys
(needs a paid plan: Pro / Ultra / Teams / Business) and replace
GAMMA_API_KEY.
- Fields marked "(unverified)" below are from Gamma's docs but were not exercised with a
live generation here. Treat exact allowed-value lists as best-effort, not gospel.
API surface
| Property |
Value |
| Base URL |
https://public-api.gamma.app |
| Create |
POST /v1.0/generations |
| Poll |
GET /v1.0/generations/{generationId} |
| Auth header |
X-API-KEY: sk-gamma-... (custom header, not Authorization: Bearer) |
| Plan required |
Pro / Ultra / Teams / Business |
| Deprecated |
v0.2 retired 2026-01-16 — use v1.0 |
Request body (POST /v1.0/generations)
| Field |
Type |
Values / limit |
inputText |
string (required) |
prompt / outline / full content, ≤ 400,000 chars |
format |
enum (required) |
presentation, document, social, webpage |
textMode |
enum |
generate (expand), condense, preserve |
numCards |
int |
1–75 (plan-dependent) |
exportAs |
enum |
pdf, pptx, png (png → zip of one PNG per card) |
themeId |
string |
a theme id (from your workspace) — (unverified) |
title |
string |
Gamma name, ≤ 500 chars |
additionalInstructions |
string |
free-text steering — (unverified) |
textOptions.tone |
string |
e.g. "professional", ≤ 500 chars |
textOptions.audience |
string |
e.g. "executives", ≤ 500 chars |
imageOptions.source |
enum |
aiGenerated, webFreeToUseCommercially, webFreeToUse, noImages, … |
imageOptions.model |
enum |
список моделей — на стороне Gamma, а не OpenAI: не подставляй сюда id из config/models.md вслепую. dall-e-3 из прежнего примера у OpenAI снят 12.05.2026, живёт ли он ещё внутри Gamma — не проверено |
folderIds |
array |
≤ 10 folder ids — (unverified) |
Response: { "generationId": "..." }.
Poll response (GET /v1.0/generations/{generationId})
status: pending → completed | failed
- on
completed: gammaUrl, gammaId, exportUrl (present only if exportAs was set),
credits.deducted, credits.remaining
- rate-limit headers:
x-ratelimit-remaining, x-ratelimit-remaining-burst,
x-ratelimit-remaining-daily. Poll every ~5 s.
- export URLs expire in ~1 week and are public-with-link.
Procedure
- Ensure a valid
GAMMA_API_KEY (see status notes). Quick auth check:
curl -s -o /dev/null -w "%{http_code}\n" -H "X-API-KEY: $GAMMA_API_KEY" \ https://public-api.gamma.app/v1.0/generations/x — expect 404 (key OK) vs 401 (bad key).
- Build
inputText. For tighter control, pass a structured outline and use
textMode: preserve or condense instead of generate.
POST /v1.0/generations; keep the generationId.
- Poll
GET /v1.0/generations/{generationId} every ~5 s until completed/failed.
- Use
gammaUrl (view/share) and exportUrl (download, if exportAs set).
Output
gammaUrl — editable/shareable Gamma
exportUrl — PDF/PPTX/PNG download (only when exportAs requested)
gammaId, credits deducted/remaining
Usage — helper script
# generate + wait for completion + export to pptx
python ~/.claude/skills/gamma/scripts/gamma_client.py generate \
"AI in Healthcare: trends, applications, and outlook" \
--format presentation --num-cards 10 --export pptx \
--tone professional --audience "hospital executives" --wait
# poll an existing generation
python ~/.claude/skills/gamma/scripts/gamma_client.py poll <generationId> --wait
Usage — raw curl
KEY="$GAMMA_API_KEY"
GEN=$(curl -s -X POST https://public-api.gamma.app/v1.0/generations \
-H "X-API-KEY: $KEY" -H "Content-Type: application/json" \
-d '{"inputText":"Quarterly sales report Q4: metrics, wins, 2025 outlook",
"format":"presentation","textMode":"generate","numCards":10,"exportAs":"pptx"}' \
| python -c "import sys,json;print(json.load(sys.stdin)['generationId'])")
# poll
curl -s https://public-api.gamma.app/v1.0/generations/$GEN -H "X-API-KEY: $KEY"
Credits (rough, from docs — unverified against a live run)
- text: ~1–3 credits per card (model-dependent)
- images: ~2–15 (standard) up to 30–125 (ultra) credits each
- example: 10-card deck + 5 images ≈ 20–60 credits
Checklist before shipping a Gamma job
Not this skill
- Local slide building / templated decks without Gamma →
manus-slides, pptx, slides
- KP / Company decks (HTML→PNG→PPTX) → тот же стек
manus-slides + pptx; заточенного под КП навыка в паке нет
- Editing an existing
.pptx → pptx
References
1---2name: gamma3description: Генерация презентаций, доков и страниц через Gamma Generate API + экспорт в PDF/PPTX/PNG. Триггеры: «презентация в Gamma», «gamma api».4---56# Gamma Generate API78## What this skill really does910Gamma's **Generate API** (v1.0, GA since Nov 2025) creates a Gamma (presentation /11document / social / webpage) from text — a one-line prompt up to ~400k characters of12content — and can export it to PDF, PPTX or PNG. It is a **generation-only** API:13you send input text, poll for completion, and get a shareable `gammaUrl` plus an14optional `exportUrl`.1516It is **asynchronous** and one-shot per generation. There is **no** slide-by-slide edit17API, no "outline" endpoint, no templates endpoint. (The previous version of this skill18documented `api.gamma.app/v1/generate`, `/v1/presentations`, `update_slide`,19`list_templates` — none of those exist. They were removed.)2021Helper: `scripts/gamma_client.py` (correct endpoints, verified against the live API).2223## Status / honesty notes (verified 2026-07-22)2425- Base URL, path and header below were probed live and are correct (a bad key returns26 HTTP 401 `Invalid API key`, i.e. the request reaches the real endpoint).27- ⚠️ The `GAMMA_API_KEY` stored in `~/.claude/.credentials.master.env` currently returns28 **401 Invalid API key** — it is expired/revoked or on the wrong plan. `GAMMA_API_KEY_2`29 is a broken placeholder (`os.getenv(...)`), ignore it.30- Before anything works: regenerate a key at **gamma.app → Settings → API keys**31 (needs a paid plan: Pro / Ultra / Teams / Business) and replace `GAMMA_API_KEY`.32- Fields marked "(unverified)" below are from Gamma's docs but were not exercised with a33 live generation here. Treat exact allowed-value lists as best-effort, not gospel.3435## API surface3637| Property | Value |38|----------|-------|39| Base URL | `https://public-api.gamma.app` |40| Create | `POST /v1.0/generations` |41| Poll | `GET /v1.0/generations/{generationId}` |42| Auth header | `X-API-KEY: sk-gamma-...` (custom header, **not** `Authorization: Bearer`) |43| Plan required | Pro / Ultra / Teams / Business |44| Deprecated | `v0.2` retired 2026-01-16 — use `v1.0` |4546### Request body (`POST /v1.0/generations`)4748| Field | Type | Values / limit |49|-------|------|----------------|50| `inputText` | string (required) | prompt / outline / full content, ≤ 400,000 chars |51| `format` | enum (required) | `presentation`, `document`, `social`, `webpage` |52| `textMode` | enum | `generate` (expand), `condense`, `preserve` |53| `numCards` | int | 1–75 (plan-dependent) |54| `exportAs` | enum | `pdf`, `pptx`, `png` (png → zip of one PNG per card) |55| `themeId` | string | a theme id (from your workspace) — (unverified) |56| `title` | string | Gamma name, ≤ 500 chars |57| `additionalInstructions` | string | free-text steering — (unverified) |58| `textOptions.tone` | string | e.g. "professional", ≤ 500 chars |59| `textOptions.audience` | string | e.g. "executives", ≤ 500 chars |60| `imageOptions.source` | enum | `aiGenerated`, `webFreeToUseCommercially`, `webFreeToUse`, `noImages`, … |61| `imageOptions.model` | enum | список моделей — на стороне Gamma, а не OpenAI: не подставляй сюда id из `config/models.md` вслепую. `dall-e-3` из прежнего примера у OpenAI снят 12.05.2026, живёт ли он ещё внутри Gamma — не проверено |62| `folderIds` | array | ≤ 10 folder ids — (unverified) |6364Response: `{ "generationId": "..." }`.6566### Poll response (`GET /v1.0/generations/{generationId}`)6768- `status`: `pending` → `completed` | `failed`69- on `completed`: `gammaUrl`, `gammaId`, `exportUrl` (present only if `exportAs` was set),70 `credits.deducted`, `credits.remaining`71- rate-limit headers: `x-ratelimit-remaining`, `x-ratelimit-remaining-burst`,72 `x-ratelimit-remaining-daily`. Poll every ~5 s.73- export URLs expire in ~1 week and are public-with-link.7475## Procedure76771. Ensure a valid `GAMMA_API_KEY` (see status notes). Quick auth check:78 `curl -s -o /dev/null -w "%{http_code}\n" -H "X-API-KEY: $GAMMA_API_KEY" \79 https://public-api.gamma.app/v1.0/generations/x` — expect `404` (key OK) vs `401` (bad key).802. Build `inputText`. For tighter control, pass a structured outline and use81 `textMode: preserve` or `condense` instead of `generate`.823. `POST /v1.0/generations`; keep the `generationId`.834. Poll `GET /v1.0/generations/{generationId}` every ~5 s until `completed`/`failed`.845. Use `gammaUrl` (view/share) and `exportUrl` (download, if `exportAs` set).8586## Output8788- `gammaUrl` — editable/shareable Gamma89- `exportUrl` — PDF/PPTX/PNG download (only when `exportAs` requested)90- `gammaId`, credits deducted/remaining9192## Usage — helper script9394```bash95# generate + wait for completion + export to pptx96python ~/.claude/skills/gamma/scripts/gamma_client.py generate \97 "AI in Healthcare: trends, applications, and outlook" \98 --format presentation --num-cards 10 --export pptx \99 --tone professional --audience "hospital executives" --wait100101# poll an existing generation102python ~/.claude/skills/gamma/scripts/gamma_client.py poll <generationId> --wait103```104105## Usage — raw curl106107```bash108KEY="$GAMMA_API_KEY"109GEN=$(curl -s -X POST https://public-api.gamma.app/v1.0/generations \110 -H "X-API-KEY: $KEY" -H "Content-Type: application/json" \111 -d '{"inputText":"Quarterly sales report Q4: metrics, wins, 2025 outlook",112 "format":"presentation","textMode":"generate","numCards":10,"exportAs":"pptx"}' \113 | python -c "import sys,json;print(json.load(sys.stdin)['generationId'])")114115# poll116curl -s https://public-api.gamma.app/v1.0/generations/$GEN -H "X-API-KEY: $KEY"117```118119## Credits (rough, from docs — unverified against a live run)120121- text: ~1–3 credits per card (model-dependent)122- images: ~2–15 (standard) up to 30–125 (ultra) credits each123- example: 10-card deck + 5 images ≈ 20–60 credits124125## Checklist before shipping a Gamma job126127- [ ] `GAMMA_API_KEY` valid (auth probe returns 404, not 401)128- [ ] `format` is one of presentation/document/social/webpage129- [ ] `inputText` ≤ 400k chars130- [ ] `numCards` within plan limit (1–75)131- [ ] set `exportAs` only if you need a downloadable file132- [ ] poll to `completed` before using `exportUrl` (async!)133- [ ] grab `exportUrl` promptly — it expires in ~1 week134135## Not this skill136137- Local slide building / templated decks without Gamma → `manus-slides`, `pptx`, `slides`138- KP / Company decks (HTML→PNG→PPTX) → тот же стек `manus-slides` + `pptx`; заточенного под КП навыка в паке нет139- Editing an existing `.pptx` → `pptx`140141## References142143- Developer docs: <https://developers.gamma.app>144- Endpoint spec: <https://github.com/gamma-app/gamma-docs>