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

Gamma Developer Docs

Build with the Gamma API — generate presentations, documents, websites, and social posts programmatically.

One API call. Polished presentations, documents, websites, and social posts — branded, exported, and shared.

Get your API keyAPI overview

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 key access requires a Pro, Ultra, Teams, or Business plan. Some connectors work on all plans and 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

curl -X POST https://public-api.gamma.app/v1.0/generations \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: $GAMMA_API_KEY" \
  -d '{
    "inputText": "Q3 product launch strategy",
    "textMode": "generate",
    "format": "presentation",
    "numCards": 10,
    "exportAs": "pdf"
  }'
import requests, os

response = requests.post(
    "https://public-api.gamma.app/v1.0/generations",
    headers={
        "X-API-KEY": os.environ["GAMMA_API_KEY"],
        "Content-Type": "application/json",
    },
    json={
        "inputText": "Q3 product launch strategy",
        "textMode": "generate",
        "format": "presentation",
        "numCards": 10,
        "exportAs": "pdf",
    },
)
generation_id = response.json()["generationId"]

2. Poll for the result

Poll GET /v1.0/generations/{generationId} every 5 seconds until status is completed or failed. Full polling examples in Poll for results.

3. Use your Gamma

Your presentation is live at gammaUrl. If you specified exportAs, the file is ready at exportUrl.

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

/generations

POST

Generate from text

POST

Generate from template

/generations/{id}

GET

Poll generation status

/images

POST

Generate a standalone image

/images/{id}

GET

Poll image generation status

POST

Archive a media library item

/themes

GET

List workspace themes

/folders

GET

List workspace folders

/gammas/{gammaId}

GET

Get gamma metadata

GET

List comment threads

/gammas/{gammaId}/archive

POST

Archive a Gamma

/gammas/{gammaId}/export

POST

Export an existing Gamma

/exports/{id}

GET

Poll export status

/gammas/{gammaId}

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?