Use themes and folders
How to use the themes and folders endpoints to fetch the IDs you need for generation requests.
Use these endpoints when you need to look up IDs for a generation request.
Quick reference
Call
GET /v1.0/themesto get athemeId.Call
GET /v1.0/foldersto get afolderId.Both endpoints use cursor-based pagination with
query,limit,after,hasMore, andnextCursor.GET /v1.0/themesalso acceptstype=standardortype=customif you only want built-in or workspace themes.Theme objects include
type(standardorcustom),colorKeywords, andtoneKeywords.
List themes
Returns a paginated list of themes in your workspace, including both workspace-specific and global themes.
curl -X GET https://public-api.gamma.app/v1.0/themes \
-H "X-API-KEY: sk-gamma-xxxxxxxx"Response fields -- each theme object in the data array contains:
{
"id": "abcdefghi",
"name": "Prism",
"type": "custom",
"colorKeywords": ["light","blue","pink","purple","pastel","gradient","vibrant"],
"toneKeywords": ["playful","friendly","creative","inspirational","fun"]
}The type field distinguishes between standard (global themes available to all workspaces) and custom (workspace-specific themes).
If you only want one category, pass type=standard or type=custom on the request. When paginating, keep the same type value on every page so the result set stays consistent.
List folders
Returns a paginated list of folders in your workspace.
Response fields -- each folder object in the data array contains:
Pagination
Both endpoints use the same cursor-based pagination. The example below uses folders, but the pattern is identical for themes.
First page:
Next page -- pass the previous nextCursor as after. When hasMore is false and nextCursor is null, you've reached the end.
Searching by name
Use the query parameter to filter results by name. Works on both themes and folders.
The returned id can be used as themeId in the Generate, Create from Template, and Agent generation APIs. On POST /v1.0/agent/generations, omit themeId when you also send templateId.
Related
Generate from text for where
themeIdandfolderIdfit in the requestGenerate from template for using theme and folder IDs with templates
POST /agent/generations for optional
themeIdon agent requestsGET /themes for the full API reference
GET /folders for the full API reference
Last updated
Was this helpful?