Access the Gamma API with managed authentication. Read the account's credits, themes, folders, and gammas; create presentations, documents, and webpages from text; and export, rename, move, and delete gammas. Generations spend the user's Gamma credits. All access runs through the Maton gateway and the maton CLI.
Permissions
Suggested read access
In the Console, Read limits the connection to these 17 read-only endpoints, plus deny rules for any write endpoint a broader rule would otherwise match. Endpoints Maton has found to return credentials, start jobs, or spend credits are left out; a few reads that can change state or return a secret depending on their parameters stay in, and their descriptions say how. It is a suggestion: the saved rules are exactly the ones you see, and you can change them with Custom. See Access policy.
Reference
Account
Get Me
maton api '/gamma/v1.0/me'Response:
{
"userId": "usr_8Kq2mXf4",
"workspaceId": "wks_3Lp9nRt7",
"email": "alex@example.com",
"displayName": "Alex Kim",
"profileImageUrl": "https://cdn.gamma.app/avatars/usr_8Kq2mXf4.png",
"workspaceName": "Alex's Workspace",
"planTier": "free",
"maxGenerateCards": 10,
"availableImageModels": ["ideogram-v3-turbo", "flux-1-quick", "flux-kontext-fast", "gpt-image-1-mini-low", "gpt-image-2-mini", "flux-2-klein"],
"availableQualities": ["lite", "standard"],
"creditsRemaining": 397,
"imagePolicy": null
}Free to call. creditsRemaining is read live; maxGenerateCards, availableImageModels, and availableQualities say what the plan allows.
Workspace
List Themes
maton api '/gamma/v1.0/themes?limit=20'Response:
{
"data": [
{
"id": "thm_alien",
"name": "Alien",
"type": "standard",
"colorKeywords": ["Green", "neon green", "dark", "vibrant"],
"toneKeywords": ["playful", "bold", "futuristic", "modern"]
}
],
"hasMore": true,
"nextCursor": "eyJvZmZzZXQiOjIwfQ"
}Pass a theme's id as themeId when generating.
List Folders
maton api '/gamma/v1.0/folders?limit=20'Returns data (each folder's id and name), hasMore, and nextCursor. Pass a folder's id as folderId when generating or moving a gamma.
Generations
Create a Generation
maton api '/gamma/v1.0/generations' -X POST -H 'Content-Type: application/json' --input - <<'JSON'
{
"inputText": "Quarterly update: revenue grew 12%, two new hires, launch planned for March.",
"textMode": "generate",
"format": "presentation",
"numCards": 5,
"cardSplit": "auto",
"imageOptions": {"source": "noImages"},
"title": "Q1 Update"
}
JSONBody fields:
inputText(string, required): The source content, up to 400,000 characters.textMode(string):generate(expand the input),condense(summarize it), orpreserve(keep the text as written).format(string):presentation,document,social, orwebpage.numCards(number): Target number of cards, up to the plan'smaxGenerateCards.cardSplit(string):auto, orinputTextBreaksto split cards where the input has\n---\nbreaks.imageOptions(object):source(aiGenerated,noImages,pexels,giphy,webFreeToUse,placeholder, and others), plusmodelandstylefor AI images. AI images cost extra credits per image.title,additionalInstructions,themeId,folderId,textOptions,cardOptions(optional).exportAs(optional):pdf,png, orpptxto also produce a file.sharingOptions(optional):workspaceAccess,externalAccess, andemailOptions(see the risk callout).
Response:
{"generationId": "gen_7Rk2pQx9Lm"}Get a Generation
maton api '/gamma/v1.0/generations/{generation_id}'Response (completed):
{
"generationId": "gen_7Rk2pQx9Lm",
"status": "completed",
"gammaId": "gm_4Hd8sWq2Zt",
"gammaUrl": "https://gamma.app/docs/gm_4Hd8sWq2Zt",
"credits": {"deducted": 3, "remaining": 397}
}status is pending, completed, or failed (with error.message and error.statusCode). exportUrl appears when exportAs was set. Poll every few seconds; a one-card document without images took under a minute and cost 3 credits.
Create from a Template
maton api '/gamma/v1.0/generations/from-template' -X POST -H 'Content-Type: application/json' --input - <<'JSON'
{"gammaId": "{template_gamma_id}", "prompt": "Fill this in for Acme's March product launch.", "title": "Acme Launch"}
JSONgammaId is a one-page workspace gamma marked as a template; prompt (required) describes the changes. Optional themeId, folderId, exportAs, imageOptions (model, style), and sharingOptions. Returns generationId; poll v1.0/generations/{generation_id}.
Search Templates
maton api '/gamma/v1.0/templates/search?q=pitch'Response:
{
"workspaceTemplates": [],
"exploreTemplates": [
{"id": "tpl_pitchnight", "title": "Pitch Night", "url": "https://gamma.app/templates/pitch-night", "thumbnailUrl": "https://cdn.gamma.app/t/pitch-night.png", "previewUrl": "https://gamma.app/embed/pitch-night"}
]
}Agent
The agent builds or edits a gamma from a prompt, source URLs, and files, choosing the structure itself. It is priced by the work it does, following quality (lite, standard, max).
Create an Agent Generation
maton api '/gamma/v1.0/agent/generations' -X POST -H 'Content-Type: application/json' --input - <<'JSON'
{"prompt": "A 6-card sales deck for a bike-sharing startup.", "format": "presentation", "numCards": 6, "quality": "standard"}
JSONBody fields: prompt (required, up to 400,000 characters), format, numCards (1-100, capped by plan), additionalInstructions, title, themeId or templateId, quality, pace (standard or relaxed), sourceUrls (up to 10), files (up to 50, each {"uploadId", "filename"} from v1.0/uploads, optionally "purpose": "import" for one), folderId, sharingOptions, exportAs, disableConnectors.
Response:
{"generationId": "gen_Q2w8Er5Ty1", "status": "pending", "warnings": []}Get an Agent Generation
maton api '/gamma/v1.0/agent/generations/{generation_id}'While pending, the response carries progress (stages, done, total, percent). When completed, the gamma is in gamma (gammaId, gammaUrl, title), a summary in result.summary, plus credits and an optional exportUrl. When failed, error.reason (such as insufficient_credits or timeout) explains why.
Edit a Gamma
maton api '/gamma/v1.0/agent/gammas/{gamma_id}/edits' -X POST -H 'Content-Type: application/json' --input - <<'JSON'
{"prompt": "Shorten every card to three bullet points.", "quality": "lite"}
JSONOptional cardIds (limit the edit to those cards), files, sourceUrls, quality, pace, disableConnectors. Returns editId and gammaUrl; poll v1.0/agent/edits/{edit_id}, whose final status reports credits. Only one edit runs per gamma at a time (409 edit_in_progress).
Upload a File
v1.0/uploads takes the raw file bytes as application/octet-stream, with a mimeType query parameter and the filename in an x-harness-upload-name header, and returns uploadId and filename for files or referenceImages. Each upload attaches to one job only.
Images
Create an Image
maton api '/gamma/v1.0/images' -X POST -H 'Content-Type: application/json' --input - <<'JSON'
{"prompt": "A watercolor city skyline at dawn", "type": "illustration", "sizePreset": "slide"}
JSONtype is abstract, illustration, photo, or scene; sizePreset is banner, slide, social-portrait, social-square, or story. Optional referenceImages (up to 4, by url or upload) and themeId. Returns imageGenerationId; poll v1.0/images/{image_id} until completed, which returns the image URL and a savedMediaId. POST v1.0/images/media/{saved_media_id}/archive archives a saved image.
Gammas
List Gammas
maton api '/gamma/v1.0/gammas?limit=20&createdByMe=true'Query parameters: query (title substring, 3+ characters), limit (1-50), after (the previous nextCursor), type (all, regular, template), createdByMe.
Response:
{
"data": [
{
"id": "gm_4Hd8sWq2Zt",
"title": "Q1 Update",
"type": "regular",
"url": "https://gamma.app/docs/gm_4Hd8sWq2Zt",
"thumbnailUrl": "https://cdn.gamma.app/thumbs/gm_4Hd8sWq2Zt.png",
"themeId": null,
"folderId": null,
"createdTime": "2026-12-01T21:40:12.000Z",
"updatedTime": "2026-12-01T21:41:03.000Z"
}
],
"hasMore": false,
"nextCursor": null
}Archived gammas are left out; search with includeArchived to find them. Thumbnail URLs expire after about a week.
Search Gammas
maton api '/gamma/v1.0/gammas/search?q=quarterly'Get a Gamma and Its Comments
maton api '/gamma/v1.0/gammas/{gamma_id}'
maton api '/gamma/v1.0/gammas/{gamma_id}/comments'gamma_id is the file ID, or the ID in a gamma.app/docs/{id} URL.
Rename, Move, Duplicate, Archive
maton api '/gamma/v1.0/gammas/{gamma_id}/rename' -X POST -H 'Content-Type: application/json' --input - <<'JSON'
{"title": "Q1 Update (final)"}
JSONPOST .../folder moves the gamma to a folder, POST .../duplicate copies it, and POST .../archive and POST .../unarchive hide and restore it.
Export a Gamma
maton api '/gamma/v1.0/gammas/{gamma_id}/export' -X POST -H 'Content-Type: application/json' --input - <<'JSON'
{"exportAs": "pdf"}
JSONexportAs is pdf, png, or pptx. Returns exportId; poll v1.0/exports/{export_id} until completed for the download link.
Delete a Gamma
maton api '/gamma/v1.0/gammas/{gamma_id}' -X DELETEResponse:
{"gammaId": "gm_4Hd8sWq2Zt", "status": "deleted", "message": "Gamma deleted."}Analytics
maton api '/gamma/v1.0/gammas/{gamma_id}/analytics'
maton api '/gamma/v1.0/gammas/{gamma_id}/analytics/cards'
maton api '/gamma/v1.0/gammas/{gamma_id}/analytics/viewers'
maton api '/gamma/v1.0/gammas/{gamma_id}/analytics/viewers/{user_id}'The summary returns totalViews, uniqueViewers, uniqueEditors, cardCount, lastOpened, and dailyViews; scope is all with manage permission, otherwise self. The other endpoints break it down per card and per viewer. Analytics need the Pro plan or higher and at least edit permission on the gamma.
Notes
- Connection. The connection holds a Gamma API key, created at https://gamma.app/settings/api-keys (it starts with
sk-gamma-); the gateway sends it as theX-API-KEYheader. API keys are available on every Gamma plan, including Free. A key has full access to the user's workspace: Gamma offers no read-only keys, so for narrower access set an access policy on the connection. The connection's metadata names the user and workspace (user_id,email,name,workspace_id,workspace_name,plan), read fromv1.0/me. - Paths start with
v1.0/. Generation, image, edit, and export jobs run in the background: the create call returns an ID, and you poll its status endpoint untilstatusiscompletedorfailed. - Plans: Free allows up to 10 cards per gamma,
liteandstandardquality, and 2 agent jobs at once per workspace; paid plans raise the card limit (100 on Plus and above) and allow 10 agent jobs at once.maxquality and analytics need Pro or higher. - Credits: classic generations cost 1-3 credits per card plus image credits (about 2-15 per standard image, more for premium models); agent jobs are priced by the work done. Every finished job reports
credits.deductedandcredits.remaining. - Errors:
401means the key is missing, wrong, or deleted; a failed job witherror.reasoninsufficient_creditsmeans the workspace is out of credits;403means the plan or permission doesn't allow the feature;429workspace_concurrency_limit_exceeded(withRetry-After) means too many jobs are running; wait before retrying. Validation errors are400with amessagesuch asproperty query should not exist(the search endpoints takeq, notquery). - Pagination: lists return
hasMoreandnextCursor; pass the cursor asafter. - Deleting the API key in Gamma's settings breaks the connection; reauthorize it with a new key.
- OAuth isn't available through Maton yet; the connection uses an API key.