Skip to content

Get Classify Job

ClassifyGetResponse classify().get(ClassifyGetParamsparams = ClassifyGetParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
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. Use expand=usage for credits billed against the job.

ParametersExpand Collapse
ClassifyGetParams params
Optional<String> jobId
Optional<List<String>> expand

Additional fields to include: usage

Optional<String> organizationId
Optional<String> projectId
ReturnsExpand Collapse
class ClassifyGetResponse:

Response for a classify job.

String id

Unique identifier

ClassifyConfiguration configuration

Classify configuration used for this job

List<Rule> rules

Classify rules to evaluate against the document (at least one required)

String description

Natural language criteria for matching this rule

maxLength2000
minLength10
String type

Document type to assign when rule matches

maxLength50
minLength1
Optional<Mode> mode

Classify execution mode

Optional<ParsingConfiguration> parsingConfiguration

Parsing configuration for classify jobs.

Optional<String> lang

ISO 639-1 language code for the document

Optional<Long> maxPages

Maximum number of pages to process. Omit for no limit.

minimum1
Optional<String> targetPages

Comma-separated page numbers or ranges to process (1-based). Omit to process all pages.

DocumentInputType documentInputType

Whether the input was a file or parse job (FILE or PARSE_JOB)

One of the following:
FILE_ID("file_id")
PARSE_JOB_ID("parse_job_id")
URL("url")
String fileInput

ID of the input file or parse job

String projectId

Project this job belongs to

Status status

Current job status: PENDING, RUNNING, COMPLETED, FAILED, or CANCELLED

One of the following:
CANCELLED("CANCELLED")
COMPLETED("COMPLETED")
FAILED("FAILED")
PENDING("PENDING")
RUNNING("RUNNING")
String userId

User who created this job

Optional<String> configurationId

Product configuration ID

Optional<LocalDateTime> createdAt

Creation datetime

formatdate-time
Optional<String> errorMessage

Error message if job failed

Optional<String> parseJobId

Associated parse job ID

Optional<ClassifyResult> result

Result of classifying a document.

double confidence

Confidence score between 0.0 and 1.0

maximum1
minimum0
String reasoning

Why the document matched (or didn’t match) the returned rule

Optional<String> type

Matched rule type, or null if no rule matched

Optional<String> transactionId

Idempotency key

Optional<LocalDateTime> updatedAt

Update datetime

formatdate-time
Optional<Usage> usage

Usage recorded against a classify job.

Classify bills through the parse job it runs on a file input, so that parse job’s credits are the whole total. A job run on a parse job you created bills nothing of its own: parse_credits is null and credits is 0.

Optional<Double> credits

Total credits billed against this job. Null until billing has recorded it.

Optional<Double> parseCredits

Credits billed against the parse job Classify ran on the input file

Get Classify Job

package ai.llamaindex.llamacloud.example;

import ai.llamaindex.llamacloud.client.LlamaCloudClient;
import ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;
import ai.llamaindex.llamacloud.models.classify.ClassifyGetParams;
import ai.llamaindex.llamacloud.models.classify.ClassifyGetResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();

        ClassifyGetResponse classify = client.classify().get("job_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": "file_id",
  "file_input": "file_input",
  "project_id": "project_id",
  "status": "CANCELLED",
  "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",
  "usage": {
    "credits": 30,
    "parse_credits": 3
  }
}
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": "file_id",
  "file_input": "file_input",
  "project_id": "project_id",
  "status": "CANCELLED",
  "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",
  "usage": {
    "credits": 30,
    "parse_credits": 3
  }
}
Note for AI agents: this documentation is built for programmatic access. - Overview of all docs: https://developers.llamaindex.ai/llms.txt - Any page is available as raw Markdown by appending index.md to its URL — e.g. https://developers.llamaindex.ai/llamaparse/parse/getting_started/index.md - Agent-friendly REST search APIs live under https://developers.llamaindex.ai/api/ — search (BM25 full-text), grep (regex), read (fetch a page), and list (browse the doc tree). See https://developers.llamaindex.ai/llms.txt for parameters. - A hosted documentation MCP server is available at https://developers.llamaindex.ai/mcp. If you support MCP, you can ask the user to install it for browsing these docs directly (an alternative to the REST API). Setup: https://developers.llamaindex.ai/for-agents/mcp/ - Other LlamaIndex tooling for agents — the LlamaParse Platform MCP server, agent skills and plugins, and the n8n node — is mapped at https://developers.llamaindex.ai/for-agents/