REST API
Every AI tool and every Sheet workflow endpoint on this site is a plain JSON HTTP API underneath — the web UI is just one client of it. Base URL: https://thepaperroom.co.
Authentication
Generate an API key from your account page — the same key used for MCP access also authenticates the REST API. Send it as a bearer token on every request:
curl https://thepaperroom.co/api/auth/me \
-H "Authorization: Bearer YOUR_API_KEY"The browser app instead uses a session cookie set at login — both are accepted by every endpoint below, so you can also drive the API from a script that logs in with /api/auth/loginand reuses the returned cookie. The bearer token is simpler for server-to-server use since it doesn't expire on a schedule; regenerating it from the account page immediately invalidates the previous one.
Credits & errors
AI-backed endpoints debit a flat number of credits per call (listed below) — checked and reserved atomically before any OpenAI call is made, so a request either succeeds and debits exactly once, or fails and debits nothing. Deterministic workflow modes (aggregate, dedupe, lookup, cleanup) never call AI and never cost credits.
401— missing/invalid session or API key.402— out of AI credits.413— input exceeds the size limit for that tool.429— daily AI-call cap reached (independent of credit balance, a fixed abuse ceiling).503— AI features aren't configured on this deployment (no OpenAI key set).
Example: an AI text tool
curl https://thepaperroom.co/api/ai/grammar-check \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "this dont look write"}'
# => { "result": "This doesn't look right." }AI & text endpoints
All JSON endpoints below take POST with Content-Type: application/json and reply { "result": "…" } (or { "text": "…" } for transcribe-audio/image-ocr, { "answer": "…" } for pdf-qa). File-upload endpoints take multipart form data instead.
| Endpoint | Body | Credits |
|---|---|---|
/api/ai/summarize-pdf | { "text": "…" } | 1 |
/api/ai/pdf-qa | { "docText": "…", "question": "…", "history": [] } | 1 |
/api/ai/paraphrase | { "text": "…" } | 1 |
/api/ai/grammar-check | { "text": "…" } | 1 |
/api/ai/rewrite | { "text": "…", "instruction": "…" } | 1 |
/api/ai/transcribe-audio | multipart/form-data, field: audio | 2 |
/api/ai/image-ocr | multipart/form-data, field: image | 2 |
/api/ai/generate-formula | { "spreadsheetType": "Excel", "description": "…" } | 1 |
/api/ai/explain-formula | { "text": "…" } | 1 |
/api/ai/analyze-spreadsheet | { "preview": "tab-separated rows" } | 1 |
/api/ai/fill-spreadsheet | { "preview": "…", "description": "…" } | 2 |
/api/ai/extract-document-data | multipart/form-data, field: image | 2 |
/api/ai/extract-email-data | { "text": "raw pasted email" } | 1 |
/api/ai/cold-email | { "product": "…", "persona": "…", "goal": "…" } | 1 |
/api/ai/proposal-draft | { "client": "…", "scope": "…", "pricing": "…" } | 1 |
/api/ai/meeting-minutes | { "text": "raw notes" } | 1 |
/api/ai/sales-call-notes | { "text": "transcript" } | 1 |
/api/ai/business-card-scan | multipart/form-data, field: image | 1 |
/api/workflows/compile | { "description": "plain English", "columns": ["…"] } | 1 |
/api/workflows/test | { "mode": "…", ...mode fields, "sampleData": "tab-separated rows" } | 0, except 1 for ai_transform |
Workflow endpoints
See the workflows guide for the fields a create-workflow request needs per mode.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/workflows | List your scheduled workflows. |
| POST | /api/workflows | Create a workflow (see the workflows guide for the mode-specific fields). |
| POST | /api/workflows/test | Run a mode against pasted sample data — no live sheet access, nothing saved. See AI endpoints above for cost. |
| DELETE | /api/workflows/{id} | Delete a workflow. |
| POST | /api/workflows/{id}/run-now | Trigger an immediate run outside the schedule. |
| GET | /api/workflows/{id}/runs | List runs for one workflow. |
| GET | /api/workflows/audit-log | List every run across all your workflows. Add ?format=csv for a CSV download. |
| POST | /api/workflows/runs/{runId}/approve | Approve a run left pending_approval, applying its writes. |
| POST | /api/workflows/runs/{runId}/reject | Reject a pending run, discarding its computed changes. |
Not in this API
Client-side tools (PDF merge/split, image compress/resize, QR codes, formatters, and similar) run entirely in your browser and have no server endpoint — that's the point, your files never leave your device for those. If you need one of those transforms server-side, run it through the equivalent MCP tool that reimplements it in Go (e.g. merge-pdf), listed on the MCP page.