# SuperDocs ## Docs - [Account Setup](https://docs.superdocs.app/account/account-setup.md): Create a SuperDocs account, verify your email, and manage your profile. - [API Keys](https://docs.superdocs.app/account/api-keys.md): Create, manage, and revoke API keys for programmatic access to SuperDocs. - [Billing](https://docs.superdocs.app/account/billing.md): Upgrade your plan, manage your subscription, and cancel from the SuperDocs Settings page. - [MCP Setup](https://docs.superdocs.app/account/mcp-setup.md): Generate an MCP key from the SuperDocs Settings page and connect your AI tool. - [Plans & Usage](https://docs.superdocs.app/account/plans-and-usage.md): Subscription tiers, operation limits, what counts as an operation, and how to track usage. - [Cancel Subscription Endpoint](https://docs.superdocs.app/api-reference/billing/cancel-subscription-endpoint.md): Cancel the current subscription at end of billing period. - [Create Checkout](https://docs.superdocs.app/api-reference/billing/create-checkout.md): Create a checkout session to upgrade your subscription. - [Get Portal](https://docs.superdocs.app/api-reference/billing/get-portal.md): Get a URL to the customer billing portal. - [Health Check Deep](https://docs.superdocs.app/api-reference/health-check-deep.md): Deep health check that verifies the job queue, AI workflow state store, and database are all responsive within a bounded time budget. Used by container orchestrators as a liveness probe to distinguish "process alive and TCP listening" (what /health reports) from "application is actually serving requ… - [Verify the SuperDocs MCP server is reachable and serving traffic.](https://docs.superdocs.app/api-reference/mcp/verify-the-superdocs-mcp-server-is-reachable-and-serving-traffic.md): Returns 200 with {"status":"healthy"} when the API is up. Call this once after MCP install to confirm the connection works before invoking other tools. No authentication required. - [Oauth Authorization Server](https://docs.superdocs.app/api-reference/oauth-authorization-server.md) - [Oauth Authorization Server](https://docs.superdocs.app/api-reference/oauth-authorization-server-1.md) - [Oauth Authorization Server](https://docs.superdocs.app/api-reference/oauth-authorization-server-2.md) - [Oauth Protected Resource](https://docs.superdocs.app/api-reference/oauth-protected-resource.md) - [Oauth Protected Resource](https://docs.superdocs.app/api-reference/oauth-protected-resource-1.md) - [Oauth Protected Resource](https://docs.superdocs.app/api-reference/oauth-protected-resource-2.md) - [Openid Configuration](https://docs.superdocs.app/api-reference/openid-configuration.md) - [Openid Configuration](https://docs.superdocs.app/api-reference/openid-configuration-1.md) - [Openid Configuration](https://docs.superdocs.app/api-reference/openid-configuration-2.md) - [List My Promotions](https://docs.superdocs.app/api-reference/promo/list-my-promotions.md): List the authenticated user's promotion redemptions, split into `active` (drawable now) and `history` (exhausted / expired / revoked). - [Redeem Promo](https://docs.superdocs.app/api-reference/promo/redeem-promo.md): Redeem a promo code and add the granted operations to the authenticated user's account. - [Root](https://docs.superdocs.app/api-reference/root.md) - [Get a pre-signed URL to download an exported document without proxying through the agent.](https://docs.superdocs.app/api-reference/uploads/get-a-pre-signed-url-to-download-an-exported-document-without-proxying-through-the-agent.md): Returns a short-lived (15-minute) GET URL plus a curl example. **If you have shell access (Bash tool), execute the returned `curl_example` yourself to download the file to the user's working directory — do NOT paste the curl command back to the user expecting them to run it manually. Only fall back… - [Get a pre-signed URL to upload large files (.docx/PDF/HTML/MD/RTF) without bloating agent context.](https://docs.superdocs.app/api-reference/uploads/get-a-pre-signed-url-to-upload-large-files-docxpdfhtmlmdrtf-without-bloating-agent-context.md): Returns a short-lived (5-minute) PUT URL plus a curl example. **If you have shell access (Bash tool), execute the returned `curl_example` yourself to push the file directly to cloud storage — do NOT paste the curl command back to the user expecting them to run it manually. Only fall back to returnin… - [Parse an uploaded file into structured HTML with chunk IDs for targeted AI editing.](https://docs.superdocs.app/api-reference/uploads/parse-an-uploaded-file-into-structured-html-with-chunk-ids-for-targeted-ai-editing.md): Fetches the file uploaded via request_upload_url and runs the same parsing pipeline as upload_document_base64. Returns structured HTML with unique chunk IDs on every paragraph, heading, table, row, and cell — enabling the AI to make targeted structural edits via chat ("remove row 3 of the pricing ta… - [Check User Limits](https://docs.superdocs.app/api-reference/users/check-user-limits.md): Check current usage limits and remaining operations - [Create Api Key](https://docs.superdocs.app/api-reference/users/create-api-key.md): Create a new API key for the current user. - [Delete User Session](https://docs.superdocs.app/api-reference/users/delete-user-session.md): Delete a specific chat session - [Get Current User Profile](https://docs.superdocs.app/api-reference/users/get-current-user-profile.md): Get current user's profile information - [Get User Sessions](https://docs.superdocs.app/api-reference/users/get-user-sessions.md): List all chat sessions for current user - [Get User Usage Stats](https://docs.superdocs.app/api-reference/users/get-user-usage-stats.md): Get detailed usage statistics for current user - [List Api Keys](https://docs.superdocs.app/api-reference/users/list-api-keys.md): List all API keys for the current user (masked). - [Revoke Api Key](https://docs.superdocs.app/api-reference/users/revoke-api-key.md): Revoke (soft delete) an API key. - [Update User Profile](https://docs.superdocs.app/api-reference/users/update-user-profile.md): Update current user's profile - [Approve or deny AI-proposed document changes one-by-one or in batch (HITL workflow).](https://docs.superdocs.app/api-reference/v1/approve-or-deny-ai-proposed-document-changes-one-by-one-or-in-batch-hitl-workflow.md): Used with chat_async when approval_mode='ask_every_time'. For each proposed change (with chunk_id and HTML diff), respond approved=true|false plus optional feedback for the AI to revise on. Approved changes apply atomically; denied changes are discarded; the AI may revise based on feedback in the ne… - [Cancel a pending or in-progress async chat job.](https://docs.superdocs.app/api-reference/v1/cancel-a-pending-or-in-progress-async-chat-job.md): Stops the AI mid-edit. Already-applied changes are preserved in the document; pending changes are discarded. Use to abort long-running operations that are no longer needed (e.g., user changed their mind, or you want to retry with different parameters or model_tier). Only jobs with status pending or… - [Check processing status of all attachments in a session.](https://docs.superdocs.app/api-reference/v1/check-processing-status-of-all-attachments-in-a-session.md): Returns each attachment's processing state (pending/processing/completed/failed) plus extracted text length and chunk count once ready. Poll this after upload_attachment_base64 to know when an attachment becomes queryable by the AI. Surfaces processing errors with actionable messages. - [Delete a saved document template by ID.](https://docs.superdocs.app/api-reference/v1/delete-a-saved-document-template-by-id.md): Soft-deletes the template; only the owner (user or organization) can delete. Once deleted, the template no longer appears in list_user_templates and cannot be referenced by the AI for new documents. Existing documents already drafted from the template are unaffected. - [Edit, draft, or restructure a document using natural language. Preserves tables, styling, and formatting.](https://docs.superdocs.app/api-reference/v1/edit-draft-or-restructure-a-document-using-natural-language-preserves-tables-styling-and-formatting.md): Synchronous AI chat that can rewrite specific paragraphs, add or remove table rows, restructure sections, generate new content from templates, or transform an entire document. Pass document_html to give the AI context. Returns AI response text plus structural document changes (HTML edits, additions,… - [Export the current document as a styled .doc, .docx, .pdf, or .html file with full fidelity.](https://docs.superdocs.app/api-reference/v1/export-the-current-document-as-a-styled-doc-docx-pdf-or-html-file-with-full-fidelity.md): Round-trips the document through the original docx renderer, preserving tables, borders, shading, alternating row colors, headers, footers, fonts, inline styling, and embedded images. Two modes: pass html directly to export ad-hoc content, OR pass session_id to export the session's current state. Fo… - [Get the status, partial results, and any pending changes for an async chat job.](https://docs.superdocs.app/api-reference/v1/get-the-status-partial-results-and-any-pending-changes-for-an-async-chat-job.md): Returns the job's current state (pending, in_progress, awaiting_approval, completed, failed, or cancelled), intermediate AI responses streamed during execution, the final document HTML once complete, and any pending changes awaiting user approval (with chunk IDs and proposed HTML diffs in metadata.p… - [List all async chat jobs for a specific session, most recent first.](https://docs.superdocs.app/api-reference/v1/list-all-async-chat-jobs-for-a-specific-session-most-recent-first.md): Returns the full job history of one document. Useful for auditing what the AI did to a document over time, or finding a specific job that's waiting for HITL approval. Same shape as list_jobs but scoped to one session. - [List all saved document templates available to the user or organization.](https://docs.superdocs.app/api-reference/v1/list-all-saved-document-templates-available-to-the-user-or-organization.md): Returns active (non-deleted) templates with name, format, size, and creation date metadata. Use to show the AI what reusable document structures are available for drafting new documents. Templates are scoped to the authenticated entity: users via the web app or sk_ key see only their own templates;… - [List your active document editing sessions to resume or audit prior work.](https://docs.superdocs.app/api-reference/v1/list-your-active-document-editing-sessions-to-resume-or-audit-prior-work.md): Returns sessions sorted by most recent activity, with message counts and last-updated timestamps. Each session represents one document with full edit history and AI conversation persisted server-side. Use to find a previous editing context to resume (then call get_session_history) or to audit your w… - [List your async chat jobs (in-progress, awaiting approval, completed, failed).](https://docs.superdocs.app/api-reference/v1/list-your-async-chat-jobs-in-progress-awaiting-approval-completed-failed.md): Returns jobs sorted by most recent, optionally filtered by status. Use to monitor long-running AI edits started via chat_async, see which jobs are paused waiting for human approval, or audit completed work. Each job tracks the chat that started it, the changes made, and any HITL decisions logged. - [Poll Session Updates](https://docs.superdocs.app/api-reference/v1/poll-session-updates.md): Long-poll for real-time job updates on a session (B2B organizations only). - [Remove an attachment from a session or cancel its in-progress processing.](https://docs.superdocs.app/api-reference/v1/remove-an-attachment-from-a-session-or-cancel-its-in-progress-processing.md): Removes the attachment from the session; the AI will no longer reference it in subsequent chat turns. If processing is still in progress, also cancels the underlying job. Use to free up context, remove sensitive files mid-session, or replace a stale reference document. The attachment_id can be eithe… - [Restore the full conversation and document state for a previous session.](https://docs.superdocs.app/api-reference/v1/restore-the-full-conversation-and-document-state-for-a-previous-session.md): Returns complete message history (user and AI), final document HTML with chunk IDs preserved, attachment list, and editor actions (font, color, alignment changes). Use to continue editing a document you started in a prior session. The AI rehydrates with full context of all prior decisions, chunk IDs… - [Rewind a chat session to before a specific user message — restores both the document and the conversation in one call.](https://docs.superdocs.app/api-reference/v1/rewind-a-chat-session-to-before-a-specific-user-message-—-restores-both-the-document-and-the-conversation-in-one-call.md): Rewinds a chat session to the state immediately before a specific user message. The document, conversation history, and supporting context all snap back to that point. The text of the reverted message is returned (compose_text) so the caller can edit and resend it. Messages from the reverted turn fo… - [Save a document template (NDA, contract, SOP, letterhead) for reuse across sessions.](https://docs.superdocs.app/api-reference/v1/save-a-document-template-nda-contract-sop-letterhead-for-reuse-across-sessions.md): Templates persist across sessions and can be referenced by the AI when drafting new documents (e.g., "draft an NDA using my standard template"). Stored at user or organization scope. Ideal for boilerplate, branded letterheads, recurring document structures, or compliance-required templates. Supports… - [Start a long-running or HITL-approved AI edit; returns a job_id to poll for results.](https://docs.superdocs.app/api-reference/v1/start-a-long-running-or-hitl-approved-ai-edit;-returns-a-job_id-to-poll-for-results.md): Use instead of chat when (a) the edit is large or multi-step, (b) you need human approval on each proposed change before it applies (set approval_mode='ask_every_time'), or (c) you can't afford to block on a synchronous response. Returns a job_id immediately. Poll get_job to track progress and retri… - [Stream Chat Progress](https://docs.superdocs.app/api-reference/v1/stream-chat-progress.md): Stream real-time progress for a chat job using Server-Sent Events (SSE). - [Upload a reference file (PDF/DOCX/image) for the AI to query while editing.](https://docs.superdocs.app/api-reference/v1/upload-a-reference-file-pdfdocximage-for-the-ai-to-query-while-editing.md): Files are processed asynchronously and become AI-searchable once ready. The AI can then reference the attachment's content during chat (e.g., "rewrite section 3 to match the style guide PDF I attached"). Images are queryable via multimodal vision. Poll get_attachment_status to know when ready. Disti… - [Upload Attachment](https://docs.superdocs.app/api-reference/v1/upload-attachment.md): Upload a document attachment to a session for AI reference. - [Upload Document To Editor](https://docs.superdocs.app/api-reference/v1/upload-document-to-editor.md): Upload a document file and load it into the editor. - [Upload .docx/PDF/HTML/MD/RTF as the active editable document with chunk-ID structural editing.](https://docs.superdocs.app/api-reference/v1/upload-docxpdfhtmlmdrtf-as-the-active-editable-document-with-chunk-id-structural-editing.md): Parses the file into structured HTML where every paragraph, heading, table, row, and cell has a unique chunk ID, enabling the AI to make targeted structural edits via chat ("remove row 3 of the pricing table" works). Tables, borders, shading, alternating row colors, fonts, and inline styling are pre… - [Upload User Template](https://docs.superdocs.app/api-reference/v1/upload-user-template.md): Upload a document file as a personal/organization template. - [Attachments](https://docs.superdocs.app/concepts/attachments.md): Upload PDF, DOCX, HTML, text, and image files to give the AI additional context or load them into the editor. - [Documents](https://docs.superdocs.app/concepts/documents.md): Load documents from files, edit them with AI, create new ones from scratch, and export as Word files. - [Sessions](https://docs.superdocs.app/concepts/sessions.md): Sessions persist conversation history and document state across requests. You choose the session ID. - [Templates](https://docs.superdocs.app/concepts/templates.md): Upload reusable document templates that the AI can search and apply when creating content. - [Error Codes](https://docs.superdocs.app/errors/error-codes.md): HTTP status codes, error response format, and common error scenarios for the SuperDocs API. - [Rate Limits](https://docs.superdocs.app/errors/rate-limits.md): Operation limits per subscription tier, overage pricing, and how to handle 429 responses. - [curl Examples](https://docs.superdocs.app/examples/curl.md): Copy-paste ready curl commands for every key SuperDocs API operation. - [JavaScript Examples](https://docs.superdocs.app/examples/javascript.md): Complete working JavaScript examples for the SuperDocs API using fetch and EventSource. - [Python Examples](https://docs.superdocs.app/examples/python.md): Complete working Python examples for the SuperDocs API using the requests library. - [Features](https://docs.superdocs.app/features.md): Comprehensive capability reference for SuperDocs — every shipped feature, grouped by what you'd reach for it for. - [Agent Tool Integration](https://docs.superdocs.app/guides/agent-tool-integration.md): Register SuperDocs as a tool in your existing AI agent's tool registry — OpenAI function-calling, Anthropic tool_use, LangChain, LlamaIndex, or any function-calling-compatible framework. Your AI is the consumer; SuperDocs is the document-editing capability it can call. - [AI-to-AI Integration](https://docs.superdocs.app/guides/ai-to-ai.md): Connect your AI agent to SuperDocs for autonomous document editing without a browser. - [Async Jobs](https://docs.superdocs.app/guides/async-jobs.md): Use async chat requests with job polling for long-running operations and background processing. - [Editor Integration](https://docs.superdocs.app/guides/editor-integration.md): Make any rich-text editor round-trip SuperDocs document IDs, so surgical edits work reliably. Drop-in snippets for ProseMirror, TipTap, Slate, Lexical, Quill, and CKEditor 5. - [Human-in-the-Loop](https://docs.superdocs.app/guides/human-in-the-loop.md): Review and approve AI-proposed document changes before they're applied, using the HITL approval workflow. - [Integration Starter Prompt](https://docs.superdocs.app/guides/integration-starter-prompt.md): Paste this into your coding agent to integrate SuperDocs into any product, in any stack, with any architecture. Target fill time: under 5 minutes. - [Model Selection](https://docs.superdocs.app/guides/model-selection.md): Choose from four AI model tiers and three thinking depths to balance speed, capability, and cost. - [Server Integration](https://docs.superdocs.app/guides/server-integration.md): Use SuperDocs from a backend service with no UI — batch document processing, queue workers, scheduled jobs, document workflows. No frontend, no SSE consumer, no human approval needed. - [SSE Streaming](https://docs.superdocs.app/guides/streaming.md): Stream real-time progress updates from the AI using Server-Sent Events (SSE). - [Overview](https://docs.superdocs.app/introduction/overview.md): SuperDocs is an AI document editing platform. Edit, create, search, and manage documents through a REST API or MCP. - [Quickstart](https://docs.superdocs.app/introduction/quickstart.md): Get your API key and make your first SuperDocs API call in under 5 minutes. - [Available Tools](https://docs.superdocs.app/mcp/available-tools.md): All 22 MCP tools available when connecting to the SuperDocs MCP server. - [Claude Code](https://docs.superdocs.app/mcp/claude-code.md): Connect SuperDocs to Claude Code (CLI) with a single command. - [Claude Desktop](https://docs.superdocs.app/mcp/claude-desktop.md): Step-by-step guide to connect SuperDocs to Claude Desktop via MCP. - [Cursor & VS Code](https://docs.superdocs.app/mcp/cursor-vscode.md): Connect SuperDocs to Cursor, VS Code, or Windsurf via MCP configuration. - [SuperDocs Plugin](https://docs.superdocs.app/mcp/plugin.md): The official Claude Code plugin — single install bundles 22 MCP tools, 4 workflow prompts, and the auto-loading skill. - [MCP Overview](https://docs.superdocs.app/mcp/setup.md): Connect AI tools like Claude Desktop, Cursor, and VS Code to SuperDocs using the Model Context Protocol (MCP). ## OpenAPI Specs - [openapi](https://docs.superdocs.app/openapi.json)