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.
When to use this endpoint
Key differences from /generations
What you get back
API key for authentication
Export format for automatic export after generation
pdfPossible values: Text prompt describing what to generate
Q3 financial summary for investorsCustom title for the generated Gamma. If not provided, a title will be automatically generated from the content.
Q3 Financial SummaryThe File ID of the gamma to be used as a template. The File must contain exactly one Page.
gamma_abc123Theme ID to apply to the generated Gamma
theme_xyz789Folder to place the generated Gamma in. Accepts at most 1 folder ID.
["folder_abc"]Generation job created successfully
Unique identifier for the generation job
gen_xyz789Warnings about the request
Some template variables were not foundInvalid request or template not found
Invalid or missing API key
Insufficient credits
Feature not enabled for workspace
POST /v1.0/generations/from-template HTTP/1.1
Host: public-api.gamma.app
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 370
{
"exportAs": "pdf",
"prompt": "Q3 financial summary for investors",
"title": "Q3 Financial Summary",
"gammaId": "gamma_abc123",
"themeId": "theme_xyz789",
"imageOptions": {
"model": "flux-2-pro",
"style": "photorealistic"
},
"sharingOptions": {
"workspaceAccess": "view",
"externalAccess": "none",
"emailOptions": {
"access": "view",
"recipients": [
"user@example.com"
]
}
},
"folderIds": [
"folder_abc"
]
}{
"generationId": "gen_xyz789",
"warnings": "Some template variables were not found"
}Related
Last updated
Was this helpful?