Why it matters for generated documents
- Models don’t return binary files reliably. They produce text or JSON, and another step turns it into a file.
- The record drives the application. Status, page count and links let the application decide without opening the document.
- Agents need summaries, not files. Returning the whole file to an agent wastes its context; a link and a short summary are enough.
- Extraction is the reverse path. Reading a file’s content as text, for example Markdown, turns file output back into something a model can use.
Structured and file output in Doconda
Every document is a JSON object with itsstatus, pages, quality and style_applied, and, once finished, its files
in outputs: the Word file and its PDF, plus one preview per page, for example. Each output’s url is a signed link
valid for 5 minutes; get fresh ones with GET /documents/{id}/outputs.
The SDK tools return only a short summary with status and links, so the agent’s context stays small. For the reverse
path, POST /v1/convert with to: "md", txt, html or csv returns the content in text, in the response itself.
Related
Quickstart
See a document’s JSON and download its files.
What is tool calling
How a model requests structured actions.
What is Markdown
The text format models read and write best.
Convert a file
Turn a file back into text.