Crear un documento
Crea, revisa o edita un documento, en modo directo, stream o background.
Authorizations
Authorization: Bearer ak_eu_…. The prefix is the project's region and must match the server (api.eu / api.us).
Headers
Strongly recommended on POST (the SDK always sends one). 24 h, per organization.
Query Parameters
Validate without creating anything.
Body
create, review, edit, extract A name to find it later ("Contrato piso Malasaña"). It also names the downloaded files.
1 - 200The file you want. docx → Word (with a PDF too), pdf → only the PDF, pptx → PowerPoint (with a PDF), xlsx → Excel (with a PDF). artifact → a web page that keeps data (in each visitor's browser, or shared by everyone), on a signed link; with store: false, a page to download (see the artifacts guide). Without it, Doconda works it out from prompt.
docx, pdf, pptx, xlsx, artifact What to write (create) or what to change (edit). Uses a model.
3 - 8000Your own text, in Markdown (create; for an artifact, the content of its page).
The look, in your own words: "blue centred headings, Lora font, with a cover page and a table of contents". What can't be done is listed in style_unsupported.
1 - 1000create: your files for the document. Documents (Word, PowerPoint, Excel, PDF, also .doc/.ppt/.xls, TXT, Markdown; up to 5) are material to write from, with prompt. Pictures (PNG, JPEG, GIF, WebP; up to 10) go into the document: with prompt the AI places them where they fit; with content, point to them from the Markdown as  (the first picture in sources). If the request asks to copy the look of one of them ("with the design of our template"), Doconda uses it as the design: a PowerPoint for a presentation is its template at any quality; anything else needs best.
15A file uploaded with POST /files.
^file_review / edit / extract: the file to work on. review and edit take Word, PowerPoint, Excel or PDF, also .doc, .ppt and .xls (they come back as .docx, .pptx and .xlsx).
^file_create / edit: fast, standard or best (see Quality), or auto to let Doconda choose. Each level has its own price.
auto, fast, standard, best With quality: "auto": the highest level Doconda may choose, to cap the price.
fast, standard, best Answer with text/event-stream on this connection.
Answer 202 at once; follow with GET, /events or webhooks.
Artifacts only. Without it: shared, or local in a project that stores nothing.
false: 15 minutes after it finishes Doconda deletes the files, the request, the report and the events. Only what billing needs stays (status, format, pages, cost).
Response
Direct mode: the finished document with its download links. Stream mode: text/event-stream of DocumentEvent. Dry run: DryRunResult.
- Option 1
- Option 2
^doc_[0-9A-HJKMNP-TV-Z]{26}$"document"The name you gave it (name when creating it).
create, review, edit, extract The file you want. docx → Word (with a PDF too), pdf → only the PDF, pptx → PowerPoint (with a PDF), xlsx → Excel (with a PDF). artifact → a web page that keeps data (in each visitor's browser, or shared by everyone), on a signed link; with store: false, a page to download (see the artifacts guide). Without it, Doconda works it out from prompt.
docx, pdf, pptx, xlsx, artifact What Doconda decided the document is. It sets the default look (a contract: serif, justified, numbered clauses; a letter: no page numbers). You don't choose it: say what you want in prompt, and the look in style.
report, letter, contract, memo, minutes, presentation, spreadsheet, artifact manual: a version someone edited by hand in the editor (POST /documents/{id}/versions).
prompt, content, manual The professional sector Doconda recognised in the request (legal, healthcare, accounting…). Its guide shapes the structure and conventions; what you say or send always wins.
The document this version was edited from.
^doc_[0-9A-HJKMNP-TV-Z]{26}$queued, running, ready, ready_with_warnings, needs_review, failed, canceled -9007199254740991 <= x <= 9007199254740991false: its content is deleted 15 minutes after it finishes.
The path Doconda chose to make the file, and why. fast: the AI writes the text and Doconda lays it out (seconds). agent: an AI agent writes the program that builds the file, looks at the pages and fixes them (30 s – 2 min; any design, comments, tracked changes, formulas and charts). Doconda always chooses.
create and edit: the quality level asked for and the one used, which sets the price.
Artifacts only: where the page keeps its data.
When its files, request, report and events were deleted (store: false).
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$Present once finished.