Generate from template

When to use the Create from Template endpoint and how to choose the parameters that control the generated output.

Use this page when you want POST /v1.0/generations/from-template and need help choosing the parameters that preserve layout while swapping in new content.

circle-info

This page is for workflow guidance and parameter tradeoffs. For the exact request body, field types, and polling response schema, see the POST /generations/from-template and GET /generations/{id} endpoint reference pages.

Quick reference

  • gammaId and prompt are required.

  • The template Gamma must contain exactly one page.

  • Use themeId, folderIds, exportAs, and sharingOptions the same way you would in the standard generation flow.

  • Poll GET /v1.0/generations/{generationId} to retrieve gammaUrl, exportUrl, and credit usage.

Top-level parameters

gammaId (required)

Identifies the template you want to modify. You can find and copy the gammaId for a template as shown in the screenshots below.

Finding the gamma ID for a template
Copy the template Gamma ID from the app before you make the request.
Template must have exactly one page
Create from Template works best when the source Gamma has exactly one page.

prompt (required)

Use this parameter to send text content, image URLs, as well as instructions for how to use this content in relation to the template gamma.

Add images to the input

You can provide URLs for specific images you want to include. Simply insert the URLs into your content where you want each image to appear (see example below). You can also add instructions for how to display the images, eg, "Group the last 10 images into a gallery to showcase them together."

Token limits

The total token limit is 100,000, which is approximately 400,000 characters, but because part of your input is the gamma template, in practice, the token limit for your prompt becomes shorter. We highly recommend keeping your prompt well below 100,000 tokens and testing out a variety of inputs to get a good sense of what works for your use case.

Other tips

  • Text can be as little as a few words that describe the topic of the content you want to generate.

  • You can also input longer text -- pages of messy notes or highly structured, detailed text.

  • You may need to apply JSON escaping to your text. Find out more about JSON escaping and try it out herearrow-up-right.


themeId (optional, defaults to workspace default theme)

Defines which theme from Gamma will be used for the output. Themes determine the look and feel of the gamma, including colors and fonts.

  • Use GET /v1.0/themes to list themes from your workspace, or copy the theme ID directly from the app.

Theme ID location in Gamma
Copy the theme ID from the app

folderIds (optional)

Defines which folder(s) your gamma is stored in.

  • Use GET /v1.0/folders to list folders, or copy the folder ID directly from the app.

  • You must be a member of a folder to add gammas to it.

Folder ID location in Gamma
Copy the folder ID from the app

exportAs (optional)

Indicates if you'd like to return the generated gamma as an exported file as well as a Gamma URL.

  • Options are pdf, pptx, or png

  • Export URLs are signed and expire after approximately one week. Download promptly after generation completes.

  • If you do not wish to directly export via the API, you may always do so later via the app.

circle-exclamation

imageOptions

When you create content from a Gamma template, new images automatically match the image source used in the original template. For example if you used Pictographic images to generate your original template, any new images will be sourced from Pictographic.

For templates with AI-generated images, you can override the default AI image settings using the optional parameters below.

imageOptions.model (optional)

This field is relevant if the imageOptions.source chosen is aiGenerated. The imageOptions.model parameter determines which model is used to generate images.

  • You can choose from the models listed in Image model accepted values.

  • If no value is specified for this parameter, Gamma automatically selects a model for you.

imageOptions.style (optional)

This field is relevant if the imageOptions.source chosen is aiGenerated. The imageOptions.style parameter influences the artistic style of the images generated. While this is an optional field, we highly recommend adding some direction here to create images in a cohesive style.

  • You can add one or multiple words to define the visual style of the images you want.

  • Adding some direction -- even a simple one word like "photorealistic" -- can create visual consistency among the generated images.

  • Character limits: 1-500.


sharingOptions

sharingOptions.workspaceAccess (optional, defaults to workspace share settings)

Determines level of access members in your workspace will have to your generated gamma.

  • Options are: noAccess, view, comment, edit, fullAccess

  • fullAccessallows members from your workspace to view, comment, edit, and share with others.

sharingOptions.externalAccess (optional, defaults to workspace share settings)

Determines level of access members outside your workspace will have to your generated gamma.

  • Options are: noAccess, view, comment, or edit

sharingOptions.emailOptions (optional)

Allows you to share your gamma with specific recipients via their email address.

sharingOptions.emailOptions.access (optional)

Determines level of access those specified in sharingOptions.emailOptions.recipients have to your generated gamma. Only workspace members can have fullAccess

  • Options are: view, comment, edit, or fullAccess

Last updated

Was this helpful?