Skip to content

Classify

Create Classify Job
classify.create(ClassifyCreateParams**kwargs) -> ClassifyCreateResponse
POST/api/v2/classify
List Classify Jobs
classify.list(ClassifyListParams**kwargs) -> SyncPaginatedCursor[ClassifyListResponse]
GET/api/v2/classify
Get Classify Job
classify.get(strjob_id, ClassifyGetParams**kwargs) -> ClassifyGetResponse
GET/api/v2/classify/{job_id}
ModelsExpand Collapse
class ClassifyConfiguration:

Configuration for a classify job.

rules: List[Rule]

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

description: str

Natural language criteria for matching this rule

maxLength500
minLength10
type: str

Document type to assign when rule matches

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

Classify execution mode

parsing_configuration: Optional[ParsingConfiguration]

Parsing configuration for classify jobs.

lang: Optional[str]

ISO 639-1 language code for the document

max_pages: Optional[int]

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

minimum1
target_pages: Optional[str]

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

class ClassifyCreateRequest:

Request to create a classify job.

configuration: Optional[ClassifyConfiguration]

Configuration for a classify job.

rules: List[Rule]

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

description: str

Natural language criteria for matching this rule

maxLength500
minLength10
type: str

Document type to assign when rule matches

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

Classify execution mode

parsing_configuration: Optional[ParsingConfiguration]

Parsing configuration for classify jobs.

lang: Optional[str]

ISO 639-1 language code for the document

max_pages: Optional[int]

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

minimum1
target_pages: Optional[str]

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

configuration_id: Optional[str]

Saved configuration ID

Deprecatedfile_id: Optional[str]

Deprecated: use file_input instead

file_input: Optional[str]

File ID or parse job ID to classify

maxLength200
Deprecatedparse_job_id: Optional[str]

Deprecated: use file_input instead

transaction_id: Optional[str]

Idempotency key scoped to the project

webhook_configurations: Optional[List[WebhookConfiguration]]

Outbound webhook endpoints to notify on job status changes

webhook_events: Optional[List[Literal["extract.pending", "extract.success", "extract.error", 20 more]]]

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

One of the following:
"extract.pending"
"extract.success"
"extract.error"
"extract.partial_success"
"extract.cancelled"
"parse.pending"
"parse.running"
"parse.success"
"parse.error"
"parse.partial_success"
"parse.cancelled"
"classify.pending"
"classify.running"
"classify.success"
"classify.error"
"classify.partial_success"
"classify.cancelled"
"sheets.pending"
"sheets.success"
"sheets.error"
"sheets.partial_success"
"sheets.cancelled"
"unmapped_event"
webhook_headers: Optional[Dict[str, str]]

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

webhook_output_format: Optional[str]

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

webhook_url: Optional[str]

URL to receive webhook POST notifications

class ClassifyResult:

Result of classifying a document.

confidence: float

Confidence score between 0.0 and 1.0

maximum1
minimum0
reasoning: str

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

type: Optional[str]

Matched rule type, or null if no rule matched

class ClassifyCreateResponse:

Response for a classify job.

id: str

Unique identifier

configuration: ClassifyConfiguration

Classify configuration used for this job

rules: List[Rule]

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

description: str

Natural language criteria for matching this rule

maxLength500
minLength10
type: str

Document type to assign when rule matches

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

Classify execution mode

parsing_configuration: Optional[ParsingConfiguration]

Parsing configuration for classify jobs.

lang: Optional[str]

ISO 639-1 language code for the document

max_pages: Optional[int]

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

minimum1
target_pages: Optional[str]

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

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

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

One of the following:
"url"
"file_id"
"parse_job_id"
file_input: str

ID of the input file or parse job

project_id: str

Project this job belongs to

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

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

One of the following:
"PENDING"
"RUNNING"
"COMPLETED"
"FAILED"
user_id: str

User who created this job

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 between 0.0 and 1.0

maximum1
minimum0
reasoning: str

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

type: Optional[str]

Matched rule type, or null if no rule matched

transaction_id: Optional[str]

Idempotency key

updated_at: Optional[datetime]

Update datetime

formatdate-time
class ClassifyListResponse:

Response for a classify job.

id: str

Unique identifier

configuration: ClassifyConfiguration

Classify configuration used for this job

rules: List[Rule]

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

description: str

Natural language criteria for matching this rule

maxLength500
minLength10
type: str

Document type to assign when rule matches

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

Classify execution mode

parsing_configuration: Optional[ParsingConfiguration]

Parsing configuration for classify jobs.

lang: Optional[str]

ISO 639-1 language code for the document

max_pages: Optional[int]

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

minimum1
target_pages: Optional[str]

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

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

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

One of the following:
"url"
"file_id"
"parse_job_id"
file_input: str

ID of the input file or parse job

project_id: str

Project this job belongs to

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

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

One of the following:
"PENDING"
"RUNNING"
"COMPLETED"
"FAILED"
user_id: str

User who created this job

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 between 0.0 and 1.0

maximum1
minimum0
reasoning: str

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

type: Optional[str]

Matched rule type, or null if no rule matched

transaction_id: Optional[str]

Idempotency key

updated_at: Optional[datetime]

Update datetime

formatdate-time
class ClassifyGetResponse:

Response for a classify job.

id: str

Unique identifier

configuration: ClassifyConfiguration

Classify configuration used for this job

rules: List[Rule]

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

description: str

Natural language criteria for matching this rule

maxLength500
minLength10
type: str

Document type to assign when rule matches

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

Classify execution mode

parsing_configuration: Optional[ParsingConfiguration]

Parsing configuration for classify jobs.

lang: Optional[str]

ISO 639-1 language code for the document

max_pages: Optional[int]

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

minimum1
target_pages: Optional[str]

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

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

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

One of the following:
"url"
"file_id"
"parse_job_id"
file_input: str

ID of the input file or parse job

project_id: str

Project this job belongs to

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

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

One of the following:
"PENDING"
"RUNNING"
"COMPLETED"
"FAILED"
user_id: str

User who created this job

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 between 0.0 and 1.0

maximum1
minimum0
reasoning: str

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

type: Optional[str]

Matched rule type, or null if no rule matched

transaction_id: Optional[str]

Idempotency key

updated_at: Optional[datetime]

Update datetime

formatdate-time