Autosheet API
Preview — The Autosheet API is in preview and may change. If you run into issues, contact GPT for Work support.
Use the Autosheet API to run the GPT for Sheets Agent programmatically — perform AI-driven enrichment, analysis, edits, and transformations across spreadsheets from your AI agent, workflow tool, or code.
This interactive reference requires JavaScript. The summary below covers the essentials; the full machine-readable specification is at openapi.yaml.
Base URL
https://api.autosheet.com
Authentication
All requests require an API key in the X-API-Key header. Keys are issued in the format sk_autosheet_<32 alphanumeric chars> and can be created at dashboard.gptforwork.com (sign in with Google).
Quick start
If you don't have a spreadsheet ID handy, make a copy of our sample spreadsheet — Google Sheets saves it to your Drive. Its ID is the text between /d/ and /edit in the URL.
Submit a job from your terminal:
curl https://api.autosheet.com/v1/sheets/agents \
--request POST \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <AUTOSHEET_API_KEY>' \
--data '{
"spreadsheet_id": "<YOUR_SPREADSHEET_ID>",
"prompt": "Score these leads against our scoring rules."
}'
Then poll the Agent (using the id from the response) until the top-level status is idle. The latest turn's status tells you the outcome: completed for success, or error, interrupted, or cancelled for terminal non-success states. Alternatively, include a webhook_url in the run request to be notified on completion.
Endpoints
| Method | Path | Summary |
| POST | /v1/{platform}/agents | Run agent — start a new run or add a follow-up turn |
| GET | /v1/{platform}/agents/{id} | Get agent — current status, messages and tool calls |
| POST | /v1/{platform}/agents/{id}/stop | Stop agent — cancel a running agent |
| GET | /v1/{platform}/agents/configuration | List available models for your space |
| GET | /v1/auth/verify | Verify API key — returns account info and webhook secret |
{platform} is currently sheets.
Webhooks
Provide a webhook_url when starting a run to receive a POST callback on completion. Each request carries X-Webhook-Signature: sha256=<hex> — an HMAC-SHA256 of the raw request body, keyed with your webhook secret (returned by the Verify API Key endpoint). Verify with a constant-time comparison.
Rate and spending limits
Request rate limit — 500 requests/minute per API key. Exceeded requests return 429 with X-RateLimit-* and Retry-After headers.
Concurrency limit — up to 100 active Agents per API key. Additional requests return 429; these responses do not include Retry-After, so retry after an active Agent finishes.
Spending limits — Agent runs consume credits from your space balance. Space-wide and user-specific spending limits can be set in the GPT for Work dashboard. When a limit is reached, new requests return 429.
OpenAPI specification
Full schema: openapi.yaml (OpenAPI 3.1, YAML).
LLM-friendly Markdown: llms.txt.
Support
gptforwork.com/support