Skip to content

List Classify Jobs

classify.list(ClassifyListParams**kwargs) -> SyncPaginatedCursor[ClassifyListResponse]
GET/api/v2/classify

List classify jobs.

ParametersExpand Collapse
configuration_id: Optional[str]

Filter by configuration ID

job_ids: Optional[SequenceNotStr[str]]

Filter by specific job IDs

organization_id: Optional[str]
page_size: Optional[int]

Number of items per page

maximum100
minimum1
page_token: Optional[str]

Token for pagination

project_id: Optional[str]
status: Optional[Literal["PENDING", "RUNNING", "COMPLETED", "FAILED"]]

Filter by job status

Accepts one of the following:
"PENDING"
"RUNNING"
"COMPLETED"
"FAILED"
ReturnsExpand Collapse
class ClassifyListResponse:

Response for a classify job.

id: str

Unique identifier

configuration: ClassifyConfiguration

Classification configuration

rules: List[Rule]

Classification rules to apply (at least one required)

description: str

Natural language description of what to classify

maxLength500
minLength10
type: str

Document type to assign when rule matches

maxLength50
minLength1
mode: Optional[Literal["FAST"]]

Classification execution mode

document_input_type: Literal["url", "file_id", "parse_job_id"]

Type of document input

Accepts one of the following:
"url"
"file_id"
"parse_job_id"
document_input_value: str

Document identifier

project_id: str

Project ID

status: Literal["PENDING", "RUNNING", "COMPLETED", "FAILED"]

Job status

Accepts one of the following:
"PENDING"
"RUNNING"
"COMPLETED"
"FAILED"
user_id: str

User ID

configuration_id: Optional[str]

Product configuration ID

created_at: Optional[datetime]

Creation datetime

formatdate-time
error_message: Optional[str]

Error message if job failed

parse_job_id: Optional[str]

Associated parse job ID

result: Optional[ClassifyResult]

Result of classifying a document.

confidence: float

Confidence score (0.0-1.0)

maximum1
minimum0
reasoning: str

Explanation of classification decision

type: Optional[str]

Document type that matches, or None

transaction_id: Optional[str]

Idempotency key

updated_at: Optional[datetime]

Update datetime

formatdate-time

List Classify Jobs

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
)
page = client.classify.list()
page = page.items[0]
print(page.id)
{
  "items": [
    {
      "id": "id",
      "configuration": {
        "rules": [
          {
            "description": "contains invoice number, line items, and total amount",
            "type": "invoice"
          }
        ],
        "mode": "FAST"
      },
      "document_input_type": "url",
      "document_input_value": "document_input_value",
      "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"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
Returns Examples
{
  "items": [
    {
      "id": "id",
      "configuration": {
        "rules": [
          {
            "description": "contains invoice number, line items, and total amount",
            "type": "invoice"
          }
        ],
        "mode": "FAST"
      },
      "document_input_type": "url",
      "document_input_value": "document_input_value",
      "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"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}