/// EXTRACT
2 credits

PDF to Chunks API — chunk a PDF for retrieval-augmented generation

Heading-aware, table-safe chunking with a real tokenizer — built for feeding a vector store, not just cutting text at a fixed length.

/// Quick answer

PDF to Chunks splits a document into pieces sized by a real tokenizer (tiktoken, cl100k_base), not a character count. strategy: "heading" (the default) breaks at detected headings and reports each chunk's heading path; "page" breaks one chunk per page; "fixed" ignores structure and uses pure token windows, optionally overlapping via overlap. Every strategy keeps a detected table's rows together in one chunk rather than splitting it mid-row, and repeated headers/footers (page numbers, running titles) are detected across the document and stripped out of the chunk text before it's returned.

Try PDF to Chunks API — free →Read the docs

Free account. No card required.

How does the PDF to Chunks API work?

One HTTP request from any language. Every ASHDOCS endpoint uses the same X-API-Key header.

curl -X POST https://www.ashdocs.com/api/v2/tools/pdf-to-chunks \
  -H "X-API-Key: ash_live_..." \
  -F "file=@document.pdf" \
  -F 'options={"max_tokens":500,"overlap":50}'

Common use cases

RELATED TOOLS