Skip to content

List Classify Jobs

GET/api/v2/classify

List classify jobs.

Query ParametersExpand Collapse
configuration_id: optional string

Filter by configuration ID

job_ids: optional array of string

Filter by specific job IDs

organization_id: optional string
page_size: optional number

Number of items per page

maximum100
minimum1
page_token: optional string

Token for pagination

project_id: optional string
status: optional "PENDING" or "RUNNING" or "COMPLETED" or "FAILED"

Filter by job status

Accepts one of the following:
"PENDING"
"RUNNING"
"COMPLETED"
"FAILED"
Cookie ParametersExpand Collapse
session: optional string
ReturnsExpand Collapse
items: array of object { id, configuration, document_input_type, 11 more }

The list of items.

id: string

Unique identifier

configuration: ClassifyConfiguration { rules, mode }

Classification configuration

rules: array of object { description, type }

Classification rules to apply (at least one required)

description: string

Natural language description of what to classify

maxLength500
minLength10
type: string

Document type to assign when rule matches

maxLength50
minLength1
mode: optional "FAST"

Classification execution mode

document_input_type: "url" or "file_id" or "parse_job_id"

Type of document input

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

Document identifier

project_id: string

Project ID

status: "PENDING" or "RUNNING" or "COMPLETED" or "FAILED"

Job status

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

User ID

configuration_id: optional string

Product configuration ID

created_at: optional string

Creation datetime

formatdate-time
error_message: optional string

Error message if job failed

parse_job_id: optional string

Associated parse job ID

result: optional ClassifyResult { confidence, reasoning, type }

Result of classifying a document.

confidence: number

Confidence score (0.0-1.0)

maximum1
minimum0
reasoning: string

Explanation of classification decision

type: string

Document type that matches, or None

transaction_id: optional string

Idempotency key

updated_at: optional string

Update datetime

formatdate-time
next_page_token: optional string

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

total_size: optional number

The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only.

List Classify Jobs

curl https://api.cloud.llamaindex.ai/api/v2/classify \
    -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"
{
  "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
}