API

JSON in, bytes or JSON out. One key, no OAuth dance, no SDK required. Every response carries the credits it used.

Authentication

Send your key in the X-API-Key header. Keys are created in the dashboard, shown once, and up to three can be active at a time.

curl -X POST https://api.docufinery.com/api/v1/render \
  -H "X-API-Key: dk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"markup": "# Invoice", "format": "md"}' \
  --output invoice.pdf

Operations

Everything below is live. Credit costs are the ones the server charges.

What it doesEndpointCredits
Render markup to PDFPOST /api/v1/render1 per document, +1 per 10 pages over 10
Render many documentsPOST /api/v1/render/batch1 per document, failures refunded
Render a stored templatePOST /api/v1/render/from-template1 per document
Merge PDFsPOST /api/v1/pdf/merge1 per operation
Split a PDFPOST /api/v1/pdf/split1 per operation, returns a ZIP
Compress a PDFPOST /api/v1/pdf/compress1 per operation
Rotate pagesPOST /api/v1/pdf/rotate1 per operation
Watermark pagesPOST /api/v1/pdf/watermark1 per operation
Reorder pagesPOST /api/v1/pdf/reorder1 per operation
Extract pagesPOST /api/v1/pdf/extract-pages1 per operation
Unlock a PDFPOST /api/v1/pdf/unlock1 per operation, password required
Strip metadataPOST /api/v1/metadata/strip1 per operation
Redact text, patterns or regionsPOST /api/v1/redact2 per operation
Inspect metadataPOST /api/v1/metadata/inspectfree, no API key
Parse a document to markdownPOST /api/v1/parse1 per 10 text pages, 1 per OCR page
Parse many documentsPOST /api/v1/parse/batchsame rates, failures refunded
Convert a documentPOST /api/v1/convert1 per document
Convert one small documentPOST /api/v1/convert/freefree, no API key
Extract tables from a PDFPOST /api/v1/tables3 per table-bearing page
Find the tables and the price firstPOST /api/v1/tables/detectfree, no API key
Capture a URL as evidencePOST /api/v1/capture1, or 5 retained with a timestamp and manifest
Verify a captureGET /api/v1/capture/{id}/verifyfree, no API key
Capture a URL repeatedlyPOST /api/v1/capture/schedulepriced per capture
Read a web pagePOST /api/v1/extract1 per page
Read one page, truncatedPOST /api/v1/extract/previewfree, no API key
Clean a spreadsheetPOST /api/v1/spreadsheet/clean2 plus 1 per 500 rows
Preview what cleaning would changePOST /api/v1/spreadsheet/previewfree, no API key
Turn a chat or mail export into an archivePOST /api/v1/archive2 per export
Get a YouTube transcriptPOST /api/v1/youtube1 per video
Get a transcript, truncatedPOST /api/v1/youtube/previewfree, no API key
Store, list, update, delete templates/api/v1/templatesfree

Errors

Every error returns the same body shape, so one handler covers all of them. These codes are stable: changing one is a breaking API change.

{"error": {"code": "too_many_pages", "message": "...", "limit": 500, "got": 912}}
CodeHTTP
missing_api_key401
invalid_api_key401
invalid_input422
insufficient_credits402
unsupported_format422
too_large413
too_many_pages422
render_failed500
rate_limited429
not_found404
internal_error500

Limits

Checked before any work starts, so an over-limit request costs nothing rather than failing halfway through and being refunded.

LimitValue
Maximum upload size100 MB
Maximum pages per request500
Requests per minute (sync)60
Requests per minute (batch)10
Concurrent requests per key (sync)5
Concurrent requests per key (batch)2

Machine-readable

These exist so a client generator, or an agent, can read the API without a human in the loop.

Cost

Credits are bought once and never expire, and a failed operation is refunded automatically. Packs and what each operation costs.