For the complete documentation index, see llms.txt. This page is also available as Markdown.

GET /templates/search

Search workspace templates and official Gamma explore templates. With a query, workspace hits rank by title and body text relevance and may fall back to last-edited order.

Search workspace templates and official Gamma explore templates in one request, with optional relevance ranking when you pass q.

get

Search the caller's workspace templates and the official Gamma explore templates. Returns two lists. With a query, workspace templates use best-effort relevance ranking against title and body text and may fall back to last-edited browse order, while explore templates use their best-effort ranking. An empty query returns both lists in browse order. Workspace browse results use last-edited order, most recent first. Workspace template IDs can be passed as the gammaId to generate-from-template, which validates eligibility at generation time and may reject some templates, such as multi-page or site-bound ones. Explore templates cannot be used with generate-from-template.

Authorizations
X-API-KEYstringRequired

API key for authentication

Query parameters
qstring · max: 2000Optional

Search query. Workspace templates use best-effort relevance ranking against title and body text and may fall back to last-edited browse order. Explore templates use their ranked search. When omitted, both lists are a browse.

Example: sales pitch
limitnumber · min: 1 · max: 25Optional

Maximum number of hits to return per list (1-25)

Example: 10
Responses
200

Search results retrieved successfully

application/json
workspaceDegradedbooleanOptional

True when workspace relevance ranking failed and workspaceTemplates use last-edited browse order. Omitted otherwise.

get/v1.0/templates/search
GET /v1.0/templates/search HTTP/1.1
Host: public-api.gamma.app
X-API-KEY: YOUR_API_KEY
Accept: */*
{
  "workspaceTemplates": [
    {
      "id": "abc123def456",
      "title": "Sales Pitch Deck",
      "url": "https://gamma.app/docs/Sales-Pitch-Deck-abc123",
      "previewUrl": "https://cdn.gamma.app/templates/abc123/preview.png"
    }
  ],
  "workspaceDegraded": true,
  "exploreTemplates": [
    {
      "id": "exp123def456",
      "title": "Startup Pitch",
      "url": "https://gamma.app/docs/Startup-Pitch-exp123",
      "thumbnailUrl": "https://cdn.gamma.app/templates/exp123/thumb.png",
      "previewUrl": "https://cdn.gamma.app/templates/exp123/preview.png"
    }
  ]
}

Returns workspaceTemplates and exploreTemplates separately. With q, workspace templates rank by best-effort relevance on title and body text and may fall back to last-edited order; workspaceDegraded is true when that fallback occurred. Explore templates use their own ranked search. Workspace template IDs can be passed as gammaId to POST /generations/from-template; eligibility is validated at generation time and some templates may be rejected (for example, multi-page or site-bound ones). Explore templates cannot be used with generate-from-template. Omit q to browse both lists; use limit (1–25) to cap hits per list. Supports X-API-KEY or OAuth Bearer token.

Last updated

Was this helpful?