Create a new document
Creates a new Document object from an input file, text content, or chunks. The chosen ingestion_mode
determines
how the ingestion process is configured:
Ingestion Modes:
hi-res
: Comprehensive parsing and enrichment, including summaries and possibly more thorough parsing.fast
: Speed-focused ingestion that skips certain enrichment steps like summaries.custom
: Provide a fullingestion_config
to customize the entire ingestion process.
Either a file or text content must be provided, but not both. Documents are shared through Collections
which allow for tightly specified cross-user interactions.
The ingestion process runs asynchronously and its progress can be tracked using the returned task_id.
Headers
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
The file to ingest. Exactly one of file, raw_text, or chunks must be provided.
Raw text content to ingest. Exactly one of file, raw_text, or chunks must be provided.
Pre-processed text chunks to ingest. Exactly one of file, raw_text, or chunks must be provided.
Ingestion modes:
hi-res
: Thorough ingestion with full summaries and enrichment.ocr
: OCR via Mistral and full summaries.fast
: Quick ingestion with minimal enrichment and no summaries.custom
: Full control viaingestion_config
.
If filters
or limit
(in ingestion_config
) are provided alongside hi-res
or fast
, they will override the default settings for that mode.
An optional dictionary to override the default chunking configuration for the ingestion process. If not provided, the system will use the default server-side chunking configuration.
Whether or not ingestion runs with orchestration, default is True
. When set to False
, the ingestion process will run synchronous and directly return the result.