GET /generations/{id}
Poll this endpoint until status is completed or failed.
How polling works
Generation states
What you get back on completion
API key for authentication
The unique generation ID returned from the create endpoint
abc123xyzGeneration status retrieved successfully
Unique identifier for the generation job
abc123xyzCurrent status of the generation job
completedPossible values: File ID of the generated Gamma (when completed)
9xJZ8QmN2URL to the generated Gamma (when completed)
https://gamma.app/docs/abc123URL to download the exported file (when exportAs was specified).
The file format matches exportAs: pptx → .pptx, pdf → .pdf, png → a .zip archive containing one PNG per card (not a single PNG file).
Anyone with this URL can download the file until it expires (about one week) — access is not tied to your API key. Treat the link as a secret: don't log it, share it, or embed it in client-side code.
https://gamma.app/export/abc123.pdfInvalid request parameters
Invalid or missing API key
Generation not found
GET /v1.0/generations/{id} HTTP/1.1
Host: public-api.gamma.app
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"generationId": "abc123xyz",
"status": "completed",
"gammaId": "9xJZ8QmN2",
"gammaUrl": "https://gamma.app/docs/abc123",
"error": {
"message": "Failed to generate content",
"statusCode": 500
},
"exportUrl": "https://gamma.app/export/abc123.pdf",
"credits": {
"deducted": 10,
"remaining": 490
},
"pages": [
{
"gammaId": "doc_abc123",
"gammaUrl": "https://gamma.app/docs/page-abc123",
"status": "completed",
"error": {
"message": "Failed to generate content",
"statusCode": 500
},
"exportUrl": "text"
}
]
}Related
Last updated
Was this helpful?