Skip to main content
Install @doconda/sdk and call documents.create with format: "docx" and what you want in prompt. Doconda writes the content, applies any style you ask for in the same sentence and returns an editable .docx plus its PDF, with no templates or layout code.

Generate the document

  1. Create an API key in the dashboard, under API keys, and store it in DOCONDA_API_KEY.
  2. Install the SDK (Node.js 20 or later; its only runtime dependency is zod): npm install @doconda/sdk.
  3. Create a file named example.mjs with the following code:
example.mjs
  1. Run it with node example.mjs.
You should see something like ready report standard, and report.docx and report.pdf on disk. documents.create waits until the document finishes, like a call to an LLM, even past the API’s 120 s direct-call limit.

What you get back

  • An editable .docx: the look lives in the Word styles, and the layout fits the kind of document (doc.type: report, letter, contract, memo or minutes).
  • Its PDF, and doc.outputs with direct links. They expire after 5 minutes; documents.outputs(id) gives new ones.
  • doc.status: ready, or failed with doc.error saying why. A failed document isn’t charged.

Price and time

With quality: "auto" (the default), Doconda picks the level the request needs and, when in doubt, the cheaper one. If your model already wrote the text, pass it in content: { markdown } instead: Doconda only lays it out, for €0.20 at standard. Behavior to be aware of:
  • Use the SDK on your server, never in the browser: the API key gives access to every document in its project.
  • If you leave out format and the prompt doesn’t make the file type clear, it fails with format_unclear and isn’t charged.
  • With auto, your balance must cover the highest level Doconda may pick, or the call fails with 402 insufficient_balance. Set max_quality: "standard" to cap it.

FAQ

Yes, on Node.js 20 or later. Set the function’s timeout to a few minutes, or create with createInBackground and receive a webhook when it finishes.
Yes. Create with createInBackground, then read documents.events(id): it yields each step as it happens. See Events.
Yes, with the same methods in snake_case: pip install doconda. See Python SDK.
For every method, see Create documents in the TypeScript SDK.