Ingestion
Ingest
Process documents with OCR and ingest them into Unstructured.
This endpoint performs optical character recognition on documents and stores the extracted data.
Request Body
| Field | Type | Description |
|---|---|---|
data_connector_name | str | Name of the data connector to use. |
file_names | List[str] | Specific files to process. If omitted, processes all. |
job_id | str | Custom job ID for tracking. Auto-generated if not provided. |
clean_up_out_of_sync | bool | Remove files from VDB not in source. Default: true. |
file_count_to_run | int | Limit number of files to process. |
use_llm | bool | Use LLM for enhanced extraction. Default: false. |
extract_compute_method | str | Compute backend: argo (default), spark, or local. Acts as discriminator. |
compute_configuration | object | Backend-specific overrides. For spark: executor_instances, executor_cores, task_cpus, executor_memory, executor_memory_overhead, driver_memory. Empty object for argo/local. |
Response
- 200: OCR job started successfully
- Returns:
{ "message": str, "job_id": str }
- Returns:
- 400: Bad Request (e.g., invalid data connector, unsupported VDB type)
- 500: Internal Server Error
Example
{
"data_connector_name": "my-documents",
"use_llm": true,
"clean_up_out_of_sync": true,
"file_count_to_run": 100,
"extract_compute_method": "spark",
"compute_configuration": {
"executor_instances": 8,
"executor_memory": "4g"
}
}
POST
Python
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
- SparkExtractRequest
- ArgoExtractRequest
- LocalExtractRequest
Allowed value:
"spark"