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

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

Status
Meaning
What to do

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

Field
Description

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

Get generation status

get

Retrieves the current status of a generation job. Poll this endpoint until status is "completed" or "failed".

Authorizations
X-API-KEYstringRequired

API key for authentication

Path parameters
idstringRequired

The unique generation ID returned from the create endpoint

Example: abc123xyz
Responses
200

Generation status retrieved successfully

application/json
generationIdstringRequired

Unique identifier for the generation job

Example: abc123xyz
statusstring · enumRequired

Current status of the generation job

Example: completedPossible values:
gammaIdstringOptional

File ID of the generated Gamma (when completed)

Example: 9xJZ8QmN2
gammaUrlstringOptional

URL to the generated Gamma (when completed)

Example: https://gamma.app/docs/abc123
exportUrlstringOptional

URL 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.

Example: https://gamma.app/export/abc123.pdf
get/v1.0/generations/{id}
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"
    }
  ]
}

For usage patterns, see Poll for results.

Last updated

Was this helpful?