Skip to main content
Assumes you have completed the quickstart.
POST /v1/convert turns a file into another format without AI, in one call. This guide covers which formats convert to which, how to read the result, what it costs and the four ways to pass the file.

Convert a file

Send the file and the target format in to. Doconda answers with the converted text or a link to the converted file.
The response is a conversion:
pages counts the pages (PDF, Word), slides (PowerPoint) or sheets (Excel) of the file you sent.

What becomes what

Any other pair is rejected with 400 conversion_not_supported, and the message lists the formats that file can become. A file that can’t be converted fails with 422 and its error code (convert_failed when nothing more specific applies).

Read the result

Where the result lands depends on to:
  • md, txt, html and csv come back in text, and output is null. Doconda deletes the result as soon as it answers, so GET /convert/{id} returns 404 not_found afterwards.
  • docx, pdf, odt, rtf, xlsx and pptx come back in output, and text is null. output.url is a download link valid 5 minutes. The file is deleted 15 minutes after it was made (expires_at); until then, GET /convert/{id} returns a fresh link.
How each format is read:
  • Word: headings, lists, tables, pictures and footnotes. Shapes, text boxes and charts don’t go into Markdown, HTML or RTF.
  • PowerPoint: one section per slide (separated by ---), the title as ##, bullets with their level, tables, pictures by their alternative text and speaker notes as a quote.
  • Excel: one table per visible sheet, with the values the cells show (formulas calculated). To CSV, only the first sheet.
  • PDF: headings, paragraphs, lists and tables rebuilt from the page; repeated headers, footers and page numbers are left out.
  • Scanned PDFs and pictures: read with OCR.
  • To PDF: documents use the same fonts Doconda uses everywhere (Calibri as Carlito, Cambria as Caladea…).

Wait for a long conversion

A call waits up to 120 s. A long scanned PDF can take minutes: then the call answers 202 with { "object": "conversion", "id", "status" }, where status is queued or running. Call GET /convert/{id} within 15 minutes to pick up the result; it also answers 202 while the conversion is still running. The SDKs’ convert() does this for you: it polls every 2 s and returns the finished conversion.

Price

The first 1,000 conversions each calendar month (UTC) are free for each organization. After that, each one costs €0.01 from your balance, whatever its number of pages (pricing).
  • Failed conversions are not charged and don’t count toward the free 1,000.
  • Past the free ones with no balance left, the call is rejected with 402 insufficient_balance.
  • A conversion doesn’t appear in the documents list and sends no webhooks.
  • Conversions count toward the limit of 120 documents per minute per organization; above it, 429 rate_limited.

Four ways to pass a file

file takes the same four forms here as file and sources in POST /documents: You can also send multipart/form-data, with the to field before the file field:
Behavior to be aware of:
  • Files are limited to 20 MB.
  • URLs must point to public addresses; private and local addresses are rejected.
  • A file sent by URL, base64 or multipart is deleted 15 minutes after the call.

From the SDK

doconda.convert(file, to) takes an uploaded file_… or doc_… ID, a URL, a local path, or bytes with a filename, and returns the finished conversion.
Bytes without a filename raise an error before any request, because the extension tells Doconda the format. Agents get the same operation as the convert_file tool in the MCP server.

Next steps

Create a document

Make a new Word, PowerPoint, Excel or PDF file from a sentence or your Markdown.

Edit a file

Change part of a file and keep the rest as it was.

API reference

Every parameter of POST /convert and GET /convert/{id}.