Explore the API
How the Gamma API works, what it can do, and which endpoint to use.
The Gamma API generates polished presentations, documents, websites, and social posts from text. Everything runs asynchronously: you create a generation, poll for status, and retrieve the result.
For the exact request schema, field types, and response contract, see the individual endpoint reference pages.
How it works
Create a generation
POST /v1.0/generations with your content and parameters. You get back a generationId.
Poll for status
GET /v1.0/generations/{generationId} every 5 seconds until status is completed or failed.
Get your result
The completed response includes gammaUrl (view it in Gamma) and exportUrl (download as PDF, PPTX, or PNG).
Archive when done
POST /v1.0/gammas/{gammaId}/archive to remove the Gamma from the active workspace. No credits deducted.
See Poll for results for full implementation examples in Python, JavaScript, and cURL.
Quick reference
Use
POST /v1.0/generationswhen you want Gamma to create the layout from your prompt and parameters.Use
POST /v1.0/generations/from-templatewhen you want to adapt an existing Gamma — swap content, retarget the audience, transform the subject, replace images, or restructure cards.Both generation endpoints accept an optional
titlewhen you want to set the Gamma name explicitly.Poll
GET /v1.0/generations/{generationId}untilstatusiscompletedorfailed.Use
GET /v1.0/themesandGET /v1.0/foldersto look up IDs before generation.Use
POST /v1.0/gammas/{gammaId}/archiveto remove a Gamma from the active workspace. Pass the file ID from the poll response, not the web app URL slug.
Two ways to generate
Endpoint
POST /v1.0/generations
POST /v1.0/generations/from-template
When to use
Creating from scratch. Maximum flexibility — you control format, tone, audience, images, layout, and more.
Adapting an existing Gamma — swap content, retarget the audience, transform the subject, replace images, or restructure cards. Design a template once in the Gamma app and reuse it programmatically.
Required fields
inputText + textMode
prompt + gammaId
Key difference
AI determines the layout based on your parameters.
The template's structure is preserved by default; your prompt can also change content, audience, card count, or order.
Both endpoints support title, themeId, exportAs, sharingOptions, and folderIds. See the full parameter reference for each:
Key parameters at a glance
title
Explicit Gamma title
"Q3 Board Update"
format
Output type
presentation, document, webpage, social
textMode
How input text is interpreted
generate (topic → content), condense (summarize), preserve (keep as-is)
themeId
Brand theme (colors, fonts, logo)
Get IDs from GET /v1.0/themes
numCards
Number of slides/sections
1–75 depending on plan
exportAs
Auto-export on completion
pdf, pptx, png
imageOptions.source
Where images come from
aiGenerated, webFreeToUseCommercially, noImages
textOptions.tone
Writing style
Any string: "professional", "casual", "academic"
textOptions.audience
Who the content is for
Any string: "executives", "new hires", "students"
cardOptions.headerFooter
Logo, page numbers, text
6 positions per card — see Header and Footer Formatting
sharingOptions
Permissions on the generated gamma
Workspace, external link, and email access levels
Supporting endpoints
GET /v1.0/themes
List available themes (standard + custom workspace themes). Use the id as themeId.
GET /v1.0/folders
List workspace folders. Use folder id values in folderIds.
POST /v1.0/gammas/{gammaId}/archive
Archive a Gamma. Uses the gammaId returned by a completed generation.
Both list endpoints use cursor-based pagination: check hasMore, pass nextCursor as the after query param.
Authentication
All requests require an API key in the X-API-KEY header. Generate your key from Account Settings > API Keys.
API access requires a Pro, Ultra, Teams, or Business plan. See Access and Pricing for credit costs and plan details.
Not a developer? You can also use Gamma through connectors and integrations — no code required.
Related
Generate from text for a parameter-by-parameter walkthrough of
POST /v1.0/generationsGenerate from a template for the template-based remix workflow
Poll for results for complete polling implementations
Last updated
Was this helpful?