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

POST /generations/from-template

Adapt, remix, or transform an existing Gamma. The template's structure is preserved by default and changes only when your prompt asks.

Start an asynchronous generation by adapting an existing Gamma — swap content, retarget for a new audience, transform the subject, replace images, or restructure cards. The template's structure is preserved by default; it only changes when your prompt explicitly asks.

When to use this endpoint

Use this instead of POST /generations when you have an existing Gamma whose layout, card count, or visual structure you want to keep. Provide the template's file ID as gammaId and describe what should change in prompt. Gamma preserves the template's structure by default — it only restructures cards when your prompt explicitly asks.

Key differences from /generations

/generations
/generations/from-template

Input

inputText (raw content)

prompt (change instructions) + gammaId (template file ID)

Structure

Gamma decides layout

Preserves template layout

Use case

Create from scratch

Remix, retarget, or translate existing content

What you get back

The response returns a generationId immediately. Poll GET /generations/{id} every 5 seconds until status is completed or failed. On completion, you receive gammaUrl, exportUrl (if exportAs was set), gammaId, and credits usage.

Create generation from template

post

Creates an asynchronous generation job from a template Gamma with variable substitution.

Authorizations
X-API-KEYstringRequired

API key for authentication

Body
exportAsstring · enumOptional

Export format for automatic export after generation

Example: pdfPossible values:
promptstring · min: 1 · max: 400000Required

Text prompt describing what to generate

Example: Q3 financial summary for investors
titlestring · min: 1 · max: 500Optional

Custom title for the generated Gamma. If not provided, a title will be automatically generated from the content.

Example: Q3 Financial Summary
gammaIdstringRequired

The File ID of the gamma to be used as a template. The File must contain exactly one Page.

Example: gamma_abc123
themeIdstringOptional

Theme ID to apply to the generated Gamma

Example: theme_xyz789
folderIdsstring[] · max: 10Optional

Folder IDs to place the generated Gamma in

Example: ["folder_abc"]
Responses
200

Generation job created successfully

application/json
generationIdstringRequired

Unique identifier for the generation job

Example: gen_xyz789
warningsstringOptional

Warnings about the request

Example: Some template variables were not found
post/v1.0/generations/from-template

For template workflow guidance, see Generate from template.

Last updated

Was this helpful?