New organizations get €5 of free credit. This quickstart costs €0.05 + VAT per run (
quality: "fast" from your
Markdown).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
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
Replacecontent with prompt and Doconda writes the text too:
Call the API without an SDK
With plain HTTP, send anIdempotency-Key so a retried request doesn’t create the document twice:
cURL
outputs:
- If the document takes longer than 120 s, the API answers
202withstatusqueuedorrunningand nooutputs. PollGET /v1/documents/{id}untilstatusis final. - Links in
outputsexpire after 5 minutes. Store the documentidand get fresh links withGET /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.