For the complete documentation index, see llms.txt. This page is also available as Markdown.

Gamma Developer Docs

Gamma API and MCP for AI agents and apps: generate branded presentations, documents, webpages, and social posts, then read, edit, and export them.

Give your AI agent or app the tools to create, edit, and export on-brand gammas, through the hosted MCP server or the REST API.

Connect your agentUse the REST API

Image

Three ways to build with Gamma:

  • Connect your AI agent. MCP clients that support OAuth with Dynamic Client Registration can use the hosted server at https://mcp.gamma.app/mcp on any plan. Popular clients already work; for a custom client, register its redirect URIs first. Guide: Connect your own agent.

  • Build a branded template workflow. A human approves a template; your code or agent generates on-brand variants from it (POST /agent/generations with templateId, or generate_from_template over MCP), then inspects, edits, and exports them. Guide: Generate from approved templates; what is preserved and what can change: Brand, template, and editing controls.

  • Call the REST API directly. Gamma 5 agent generation and editing, plus read, search, export, and analytics endpoints, with an API key (any plan) or OAuth.

Authentication

The Gamma API supports two authentication methods. Pick based on whose Gamma account your requests act as:

API key
OAuth 2.0

Best for

Scripts, internal tools, automation platforms (Zapier, Make, n8n)

Apps acting on behalf of your users, MCP servers, marketplace integrations

Setup

Copy a key from Settings > API Keys

Register a client, run an authorization flow

Header

X-API-KEY: sk-gamma-...

Authorization: Bearer <access_token>

Whose account

Yours

The user who authorized your app

Credential lifetime

Until revoked

Access token ~1 hour; refresh token up to 90 days (rotated)

Every request must include exactly one of the two headers, plus Content-Type: application/json. See Authenticate with OAuth for the full OAuth setup guide.

API keys are available on all plans, including Free; usage is limited by your credits and your plan's limits (see Access and pricing). Connectors do not require an API key.

Machine-readable docs are available at developers.gamma.app/llms.txt and developers.gamma.app/llms-full.txt. Every page is also available as markdown by appending .md to the URL.

Quickstart

1. Start a generation

Generation runs on the Gamma 5 agent. Describe what you want; the agent plans and builds the gamma.

To generate from an approved template instead, add "templateId": "<workspace template, gamma, or Explore template id>" and leave out themeId.

2. Poll for the result

Poll GET /v1.0/agent/generations/{generationId} every 5 seconds until status is completed or failed, then read gamma.gammaUrl from the completed response. While still pending, the response may include progress with done, total, and percent (0–99) once card building starts; only completed means the job is finished. Completed and failed responses also report credits.deducted (what this job charged) and credits.remaining (your balance when the status was served); either may be omitted if the lookup fails. See Poll for results for pacing, rate-limit headers, and how agent polling differs from Classic.

3. Use your Gamma

Your presentation is live at gamma.gammaUrl. If you specified exportAs and the export succeeded, the file is at exportUrl; an export_failed entry in warnings means the gamma was created without the file, and you can export it with POST /v1.0/gammas/{gammaId}/export. To edit your gamma, call POST /v1.0/agent/gammas/{gammaId}/edits with a natural-language instruction.

Getting a 401? Gamma uses X-API-KEY as a custom header — not Authorization: Bearer. See Error codes for other common issues.

Endpoints

Endpoint
Method
Description

POST

Gamma 5: generate from a prompt, optionally from a template (templateId)

GET

Poll agent generation status

POST

Gamma 5: edit your gamma

GET

Poll agent edit status

POST

Classic: generate from text

POST

Classic: generate from template

GET

Poll Classic generation status

POST

Generate a standalone image

GET

Poll image generation status

POST

Archive a media library item

GET

List workspace themes

GET

List workspace folders

GET

Search workspace gammas

GET

Search workspace and explore templates

GET

Get gamma metadata

GET

List comment threads

POST

Archive a Gamma

POST

Export an existing Gamma

GET

Poll export status

DELETE

Delete a Gamma

GET

Doc-level engagement metrics

GET

Per-card engagement stats

GET

Per-viewer engagement (paginated)

GET

Single-viewer per-card engagement

Next steps

Last updated

Was this helpful?