OptionalcollectWhether to read document-level properties (title/author/dates) from the source container and
return them as documentMetadata. Off by default: container parsing has a real per-file cost
(zip/PDF re-parse), so callers opt in only when the owning knowledge base declares metadata fields.
Honored only by file-based extraction (which owns the original buffer for every format);
URL-based extraction ignores it and never returns documentMetadata.
OptionaldiscardWhether Squid keeps or discards the original file.
Keeping the original file allows reprocessing and the ability for the user to download it later.
Defaults to false.
OptionalextractWhether to extract embedded images from the document. Defaults to true.
OptionalimageMinimum width/height (in pixels) of images to extract. Smaller images will be ignored.
OptionaloriginalSafety-net storage expiration (seconds) registered WITH the long-term upload of the original file, before its bytes land — so a process crash at any later point (mid-OCR, before the caller ever learns the path) leaves a self-collecting object instead of a permanent orphan. The caller that sets this owns clearing the expiration once it durably references the path; leaving it unset keeps the original permanent from the moment it uploads.
OptionalpageSpecific page indexes to extract from the document (0-based whole numbers). If omitted or empty, all pages are extracted. Duplicates are collapsed, order does not matter, and a selection containing no whole page number at all is rejected.
An index past the end of the document is ignored, and a selection naming only such indexes is rejected — but only where the document is read here. Extracting a PDF by URL through an OCR provider hands it over without reading it, so its length is unknown and what an out-of-range index does is up to that provider. Upload the file instead to have the whole selection checked.
OptionalpreferredThe preferred method for extracting data from the document.
OptionaltextFormat hint for text-based extraction (markdown / HTML). When omitted, the format is detected from the content. Only consulted by extractors that handle text input.
Options for customizing how data is extracted from a document.