Estimate credit cost for document preprocessing
Estimate credit cost for document preprocessing
GET/api/v1/datasets/{dataset_id}/preprocessing-credits
Quotes the credits that extracting a document dataset (pdf, docx, pptx, xlsx, html, or a zip of them) will reserve, from the page count of each document. Pass the same pages_to_process or documents_to_process you intend to launch with. Page counting runs in the background after upload, so isFinal: false means the quote is still partial — poll until it is true. Start extraction with POST /datasets/{dataset_id}/launch-preprocessing.
Query Parameters
Returns
Estimate credit cost for document preprocessing
curl https://api.prod.adaptionlabs.ai/api/v1/datasets/$DATASET_ID/preprocessing-credits \
-H "Authorization: Bearer $ADAPTION_API_KEY"{
"availableCredits": 0,
"extractionCost": 0,
"totalPages": 0,
"totalDocuments": 0,
"completedDocuments": 0,
"isFinal": true,
"insufficientCredits": {
"creditsRequired": 0,
"creditsAvailable": 0
}
}Returns Examples
{
"availableCredits": 0,
"extractionCost": 0,
"totalPages": 0,
"totalDocuments": 0,
"completedDocuments": 0,
"isFinal": true,
"insufficientCredits": {
"creditsRequired": 0,
"creditsAvailable": 0
}
}