GET /generations/{id}
Poll this endpoint until status is completed or failed.
Use this endpoint to poll an existing generation until status is completed or failed. This is where you receive gammaUrl, exportUrl, and credits.
How polling works
After starting a generation with POST /generations or POST /generations/from-template, poll this endpoint every 5 seconds using the returned generationId. Most generations complete within 1-3 minutes.
Generation states
pending
Still generating
Keep polling every 5 seconds
completed
Done
Stop polling — use the URLs and credit data below
failed
Something went wrong
Stop polling — check the error object
What you get back on completion
gammaUrl
Link to view or share the generated Gamma
exportUrl
Download URL for the exported file (if exportAs was set). Format matches exportAs: pdf and pptx download directly; png returns a .zip with one PNG per card. Anyone with the URL can download until it expires (about one week); access is not tied to your API key. Treat the link as a secret — do not log it, share it, or embed it in client-side code.
gammaId
The file ID (e.g. g_l0mf2jvf1fpmi1v). Use this for management endpoints such as GET /gammas/{gammaId}, POST /gammas/{gammaId}/archive, or DELETE /gammas/{gammaId}.
credits.deducted
Credits consumed by this generation
credits.remaining
Credits left in the workspace after this generation
Retrieves the current status of a generation job. Poll this endpoint until status is "completed" or "failed".
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
Poll for results for complete polling implementations
POST /generations if you need to start a new generation first
Last updated
Was this helpful?