Generate from text
When to use the Generate endpoint and how to choose the parameters that shape the output.
POST /v1.0/generations accepts many optional fields; the sections below describe how each one shapes the output.
Quick reference
Provide
inputTextfor a single-page File, or apagesarray for a multi-page File (up to 50 pages).titlelets you set the Gamma title directly instead of relying on inference from the generated content.textModecontrols whether Gamma expands, condenses, or preserves your source text.format,themeId,imageOptions, andcardOptionsshape the look and output type.Poll
GET /v1.0/generations/{id}to retrievegammaUrl,exportUrl, and credit usage after creation.
Top-level parameters
title (optional)
Sets the title of the generated Gamma at creation time.
Use this when you want a stable, explicit name instead of relying on inferred titles.
Character limits: 1-500.
If omitted, Gamma infers the title from the generated content.
"title": "Q3 Board Update"inputText (required unless pages is provided)
Content used to generate your gamma, including text and image URLs. Omit this field when using pages instead.
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 in additionalInstructions, eg, "Group the last 10 images into a gallery to showcase them together."
Token limits
The token limit is 100,000, which is approximately 400,000 characters. However, in some cases, the token limit may be lower, especially if your use case requires extra reasoning from our AI models. We highly recommend keeping inputText 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 can control where cards are split by adding \n---\n to the text.
You may need to apply JSON escaping to your text. Find out more about JSON escaping and try it out here.
pages (alternative to top-level inputText)
Generate multiple pages in a single File. When provided, pages takes precedence over the top-level per-page fields (inputText, textMode, numCards, format, additionalInstructions, cardSplit, textOptions, imageOptions). File-level options such as themeId, folderId, exportAs, and sharingOptions still apply to all pages.
Each entry requires
inputTextand can override per-page settings such asformat,numCards, andtitle.Up to 50 pages per request.
Set
publish: trueto publish the File as a Gamma site after all pages succeed.
textMode (optional)
Determines how your inputText is modified, if at all.
You can choose between
generate,condense, orpreservegenerate: Using yourinputTextas a starting point, Gamma will rewrite and expand the content. Works best when you have brief text in the input that you want to elaborate on.condense: Gamma will summarize yourinputTextto fit the content length you want. Works best when you start with a large amount of text that you'd like to summarize.preserve: Gamma will retain the exact text ininputText, sometimes structuring it where it makes sense to do so, eg, adding headings to sections. (If you do not want any modifications at all, you can specify this in theadditionalInstructionsparameter.)
format (optional, defaults topresentation)
Determines the artifact Gamma will create for you.
You can choose between
presentation,document,social, orwebpage.You can use the
cardOptions.dimensionsfield to further specify the shape of your output.
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/themesto list themes from your workspace, or copy the theme ID directly from the app.

numCards (optional, defaults to10)
Determines how many cards are created if auto is chosen in cardSplit
Free: 1 to 10 cards.
Plus, Pro, Ultra, Teams, Business, and Enterprise plans: 1 to 100 cards.
cardSplit (optional, defaults toauto)
Determines how your content will be divided into cards.
You can choose between
autoorinputTextBreaksChoosing
autotells Gamma to looks at thenumCardsfield and divide up content accordingly. (It will not adhere to text breaks \n---\n in yourinputText.)Choosing
inputTextBreakstells Gamma that it should look for text breaks \n---\n in yourinputTextand divide the content based on this. (It will not respectnumCards.)Note: One \n---\n = one break, ie, text with one break will produce two cards, two break will produce three cards, and so on.
No
auto
9
9 cards
No
auto
left blank
10 cards (default)
No
inputTextBreaks
9
1 card
Yes, 5
auto
9
9 cards
Yes, 5
inputTextBreaks
9
6 cards
additionalInstructions (optional)
Helps you add more specifications about your desired output.
You can add specifications to steer content, layouts, and other aspects of the output.
Works best when the instructions do not conflict with other parameters, eg, if the
textModeis defined ascondense, and theadditionalInstructionssay to preserve all text, the output will not be able to respect these conflicting requests.Character limits: 1-5000.
folderId (optional)
Places the generated Gamma in a workspace folder.
Use
GET /v1.0/foldersto list folders, or copy the folder ID directly from the app.The API key owner needs edit or full access to the folder. Folder membership or workspace admin rights alone are not enough, and view-only access to the folder returns a
400.

folderIds (optional, deprecated)
Legacy array form of folderId. Accepts at most one folder ID. Ignored when folderId is set.
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, orpngpngreturns a.zipwith one PNG per card, not a single image file.Export URLs expire after approximately one week and are not tied to your API key — anyone with the link can download the file until then, so treat it as a secret and download promptly after generation completes.
If you do not wish to export during generation, use POST /gammas/{gammaId}/export on an existing Gamma or export from the app.
textOptions
textOptions.amount (optional, defaults to medium)
Influences how much text each card contains. Relevant only if textMode is set to generate or condense.
You can choose between
brief,medium,detailedorextensive
textOptions.tone (optional)
Defines the mood or voice of the output. Relevant only if textMode is set to generate.
You can add one or multiple words to hone in on the mood/voice to convey.
Character limits: 1-500.
textOptions.audience (optional)
Describes who will be reading/viewing the gamma, which allows Gamma to cater the output to the intended group. Relevant only if textMode is set to generate.
You can add one or multiple words to hone in on the intended viewers/readers of the gamma.
Character limits: 1-500.
textOptions.language (optional, defaults to en)
Determines the language in which your gamma is generated, regardless of the language of the inputText.
You can choose from the languages listed in Output language accepted values.
imageOptions
imageOptions.source (optional, defaults to aiGenerated)
Determines where the images for the gamma are sourced from. You can choose from the options below. If you are providing your own image URLs in inputText and want only those to be used, set imageOptions.source to noImages to indicate that Gamma should not generate additional images.
Options for source
Notes
aiGenerated
If you choose this option, you can also specify the imageOptions.model you want to use as well as an imageOptions.style. These parameters do not apply to other source options.
pictographic
Pulls images from Pictographic.
pexels
Gets images from Pexels.
giphy
Gets GIFs from Giphy.
webAllImages
Pulls the most relevant images from the web, even if licensing is unknown.
webFreeToUse
Pulls images licensed for personal use.
webFreeToUseCommercially
Gets images licensed for commercial use, like a sales pitch.
themeAccent
Uses accent images from your selected theme.
placeholder
Creates a gamma with placeholders for which images can be manually added later.
noImages
Creates a gamma with no images. Select this option if you are providing your own image URLs in inputText and want only those in your gamma.
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-5000.
What about accent images?
Providing your own image URLs
When including image URLs in your inputText, follow these best practices to avoid broken images:
Public CDN (Cloudflare, CloudFront)
✅ Yes
Permanent, fast, reliable
S3 signed URL (7+ days)
✅ Yes
Works if expiration is long enough
S3 signed URL (< 24 hours)
❌ No
Will break after expiration
Google Drive/Dropbox share links
⚠️ Maybe
Can break if permissions change
Imgur, hosted image services
✅ Yes
Generally permanent
Localhost / 192.168.x.x
❌ No
Not accessible to Gamma servers
cardOptions
cardOptions.dimensions (optional)
Determines the aspect ratio of the cards to be generated. Fluid cards expand with your content. Not applicable if format is webpage.
Options if
formatispresentation:fluid(default),16x9,4x3Options if
formatisdocument:fluid(default),pageless,letter,a4Options if
formatissocial:1x1,4x5(default) (good for Instagram posts and LinkedIn carousels),9x16(good for Instagram and TikTok stories)
cardOptions.headerFooter (optional)
Allows you to specify elements in the header and footer of the cards. Not applicable if format is webpage.
Step 1: Pick which positions you want to populate. Options:
topLeft,topRight,topCenter,bottomLeft,bottomRight,bottomCenter.Step 2: For each position, specify what type of content goes there. Options:
text,image, andcardNumber.Step 3: Configure based on type.
For
text, define avalue(required)For
image:Set the
source. Options:themeLogoorcustomimage (required)Set the
size. Options:sm,md,lg,xl(optional)For a
customimage, define asrcimage URL (required)
For
cardNumber, no additional configuration is available.
Step 4: For any position, you can control whether it appears on the first or last card:
hideFromFirstCard(optional) - Set totrueto hide from first card. Default:falsehideFromLastCard(optional) - Set totrueto hide from last card. Default:false
sharingOptions
sharingOptions.workspaceAccess (optional, defaults to workspace setting)
Determines level of access members in your workspace will have to your generated gamma.
Options are:
noAccess,view,comment,edit,fullAccessfullAccessallows members from your workspace to view, comment, edit, and share with others.
When omitted, Gamma applies the workspace default. Admins set it at Settings > Sharing under "Default workspace sharing permission for new gammas." Setting the default to "No access" makes every new gamma private without needing to pass noAccess on every API call. Explicit values in the API request always override the workspace default.
sharingOptions.externalAccess (optional, defaults to workspace setting)
Determines level of access members outside your workspace will have to your generated gamma.
Options are:
noAccess,view,comment, oredit
When omitted, Gamma applies the workspace default. Admins set it at Settings > Sharing under "Default link sharing permission for new gammas." Setting the default to "No access" disables link sharing by default. Explicit values in the API request always override the workspace default.
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, orfullAccess
Related
Generate from a template if you want to preserve an existing layout
Poll for results for the post-request workflow
Header and Footer Formatting for deeper guidance on
cardOptions.headerFooter
Last updated
Was this helpful?