Skip to content
Framework Docs

Classify

Create Classify Job
ClassifyCreateResponse classify().create(ClassifyCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/api/v2/classify
List Classify Jobs
ClassifyListPage classify().list(ClassifyListParamsparams = ClassifyListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v2/classify
Get Classify Job
ClassifyGetResponse classify().get(ClassifyGetParamsparams = ClassifyGetParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v2/classify/{job_id}
ModelsExpand Collapse
class ClassifyConfiguration:

Configuration for a classify job.

List<Rule> rules

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

String description

Natural language criteria for matching this rule

maxLength500
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.

class ClassifyCreateRequest:

Request to create a classify job.

Optional<ClassifyConfiguration> configuration

Configuration for a classify job.

List<Rule> rules

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

String description

Natural language criteria for matching this rule

maxLength500
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.

Optional<String> configurationId

Saved configuration ID

DeprecatedOptional<String> fileId

Deprecated: use file_input instead

Optional<String> fileInput

File ID or parse job ID to classify

maxLength200
DeprecatedOptional<String> parseJobId

Deprecated: use file_input instead

Optional<String> transactionId

Idempotency key scoped to the project

Optional<List<WebhookConfiguration>> webhookConfigurations

Outbound webhook endpoints to notify on job status changes

Optional<List<WebhookEvent>> webhookEvents

Events to subscribe to (e.g. ‘parse.success’, ‘extract.error’). If null, all events are delivered.

One of the following:
EXTRACT_PENDING("extract.pending")
EXTRACT_SUCCESS("extract.success")
EXTRACT_ERROR("extract.error")
EXTRACT_PARTIAL_SUCCESS("extract.partial_success")
EXTRACT_CANCELLED("extract.cancelled")
PARSE_PENDING("parse.pending")
PARSE_RUNNING("parse.running")
PARSE_SUCCESS("parse.success")
PARSE_ERROR("parse.error")
PARSE_PARTIAL_SUCCESS("parse.partial_success")
PARSE_CANCELLED("parse.cancelled")
CLASSIFY_PENDING("classify.pending")
CLASSIFY_RUNNING("classify.running")
CLASSIFY_SUCCESS("classify.success")
CLASSIFY_ERROR("classify.error")
CLASSIFY_PARTIAL_SUCCESS("classify.partial_success")
CLASSIFY_CANCELLED("classify.cancelled")
SHEETS_PENDING("sheets.pending")
SHEETS_SUCCESS("sheets.success")
SHEETS_ERROR("sheets.error")
SHEETS_PARTIAL_SUCCESS("sheets.partial_success")
SHEETS_CANCELLED("sheets.cancelled")
UNMAPPED_EVENT("unmapped_event")
Optional<WebhookHeaders> webhookHeaders

Custom HTTP headers sent with each webhook request (e.g. auth tokens)

Optional<String> webhookOutputFormat

Response format sent to the webhook: ‘string’ (default) or ‘json’

Optional<String> webhookUrl

URL to receive webhook POST notifications

class ClassifyResult:

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