X-API-KEY header.
Things to know before you call:
- Two generation routes, and they are not interchangeable.
agent.generateruns Gamma 5 from a single brief and is the one to use for a new presentation, document or social post.generations.createis the Classic path: it is the only one that takes apagesarray for a multi-page gamma or site, and the only one that publishes withpublish: true. A Classic body carries eitherinputTextorpages, never both, and the plugin refuses a body with neither. - A generation is asynchronous. Both creates return a
generationIdat once, and a poll answerspendinguntil it iscompletedorfailed(which carries anerror). A completed Classic generation carriesgammaIdandgammaUrlat the top level; an agent generation nests them undergamma, next to the agent’sresult.summary. Spends credits. exportUrlis a credential. The download link works for anyone holding it, for about a week, and Gamma’s own docs say to treat it as a secret. The plugin never logs it;generations.getandexports.getreport only whether one arrived.pngexports are archives. A PNG export is a zip of one image per card, not a single file, andpptxandpdfmatch their own formats.- Archiving is not deleting.
gammas.archiveis idempotent and reversible from the Gamma app, so it is a write rather than a destructive call.gammas.deleteis permanent and needs a workspace admin role. - A 403 has several meanings. A web app URL slug sent where a file ID belongs, a workspace below Pro on the analytics routes, a key owner without the permission, or, on the agent routes, a workspace out of credits (
code: insufficient_credits, which the plugin reports asisQuotaError; Classic routes answer402for that). Thecodesays which;individual_analytics_requiredis the analytics case. - A 429 can be a job cap, not a rate. Gamma adds
code: workspace_concurrency_limit_exceededwhen a Free workspace already has too many pending jobs started with an API key, and sendsRetry-After. The plugin retries both, honouring the header. - Credits are reported per generation. A completed
generations.getcarriescredits.deductedandcredits.remaining, which is how you see what a run cost. - No webhooks. Gamma does not push; poll the generation until it is
completedorfailed.
- 12 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the Gamma API key before the first call: More: API Key
pnpm corsair setup --plugin=gamma --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
Search your gammasWhat’s next
API reference
Every
gamma.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.