Create Classify Job
classifier.jobs.create(JobCreateParams**kwargs) -> ClassifyJob
POST/api/v1/classifier/jobs
Create a classify job. Experimental: This endpoint is not yet ready for production use and is subject to change at any time.
Parameters
organization_id: Optional[str]
project_id: Optional[str]
Returns
Create Classify Job
import os
from llama_cloud import LlamaCloud
client = LlamaCloud(
api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted
)
classify_job = client.classifier.jobs.create(
file_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
rules=[{
"description": "contains invoice number, line items, and total amount",
"type": "invoice",
}],
)
print(classify_job.id){
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"rules": [
{
"description": "contains invoice number, line items, and total amount",
"type": "invoice"
}
],
"status": "PENDING",
"user_id": "user_id",
"created_at": "2019-12-27T18:11:19.117Z",
"effective_at": "2019-12-27T18:11:19.117Z",
"error_message": "error_message",
"job_record_id": "job_record_id",
"mode": "FAST",
"parsing_configuration": {
"lang": "af",
"max_pages": 0,
"target_pages": [
0
]
},
"updated_at": "2019-12-27T18:11:19.117Z"
}Returns Examples
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"rules": [
{
"description": "contains invoice number, line items, and total amount",
"type": "invoice"
}
],
"status": "PENDING",
"user_id": "user_id",
"created_at": "2019-12-27T18:11:19.117Z",
"effective_at": "2019-12-27T18:11:19.117Z",
"error_message": "error_message",
"job_record_id": "job_record_id",
"mode": "FAST",
"parsing_configuration": {
"lang": "af",
"max_pages": 0,
"target_pages": [
0
]
},
"updated_at": "2019-12-27T18:11:19.117Z"
}