Document Upload Methods

July 13, 2026 ยท View on GitHub

OpenContracts provides several ways to get documents into the system, from single-file uploads to bulk ZIP imports with metadata and pre-built annotations. This section covers every supported format, their capabilities, and the side effects that certain annotation types trigger on import.

Sections

PageDescription
Supported File FormatsFile types accepted for upload and which parsers handle them
Single Document UploadUploading individual documents through the UI or API
Bulk ZIP ImportImporting many documents at once with folder structure, metadata, and relationships
Corpus Export/ImportExporting and re-importing full corpuses with annotations, labels, and configuration
Annotated Document ImportImporting a single document with pre-built annotations into an existing corpus
Worker Uploads (REST API)Token-scoped REST API for external pipelines to push pre-processed documents with annotations and embeddings
Remote Ingest WorkerRun the full parse + embed pipeline on your own hardware and stream finished documents (with calculated metadata/annotations) to a target instance
Worker Celery SetupOps reference: the Celery workers + queues (celery,worker_uploads,doc_parse) and Beat a target must run so worker uploads become documents
Annotation Side EffectsSpecial annotation types that create document indexes, hierarchies, and structural data on import

Quick Reference: Which Method to Use

ScenarioMethod
Upload a few documents for manual annotationSingle Upload
Upload hundreds of documents preserving folder organizationBulk ZIP Import
Bulk-load a very large local PDF tree (100k+ files), resumably -- server parsesBulk ZIP Import (scripts/bulk_import CLI driver)
Bulk-load a very large local tree, offloading parse + embed to your own hardwareRemote Ingest Worker (scripts/remote_ingest CLI driver)
Migrate a fully-annotated corpus to another instanceCorpus Export/Import
Programmatically inject a document with pre-built annotationsAnnotated Document Import
Feed documents from an external processing pipeline via REST APIWorker Uploads
Build a navigable document index from an external toolAnnotation Side Effects