Generate from text

When to use the Generate endpoint and how to choose the parameters that shape the output.

Use this page when you already know you want POST /v1.0/generations and need help deciding how each parameter affects the output.

circle-info

This page explains when and why to use each parameter. For the exact request body, field types, and response schema, see the POST /generations and GET /generations/{id} endpoint reference pages.

Quick reference

  • inputText is always required.

  • textMode controls whether Gamma expands, condenses, or preserves your source text.

  • format, themeId, imageOptions, and cardOptions shape the look and output type.

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

Top-level parameters

inputText (required)

Content used to generate your gamma, including text and image URLs.

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

circle-info

Note: If you want your gamma to use only the images you provide (and not generate additional ones), set imageOptions.source to noImages.

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 herearrow-up-right.


textMode (required)

Determines how your inputText is modified, if at all.

  • You can choose between generate, condense, or preserve

  • generate: Using your inputText as 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 your inputText to 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 in inputText, 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 the additionalInstructions parameter.)


format (optional, defaults topresentation)

Determines the artifact Gamma will create for you.

  • You can choose between presentation, document, social, or webpage.

  • 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/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

numCards (optional, defaults to10)

Determines how many cards are created if auto is chosen in cardSplit

  • Pro, Teams, and Business plans: 1 to 60 cards.

  • Ultra plan: 1 to 75 cards.


cardSplit (optional, defaults toauto)

Determines how your content will be divided into cards.

  • You can choose between auto or inputTextBreaks

  • Choosing auto tells Gamma to looks at the numCards field and divide up content accordingly. (It will not adhere to text breaks \n---\n in your inputText.)

  • Choosing inputTextBreaks tells Gamma that it should look for text breaks \n---\n in your inputText and divide the content based on this. (It will not respect numCards.)

    • Note: One \n---\n = one break, ie, text with one break will produce two cards, two break will produce three cards, and so on.

  • Here are some scenarios to guide your use of these parameters and explain how they work

inputText contains \n---\n and how many
cardSplit
numCards
output has

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 textMode is defined as condense, and the additionalInstructions say to preserve all text, the output will not be able to respect these conflicting requests.

  • Character limits: 1-5000.

circle-check

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

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, detailed or extensive

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.


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

What about accent images?

circle-info

Accent images are automatically placed by Gamma - they cannot be directly controlled via the API.

Accent images are large, decorative images that enhance the visual appeal of cards. Gamma's AI automatically determines:

  • Whether to include an accent image on each card

  • Where to place it (left, right, top, or background)

  • What image to use (based on your content and imageOptions settings)

The placement works best with fixed-dimension formats like 16x9 presentations. If you need more control over images, consider providing specific image URLs directly in your inputText.

Providing your own image URLs

When including image URLs in your inputText, follow these best practices to avoid broken images:

circle-exclamation
URL Type
Recommended
Notes

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

circle-check

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 format is presentation: fluid (default), 16x9, 4x3

  • Options if format is document: fluid (default), pageless, letter, a4

  • Options if format is social: 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, and cardNumber.

  • Step 3: Configure based on type.

    • For text, define a value (required)

    • For image:

      • Set the source. Options: themeLogo or customimage (required)

      • Set the size . Options:sm, md, lg, xl (optional)

      • For acustom image, define a src image 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 to true to hide from first card. Default: false

    • hideFromLastCard (optional) - Set to true to hide from last card. Default: false


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?