PRETE PRETE WORKSAPI
Capability

Documents & data.

Create, read and reshape documents & data. Build PDFs from HTML, Markdown, images, .docx or invoice/receipt/report templates; merge, split, select, rotate, watermark and number pages; read or set metadata; read or fill forms. Convert .docx/.xlsx/.csv to Markdown, and rows of data to a spreadsheet. Extract structured JSON, summarize, or answer questions over any document with AI. Pure-JS edits run in milliseconds; rendering and AI run on the edge. Every operation is also an MCP tool — one end of the document-to-web pipeline, on the same key as web capture.

Operations

22 operations, priced each

Prices are per successful call. 1 unit = $0.002; the free tier covers 500 units a month.

POST /v1/pdf/html

HTML → PDF

Render an HTML document to a pixel-accurate PDF.

$0.01 · 5 UNITS · MCP render_html_to_pdf
POST /v1/pdf/merge

Merge

Combine two or more PDFs into one, in order.

$0.002 · 1 UNIT · MCP merge_pdfs
POST /v1/pdf/select

Select pages

Keep exactly the pages you want.

$0.002 · 1 UNIT · MCP select_pages
POST /v1/pdf/rotate

Rotate

Rotate every page by 90, 180 or 270 degrees.

$0.002 · 1 UNIT · MCP rotate_pdf
POST /v1/pdf/watermark

Watermark

Stamp a diagonal text watermark across every page.

$0.002 · 1 UNIT · MCP watermark_pdf
POST /v1/pdf/extract

Extract text

Pull clean text (and metadata) out of a PDF — for RAG, search and agents.

$0.002 · 1 UNIT · MCP extract_pdf_text
POST /v1/pdf/from-markdown

Markdown → PDF

Render Markdown to a clean, print-styled PDF — for reports and agent output.

$0.01 · 5 UNITS · MCP markdown_to_pdf
POST /v1/pdf/from-images

Images → PDF

Combine PNG/JPEG images into a PDF, one image per page.

$0.002 · 1 UNIT · MCP images_to_pdf
POST /v1/pdf/split

Split

Split one PDF into many — one file per page, or by page ranges.

$0.002 · 1 UNIT · MCP split_pdf
POST /v1/pdf/form-read

Read form

List a PDF's form fields — names, types, values and options.

$0.002 · 1 UNIT · MCP read_pdf_form
POST /v1/pdf/form-fill

Fill form

Fill a PDF's form fields from a JSON map; optionally flatten.

$0.002 · 1 UNIT · MCP fill_pdf_form
POST /v1/pdf/number

Page numbers

Stamp page numbers on every page — position, start value and format are yours.

$0.002 · 1 UNIT · MCP number_pdf
POST /v1/pdf/info

PDF info

Read a PDF's metadata and structure — title, author, page count and size.

$0.002 · 1 UNIT · MCP pdf_info
POST /v1/pdf/metadata

Set metadata

Set a PDF's title, author, subject, keywords or creator.

$0.002 · 1 UNIT · MCP set_pdf_metadata
POST /v1/docx/text

DOCX → text

Extract clean text from a Word .docx — for RAG, search and agents.

$0.002 · 1 UNIT · MCP docx_to_text
POST /v1/docx/pdf

DOCX → PDF

Convert a Word .docx into a clean, print-styled PDF.

$0.01 · 5 UNITS · MCP docx_to_pdf
POST /v1/data/spreadsheet

Data → spreadsheet

Turn rows of JSON into a downloadable XLSX or CSV — the generation mirror of File → Markdown.

$0.002 · 1 UNIT · MCP data_to_spreadsheet
POST /v1/file/markdown

File → Markdown

Convert a Word (.docx), Excel (.xlsx) or CSV file into clean Markdown — for RAG, agents and pipelines.

$0.002 · 1 UNIT · MCP file_to_markdown
POST /v1/document

Generate document

Render a branded PDF from a named template — invoice, receipt or report. Money computed for you.

$0.01 · 5 UNITS · MCP render_document
POST /v1/extract

Extract data

Name the fields you want — from a URL, PDF or Office file (.docx/.xlsx/.csv) — and get them back as structured JSON.

FROM $0.02 · 10–40 UNITS BY INPUT SIZE · MCP extract_data
POST /v1/summarize

Summarize

AI summary of a web page, PDF, Office file or raw text — grounded, no fabrication.

VARIES · 10–40 UNITS BY INPUT SIZE · MCP summarize_document
POST /v1/answer

Answer from document

Ask a question and get an answer grounded ONLY in a URL, PDF, Office file or text.

VARIES · 10–40 UNITS BY INPUT SIZE · MCP answer_from_document

Full price table · Every parameter, in the interactive reference

Quickstart

From curl

# Merge two PDFs ($0.002)
curl https://api.preteworks.com/v1/pdf/merge \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F files=@a.pdf -F files=@b.pdf -o merged.pdf

# Render HTML to a PDF ($0.01)
curl https://api.preteworks.com/v1/pdf/html \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: text/html" \
  --data-binary '<h1>Invoice #123</h1>' -o invoice.pdf

From an AI agent instead? Add the MCP server — the same operations appear as tools.