/v1/sanitize.
Why plain text?
AmbientMeta’s detection engine analyzes the structural layout of human-readable text — prose, key-value pairs, tables, and lists. Binary formats like PDF and DOCX contain rendering instructions, embedded fonts, and metadata that interfere with detection. RTF and HTML contain markup tags that break entity boundary detection. Always convert to plain text first, then sanitize.Python
DOCX
RTF
HTML
Shell
Use common CLI tools to extract text, then pipe to the API withcurl.
PDF (pdftotext)
DOCX (pandoc)
RTF (unrtf)
Node.js
DOCX
HTML
Tips
Large documents: The
text field has a 100KB limit. For documents that exceed this, split the extracted text into chunks and sanitize each chunk separately. Each call returns its own session_id for rehydration.
