Get Extract Job
client.extract.get(stringjobID, ExtractGetParams { expand, organization_id, project_id } query?, RequestOptionsoptions?): ExtractV2Job { id, created_at, document_input_value, 9 more }
GET/api/v2/extract/{job_id}
Get a single extraction job by ID.
Returns the job status and results when complete.
Use expand=configuration to include the full configuration used,
and expand=extract_metadata for per-field metadata.
Parameters
jobID: string
Returns
Get Extract 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 extractV2Job = await client.extract.get('job_id');
console.log(extractV2Job.id);{
"id": "ext-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"created_at": "2019-12-27T18:11:19.117Z",
"document_input_value": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"project_id": "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"status": "COMPLETED",
"updated_at": "2019-12-27T18:11:19.117Z",
"configuration": {
"data_schema": {
"foo": {
"foo": "bar"
}
},
"cite_sources": true,
"confidence_scores": true,
"extract_version": "latest",
"extraction_target": "per_doc",
"lang": "en",
"max_pages": 10,
"parse_config_id": "cfg-11111111-2222-3333-4444-555555555555",
"parse_tier": "fast",
"system_prompt": "Extract all monetary values in USD. If a currency is not specified, assume USD.",
"target_pages": "1,3,5-7",
"tier": "cost_effective"
},
"configuration_id": "cfg-11111111-2222-3333-4444-555555555555",
"error_message": "error_message",
"extract_metadata": {
"field_metadata": {
"document_metadata": {
"foo": {
"foo": "bar"
}
},
"page_metadata": [
{
"foo": {
"foo": "bar"
}
}
],
"row_metadata": [
{
"foo": {
"foo": "bar"
}
}
]
},
"parse_job_id": "parse_job_id",
"parse_tier": "parse_tier"
},
"extract_result": {
"foo": {
"foo": "bar"
}
},
"metadata": {
"usage": {
"num_document_tokens": 0,
"num_output_tokens": 0,
"num_pages_extracted": 0
}
}
}Returns Examples
{
"id": "ext-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"created_at": "2019-12-27T18:11:19.117Z",
"document_input_value": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"project_id": "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"status": "COMPLETED",
"updated_at": "2019-12-27T18:11:19.117Z",
"configuration": {
"data_schema": {
"foo": {
"foo": "bar"
}
},
"cite_sources": true,
"confidence_scores": true,
"extract_version": "latest",
"extraction_target": "per_doc",
"lang": "en",
"max_pages": 10,
"parse_config_id": "cfg-11111111-2222-3333-4444-555555555555",
"parse_tier": "fast",
"system_prompt": "Extract all monetary values in USD. If a currency is not specified, assume USD.",
"target_pages": "1,3,5-7",
"tier": "cost_effective"
},
"configuration_id": "cfg-11111111-2222-3333-4444-555555555555",
"error_message": "error_message",
"extract_metadata": {
"field_metadata": {
"document_metadata": {
"foo": {
"foo": "bar"
}
},
"page_metadata": [
{
"foo": {
"foo": "bar"
}
}
],
"row_metadata": [
{
"foo": {
"foo": "bar"
}
}
]
},
"parse_job_id": "parse_job_id",
"parse_tier": "parse_tier"
},
"extract_result": {
"foo": {
"foo": "bar"
}
},
"metadata": {
"usage": {
"num_document_tokens": 0,
"num_output_tokens": 0,
"num_pages_extracted": 0
}
}
}