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.
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.
API key for authentication
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.
g_5hzkx0ivxsmd2epNatural-language instruction describing the edit.
Change the title of the first card to Q3 ReviewHow 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.
litePossible values: Opt this edit out of workspace connector access (e.g. Notion, Slack).
trueEdit job created
Unique ID for the edit job. Poll GET /v1.0/agent/edits/{editId} with it.
V1StGXR8Z5jdHi6BURL to the Gamma being edited
https://gamma.app/docs/abc123Invalid request parameters, or a Gamma that is archived, has no pages, or is of a type that cannot be edited
Invalid or missing API key
Insufficient credits, no edit permission on the Gamma, or a quality tier the plan does not include
Gamma not found
An edit is already in progress for this Gamma (code: edit_in_progress, with the running editId when it belongs to your workspace)
Rate limit exceeded, or the workspace has too many in-flight agent jobs (code: workspace_concurrency_limit_exceeded, with a Retry-After header)
The service is busy; retry the request
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"
}Related
GET /agent/edits/{editId} to poll for completion
GET /gammas/{gammaId} to confirm ids and metadata before editing
Error codes for
409and workspace concurrency errors
Last updated
Was this helpful?