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

POST /agent/gammas/{gammaId}/edits

Edit an existing Gamma from a natural-language prompt.

Edit an existing Gamma with a natural-language prompt; the call returns an editId to poll (the final status reports credits.deducted and credits.remaining when available), requires edit permission on the Gamma, and runs one edit per Gamma at a time.

Edit an existing Gamma

post

Creates an asynchronous AI edit of an existing Gamma from a natural-language prompt. The edit changes the target page unless the prompt names another page of the Gamma, and it can add, duplicate, reorder, rename, and archive pages when the prompt asks for it. It never archives the target page. Returns an edit ID to poll with GET /v1.0/agent/edits/{editId}. Requires at least edit permission on the Gamma. Only one edit runs on a Gamma at a time.

Authorizations
X-API-KEYstringRequired

API key for authentication

Path parameters
gammaIdstringRequired

The Gamma to edit: a gamma (file) ID, or a page ID (the id in a gamma.app/docs/ URL). The ID sets the edit's target page: a file ID targets the Gamma's main page, a page ID that page. A prompt that names no page edits the target page; one that names another page of the Gamma, by title or position, edits that page.

Example: g_5hzkx0ivxsmd2ep
Body
promptstring · max: 10000Required

Natural-language instruction describing the edit.

Example: Change the title of the first card to Q3 Review
qualitystring · enumOptional

How much model effort the edit runs with, matching the quality tiers in the Gamma agent UI. max requires a plan that includes it and can use more credits. Omitting the field uses the API default, capped at what the plan includes.

Example: litePossible values:
disableConnectorsbooleanOptional

Opt this edit out of workspace connector access (e.g. Notion, Slack).

Example: true
Responses
201

Edit job created

application/json
editIdstringRequired

Unique ID for the edit job. Poll GET /v1.0/agent/edits/{editId} with it.

Example: V1StGXR8Z5jdHi6B
gammaUrlstringRequired

URL to the Gamma being edited

Example: https://gamma.app/docs/abc123
post/v1.0/agent/gammas/{gammaId}/edits
POST /v1.0/agent/gammas/{gammaId}/edits HTTP/1.1
Host: public-api.gamma.app
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 102

{
  "prompt": "Change the title of the first card to Q3 Review",
  "quality": "lite",
  "disableConnectors": true
}
{
  "editId": "V1StGXR8Z5jdHi6B",
  "gammaUrl": "https://gamma.app/docs/abc123"
}

Pass a file id (g_…) to target the Gamma's main page, or a page id from a gamma.app/docs/<id> URL to target that page. Unless the prompt names another page by title or position, the edit applies to the target page. Prompts can ask to add, duplicate, reorder, rename, or archive pages; the target page is never archived. If another edit is already running on the Gamma, the API returns 409 with code edit_in_progress.

Optional pace sets how long the edit may run: standard (the default, up to 10 minutes) or relaxed (up to 20 minutes), which gives the agent more time to work on quality. Any other value, including null, returns 400. See Choose a pace.

Last updated

Was this helpful?