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

Authentication
The Gamma API supports two authentication methods. Pick based on whose Gamma account your requests act as:
Best for
Scripts, internal tools, automation platforms (Zapier, Make, n8n)
Apps acting on behalf of your users, MCP servers, marketplace integrations
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.
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.
Endpoints
Building an AI integration? The MCP server lets AI tools create new gammas and read existing ones via OAuth with Dynamic Client Registration.
Next steps
Last updated
Was this helpful?