docsmith / v0.2

Documents in. Markdown, text, pixels and clean images out.

A small HTTP API for the boring half of document work: turn a PDF into Markdown that a retrieval pipeline can actually chunk, pull the raw text, render pages to PNG or JPEG, and convert or shrink images. No models, no queues, no per-page surprises. One request, one answer.

Endpoints

endpointwhat it does
POST /v1/pdf/markdownMarkdown with heading levels, rejoined paragraphs, normalised lists and page boundaries. Returns the heading outline as JSON too.
POST /v1/pdf/textExtract text, optionally layout-preserving and page-ranged.
POST /v1/pdf/infoPage count, page size, encryption, title.
POST /v1/pdf/imagesRender pages to PNG or JPEG at 72-300 dpi. One page returns an image, several return a zip.
POST /v1/image/convertJPEG, PNG, WebP or GIF, with resize, quality and metadata stripping.
GET /healthzLiveness plus which engines are present.
GET /openapi.jsonOpenAPI 3.0 description, importable into any client or marketplace.

Call it

curl -sS -X POST "$BASE/v1/pdf/markdown" \
  -H "X-API-Key: $DOCSMITH_KEY" \
  -F "file=@manual.pdf" -F "pages=1-20" | jq -r .markdown

curl -sS -X POST "$BASE/v1/pdf/text" \
  -H "X-API-Key: $DOCSMITH_KEY" \
  -F "file=@contract.pdf" \
  -F "pages=1-2"

curl -sS -X POST "$BASE/v1/pdf/images" \
  -H "X-API-Key: $DOCSMITH_KEY" \
  -F "file=@deck.pdf" -F "dpi=150" -F "format=png" -o page.zip

curl -sS -X POST "$BASE/v1/image/convert" \
  -H "X-API-Key: $DOCSMITH_KEY" \
  -F "file=@photo.jpg" -F "format=webp" -F "max_width=1600" -o photo.webp

What "Markdown" means here

Structure is recovered from the layout, not from a language model, so it is the same output every time and it costs the same per page as the raw text. The rules:

Pricing

planrequests / monthpricenotes
Free100$0Same endpoints, 20MB uploads.
Starter5,000$9Email support, 99% target.
Pro50,000$39Highest render dpi, priority queue.

Calls that fail validation are not counted. A successful response carries X-Quota-Remaining and X-Quota-Reset.

What it does not do