Skip to main content
This guide shows you how to turn a short Markdown text into a styled Word file and its PDF, and save both to disk.
New organizations get €5 of free credit. This quickstart costs €0.05 + VAT per run (quality: "fast" from your Markdown).
Coding with Claude Code, Cursor or Codex? Install the Doconda skill first: npx skills add B-C-Software/doconda-skills.
1

Create an API key

In the dashboard, go to API keys and create a key. It starts with ak_eu_ and gives access to every document in the project, so keep it on the server. Store it in an environment variable:
2

Install the SDK

3

Create the document

Create a file named example.py (or example.ts) and add the following code:
4

Run it

After about a minute you should see the document ID, its status and its page count:
leave-request.docx and leave-request.pdf are now in the folder. The style is set on the Word styles (Normal, Heading 1…), so the file keeps its look when someone edits it.
create() waits until the document finishes, however long it takes. A document that fails returns status: "failed" instead of raising, and is not charged.

Choose the quality level

quality sets how much work the AI agent puts in, and the price: Without quality, Doconda uses auto: a Markdown document gets standard, and a prompt gets the level it needs. See quality levels.

Write it from a sentence

Replace content with prompt and Doconda writes the text too:

Call the API without an SDK

With plain HTTP, send an Idempotency-Key so a retried request doesn’t create the document twice:
cURL
The call waits up to 120 s and returns the document with its links in outputs:
Behavior to be aware of:
  • If the document takes longer than 120 s, the API answers 202 with status queued or running and no outputs. Poll GET /v1/documents/{id} until status is final.
  • Links in outputs expire after 5 minutes. Store the document id and get fresh links with GET /v1/documents/{id}/outputs.

Next steps

Adjust the style

Describe fonts, colours, margins and a cover page in free text.

Edit a file

Change an existing document and keep the rest.

Run in the background

Answer at once and get a webhook when it’s ready.

API reference

Every field of POST /v1/documents.