Skip to main content
To let users edit the documents your AI agent generates, create the file with the Doconda API and open it on your site with the editor plugin (@doconda/editor). The agent writes the Word, PowerPoint or Excel file; the user touches it up in their browser without leaving your product; and you save it as a new version of the document.

Steps

  1. Create an API key in the dashboard (API keys) and store it in DOCONDA_API_KEY. Install the SDK on your server: npm install @doconda/sdk.
  2. Get the editor plugin (Billing → Editor plugin, with a 7-day free trial) and install it with the command from the dashboard (it needs React 19 or later):
  1. On your server, create the document:
  1. Serve it from a route of yours. The links in doc.outputs don’t work as src: the browser can’t read them from your site and they expire after 5 minutes. Download the file on the server:
  1. In the browser, open it in the editor. The link has no extension, so pass format:
  1. When the user is done, save it in Doconda as a new version (with its review, PDF and change report):
The API key stays on your server, never in the browser. Check there too that the user may edit that document.

Why this way

  • The agent doesn’t have to get it perfect the first time: the user fixes what’s missing in a full Word editor.
  • Whatever the editor does not touch is saved as is: styles, charts or notes are not lost.
  • A hand-edited version uses no AI and isn’t charged. See Edit.

FAQ

Yes. Create the document with format: "pptx" or "xlsx", download it in that format and pass the same format to the editor.
Yes: if you already have the bytes in the browser (for example, from a response from your API), pass them with file.
Add readOnly. See DOCX viewer for React.
Yes: the editor plugin is purchased separately from the API, per organization, with unlimited documents and users. See licence and domains.

Keep reading