Skip to content

Commit 63fa938

Browse files
authored
feat(gamma): add gamma integration for AI-powered content generation (#3358)
* feat(gamma): add gamma integration for AI-powered content generation * fix(gamma): address PR review comments - Make credits/error conditionally included in check_status response to avoid always-truthy objects - Replace full wordmark SVG with square "G" letterform for proper rendering in icon slots * fix(gamma): remove imageSource from generate_from_template endpoint The from-template API only accepts imageOptions.model and imageOptions.style, not imageOptions.source (image source is inherited from the template). * fix(gamma): use typed output in check_status transformResponse * regen docs
1 parent 50b882a commit 63fa938

File tree

15 files changed

+1333
-0
lines changed

15 files changed

+1333
-0
lines changed

apps/docs/components/icons.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,17 @@ export function SlackMonoIcon(props: SVGProps<SVGSVGElement>) {
526526
)
527527
}
528528

529+
export function GammaIcon(props: SVGProps<SVGSVGElement>) {
530+
return (
531+
<svg {...props} viewBox='-14 0 192 192' fill='none' xmlns='http://www.w3.org/2000/svg'>
532+
<path
533+
fill='currentColor'
534+
d='M47.2,14.4c-14.4,8.2-26,19.6-34.4,33.6C4.3,62.1,0,77.7,0,94.3s4.3,32.2,12.7,46.3c8.5,14.1,20,25.4,34.4,33.6,14.4,8.2,30.4,12.4,47.7,12.4h69.8v-112.5h-81v39.1h38.2v31.8h-25.6c-9.1,0-17.6-2.3-25.2-6.9-7.6-4.6-13.8-10.8-18.3-18.4-4.5-7.7-6.7-16.2-6.7-25.3s2.3-17.7,6.7-25.3c4.5-7.7,10.6-13.9,18.3-18.4,7.6-4.6,16.1-6.9,25.2-6.9h68.5V2h-69.8c-17.3,0-33.3,4.2-47.7,12.4h0Z'
535+
/>
536+
</svg>
537+
)
538+
}
539+
529540
export function GithubIcon(props: SVGProps<SVGSVGElement>) {
530541
return (
531542
<svg {...props} width='26' height='26' viewBox='0 0 26 26' xmlns='http://www.w3.org/2000/svg'>

apps/docs/components/ui/icon-mapping.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import {
4040
EyeIcon,
4141
FirecrawlIcon,
4242
FirefliesIcon,
43+
GammaIcon,
4344
GithubIcon,
4445
GitLabIcon,
4546
GmailIcon,
@@ -191,6 +192,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
191192
file_v3: DocumentIcon,
192193
firecrawl: FirecrawlIcon,
193194
fireflies_v2: FirefliesIcon,
195+
gamma: GammaIcon,
194196
github_v2: GithubIcon,
195197
gitlab: GitLabIcon,
196198
gmail_v2: GmailIcon,
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
---
2+
title: Gamma
3+
description: Generate presentations, documents, and webpages with AI
4+
---
5+
6+
import { BlockInfoCard } from "@/components/ui/block-info-card"
7+
8+
<BlockInfoCard
9+
type="gamma"
10+
color="#002253"
11+
/>
12+
13+
{/* MANUAL-CONTENT-START:intro */}
14+
[Gamma](https://gamma.app/) is an AI-powered platform for creating presentations, documents, webpages, and social posts. Gamma's API lets you programmatically generate polished, visually rich content from text prompts, adapt existing templates, and manage workspace assets like themes and folders.
15+
16+
With Gamma, you can:
17+
18+
- **Generate presentations and documents:** Create slide decks, documents, webpages, and social posts from text input with full control over format, tone, and image sourcing.
19+
- **Create from templates:** Adapt existing Gamma templates with custom prompts to quickly produce tailored content.
20+
- **Check generation status:** Poll for completion of async generation jobs and retrieve the final Gamma URL.
21+
- **Browse themes and folders:** List available workspace themes and folders to organize and style your generated content.
22+
23+
In Sim, the Gamma integration enables your agents to automatically generate presentations and documents, create content from templates, and manage workspace assets directly within your workflows. This allows you to automate content creation pipelines, batch-produce slide decks, and integrate AI-generated presentations into broader business automation scenarios.
24+
{/* MANUAL-CONTENT-END */}
25+
26+
27+
## Usage Instructions
28+
29+
Integrate Gamma into the workflow. Can generate presentations, documents, webpages, and social posts from text, create from templates, check generation status, and browse themes and folders.
30+
31+
32+
33+
## Tools
34+
35+
### `gamma_generate`
36+
37+
Generate a new Gamma presentation, document, webpage, or social post from text input.
38+
39+
#### Input
40+
41+
| Parameter | Type | Required | Description |
42+
| --------- | ---- | -------- | ----------- |
43+
| `apiKey` | string | Yes | Gamma API key |
44+
| `inputText` | string | Yes | Text and image URLs used to generate your gamma \(1-100,000 tokens\) |
45+
| `textMode` | string | Yes | How to handle input text: generate \(AI expands\), condense \(AI summarizes\), or preserve \(keep as-is\) |
46+
| `format` | string | No | Output format: presentation, document, webpage, or social \(default: presentation\) |
47+
| `themeId` | string | No | Custom Gamma workspace theme ID \(use List Themes to find available themes\) |
48+
| `numCards` | number | No | Number of cards/slides to generate \(1-60 for Pro, 1-75 for Ultra; default: 10\) |
49+
| `cardSplit` | string | No | How to split content into cards: auto or inputTextBreaks \(default: auto\) |
50+
| `cardDimensions` | string | No | Card aspect ratio. Presentation: fluid, 16x9, 4x3. Document: fluid, pageless, letter, a4. Social: 1x1, 4x5, 9x16 |
51+
| `additionalInstructions` | string | No | Additional instructions for the AI generation \(max 2000 chars\) |
52+
| `exportAs` | string | No | Automatically export the generated gamma as pdf or pptx |
53+
| `folderIds` | string | No | Comma-separated folder IDs to store the generated gamma in |
54+
| `textAmount` | string | No | Amount of text per card: brief, medium, detailed, or extensive |
55+
| `textTone` | string | No | Tone of the generated text, e.g. "professional", "casual" \(max 500 chars\) |
56+
| `textAudience` | string | No | Target audience for the generated text, e.g. "executives", "students" \(max 500 chars\) |
57+
| `textLanguage` | string | No | Language code for the generated text \(default: en\) |
58+
| `imageSource` | string | No | Where to source images: aiGenerated, pictographic, unsplash, webAllImages, webFreeToUse, webFreeToUseCommercially, giphy, placeholder, or noImages |
59+
| `imageModel` | string | No | AI image generation model to use when imageSource is aiGenerated |
60+
| `imageStyle` | string | No | Style directive for AI-generated images, e.g. "watercolor", "photorealistic" \(max 500 chars\) |
61+
62+
#### Output
63+
64+
| Parameter | Type | Description |
65+
| --------- | ---- | ----------- |
66+
| `generationId` | string | The ID of the generation job. Use with Check Status to poll for completion. |
67+
68+
### `gamma_generate_from_template`
69+
70+
Generate a new Gamma by adapting an existing template with a prompt.
71+
72+
#### Input
73+
74+
| Parameter | Type | Required | Description |
75+
| --------- | ---- | -------- | ----------- |
76+
| `apiKey` | string | Yes | Gamma API key |
77+
| `gammaId` | string | Yes | The ID of the template gamma to adapt |
78+
| `prompt` | string | Yes | Instructions for how to adapt the template \(1-100,000 tokens\) |
79+
| `themeId` | string | No | Custom Gamma workspace theme ID to apply |
80+
| `exportAs` | string | No | Automatically export the generated gamma as pdf or pptx |
81+
| `folderIds` | string | No | Comma-separated folder IDs to store the generated gamma in |
82+
| `imageModel` | string | No | AI image generation model to use when imageSource is aiGenerated |
83+
| `imageStyle` | string | No | Style directive for AI-generated images, e.g. "watercolor", "photorealistic" \(max 500 chars\) |
84+
85+
#### Output
86+
87+
| Parameter | Type | Description |
88+
| --------- | ---- | ----------- |
89+
| `generationId` | string | The ID of the generation job. Use with Check Status to poll for completion. |
90+
91+
### `gamma_check_status`
92+
93+
Check the status of a Gamma generation job. Returns the gamma URL when completed, or error details if failed.
94+
95+
#### Input
96+
97+
| Parameter | Type | Required | Description |
98+
| --------- | ---- | -------- | ----------- |
99+
| `apiKey` | string | Yes | Gamma API key |
100+
| `generationId` | string | Yes | The generation ID returned by the Generate or Generate from Template tool |
101+
102+
#### Output
103+
104+
| Parameter | Type | Description |
105+
| --------- | ---- | ----------- |
106+
| `generationId` | string | The generation ID that was checked |
107+
| `status` | string | Generation status: pending, completed, or failed |
108+
| `gammaUrl` | string | URL of the generated gamma \(only present when status is completed\) |
109+
| `credits` | object | Credit usage information \(only present when status is completed\) |
110+
|`deducted` | number | Number of credits deducted for this generation |
111+
|`remaining` | number | Remaining credits in the account |
112+
| `error` | object | Error details \(only present when status is failed\) |
113+
|`message` | string | Human-readable error message |
114+
|`statusCode` | number | HTTP status code of the error |
115+
116+
### `gamma_list_themes`
117+
118+
List available themes in your Gamma workspace. Returns theme IDs, names, and keywords for styling.
119+
120+
#### Input
121+
122+
| Parameter | Type | Required | Description |
123+
| --------- | ---- | -------- | ----------- |
124+
| `apiKey` | string | Yes | Gamma API key |
125+
| `query` | string | No | Search query to filter themes by name \(case-insensitive\) |
126+
| `limit` | number | No | Maximum number of themes to return per page \(max 50\) |
127+
| `after` | string | No | Pagination cursor from a previous response \(nextCursor\) to fetch the next page |
128+
129+
#### Output
130+
131+
| Parameter | Type | Description |
132+
| --------- | ---- | ----------- |
133+
| `themes` | array | List of available themes |
134+
|`id` | string | Theme ID \(use with themeId parameter\) |
135+
|`name` | string | Theme display name |
136+
|`type` | string | Theme type: standard or custom |
137+
|`colorKeywords` | array | Color descriptors for this theme |
138+
|`toneKeywords` | array | Tone descriptors for this theme |
139+
| `hasMore` | boolean | Whether more results are available on the next page |
140+
| `nextCursor` | string | Pagination cursor to pass as the after parameter for the next page |
141+
142+
### `gamma_list_folders`
143+
144+
List available folders in your Gamma workspace. Returns folder IDs and names for organizing generated content.
145+
146+
#### Input
147+
148+
| Parameter | Type | Required | Description |
149+
| --------- | ---- | -------- | ----------- |
150+
| `apiKey` | string | Yes | Gamma API key |
151+
| `query` | string | No | Search query to filter folders by name \(case-sensitive\) |
152+
| `limit` | number | No | Maximum number of folders to return per page \(max 50\) |
153+
| `after` | string | No | Pagination cursor from a previous response \(nextCursor\) to fetch the next page |
154+
155+
#### Output
156+
157+
| Parameter | Type | Description |
158+
| --------- | ---- | ----------- |
159+
| `folders` | array | List of available folders |
160+
|`id` | string | Folder ID \(use with folderIds parameter\) |
161+
|`name` | string | Folder display name |
162+
| `hasMore` | boolean | Whether more results are available on the next page |
163+
| `nextCursor` | string | Pagination cursor to pass as the after parameter for the next page |
164+
165+

apps/docs/content/docs/en/tools/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"file",
3636
"firecrawl",
3737
"fireflies",
38+
"gamma",
3839
"github",
3940
"gitlab",
4041
"gmail",

0 commit comments

Comments
 (0)