Launch document preprocessing
Launch document preprocessing
POST/api/v1/datasets/{dataset_id}/launch-preprocessing
Extracts the text, tables and figures of an uploaded document dataset (pdf, docx, pptx, xlsx, html, or a zip of them) into rows. After the upload completes, such a dataset reports awaiting_input until this is called. Reserves credits from the page count of the selected documents — quote them first with GET /datasets/{dataset_id}/preprocessing-credits — then starts extraction. Poll GET /datasets/{dataset_id}/status: it reports pending while extracting and awaiting_input once the rows are ready, at which point call POST /datasets/{dataset_id}/adapt.
Launch document preprocessing
curl https://api.prod.adaptionlabs.ai/api/v1/datasets/$DATASET_ID/launch-preprocessing \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ADAPTION_API_KEY" \
-d '{
"preprocessing_mode": "per_document"
}'{
"dataset_id": "dataset_id",
"status": "pending",
"credits_escrowed": 0,
"pages_to_process": 0,
"documents_selected": 0,
"documents_total": 0
}Returns Examples
{
"dataset_id": "dataset_id",
"status": "pending",
"credits_escrowed": 0,
"pages_to_process": 0,
"documents_selected": 0,
"documents_total": 0
}