Close menu
Explore Plans
Mobile menu Close menu
Gamma

Generate a document

This action will generate a new formatted document in your Gamma workspace from the topic, outline, or text you provide. Each generation consumes your Gamma account's AI credits.

Developer info

API endpoint slug
gamma.generate_a_document
Filter code method
Gamma.generateADocument.skip(string?: reason)
Runtime method
runAction("gamma.generate_a_document", {})

Action fields

Content Text input > Long text

Label
What should the document be about?
Helper text
Paste a topic, an outline, or full source text to turn into a document.
Slug
content
Required
true
Can have default value
true
Filter code method
Gamma.generateADocument.setContent(string: content)

Number of cards Text input > Other

Label
Number of sections
Helper text
Optional. The target number of sections, from 1 to 60 (up to 75 on Ultra). Leave blank to let Gamma decide.
Slug
number_of_cards
Required
false
Can have default value
true
Filter code method
Gamma.generateADocument.setNumberOfCards(string: number_of_cards)

Theme Dropdown list

Label
Which theme?
Helper text
Optional. Pick one of the themes from your Gamma workspace to style the document.
Slug
theme
Required
false
Can have default value
false

Tone Text input > Other

Label
Tone
Helper text
Optional. The writing tone for the generated copy, such as professional, casual, or persuasive.
Slug
tone
Required
false
Can have default value
true
Filter code method
Gamma.generateADocument.setTone(string: tone)

Audience Text input > Other

Label
Audience
Helper text
Optional. Who the document is for, such as executives, customers, or students.
Slug
audience
Required
false
Can have default value
true
Filter code method
Gamma.generateADocument.setAudience(string: audience)

Additional instructions Text input > Long text

Label
Additional instructions
Helper text
Optional. Any extra direction for how Gamma should build the document.
Slug
additional_instructions
Required
false
Can have default value
true
Filter code method
Gamma.generateADocument.setAdditionalInstructions(string: additional_instructions)

Save to folder Dropdown list

Label
Save to folder
Helper text
Optional. Pick a folder from your Gamma workspace to organize the result.
Slug
save_to_folder
Required
false
Can have default value
false