Skip to main content
documents.create waits for the document to be ready and returns it, like a call to an LLM. If it takes longer than 120 seconds, the SDK keeps waiting for you.

From a sentence

Doconda writes it with AI. Any style you ask for in the sentence (“blue headings”, “with a table of contents”) is applied too.

From your text

If you already have the content in Markdown, Doconda only lays it out. It is faster and cheaper.

Which format you get

format decides the file. Word, PowerPoint and Excel also come with their PDF. If you leave it out, Doconda infers it from prompt (and if that is not clear, it fails with format_unclear without charging). Within a Word file or a PDF, Doconda decides on its own whether it is a report, a letter, a contract, a memo or minutes, and gives it the matching base layout; you describe it in prompt and adjust the look with style. doc.type tells you what it decided.

With sources

sources holds your files: documents the AI reads before writing (up to 5) and images it places inside the document (up to 10), together:
With your own Markdown (content), sources only carries images, and you place them with ![Caption](img:1).

Download the result

doc.outputs also includes the direct links (they expire after 5 minutes; documents.outputs(id) gives you new ones).

Check how it turned out

In the background

To avoid waiting in the same call (for example, from a job queue):
wait follows the document’s events and reconnects on its own if the connection drops.