Get Classify Job
client.classify.get(stringjobID, ClassifyGetParams { organization_id, project_id } query?, RequestOptionsoptions?): ClassifyGetResponse { id, configuration, document_input_type, 11 more }
GET/api/v2/classify/{job_id}
Get a classify job by ID.
Returns the job status, configuration, and classify result when complete. The result includes the matched document type, confidence score, and reasoning.
Get Classify Job
import LlamaCloud from '@llamaindex/llama-cloud';
const client = new LlamaCloud({
apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted
});
const classify = await client.classify.get('job_id');
console.log(classify.id);{
"id": "id",
"configuration": {
"rules": [
{
"description": "contains invoice number, line items, and total amount",
"type": "invoice"
}
],
"mode": "FAST",
"parsing_configuration": {
"lang": "en",
"max_pages": 10,
"target_pages": "1,3,5-7"
}
},
"document_input_type": "url",
"file_input": "file_input",
"project_id": "project_id",
"status": "PENDING",
"user_id": "user_id",
"configuration_id": "configuration_id",
"created_at": "2019-12-27T18:11:19.117Z",
"error_message": "error_message",
"parse_job_id": "parse_job_id",
"result": {
"confidence": 0,
"reasoning": "reasoning",
"type": "type"
},
"transaction_id": "transaction_id",
"updated_at": "2019-12-27T18:11:19.117Z"
}Returns Examples
{
"id": "id",
"configuration": {
"rules": [
{
"description": "contains invoice number, line items, and total amount",
"type": "invoice"
}
],
"mode": "FAST",
"parsing_configuration": {
"lang": "en",
"max_pages": 10,
"target_pages": "1,3,5-7"
}
},
"document_input_type": "url",
"file_input": "file_input",
"project_id": "project_id",
"status": "PENDING",
"user_id": "user_id",
"configuration_id": "configuration_id",
"created_at": "2019-12-27T18:11:19.117Z",
"error_message": "error_message",
"parse_job_id": "parse_job_id",
"result": {
"confidence": 0,
"reasoning": "reasoning",
"type": "type"
},
"transaction_id": "transaction_id",
"updated_at": "2019-12-27T18:11:19.117Z"
}