Skip to content

Classify

Create Classify Job
client.Classify.New(ctx, params) (*ClassifyNewResponse, error)
POST/api/v2/classify
List Classify Jobs
client.Classify.List(ctx, query) (*PaginatedCursor[ClassifyListResponse], error)
GET/api/v2/classify
Get Classify Job
client.Classify.Get(ctx, jobID, query) (*ClassifyGetResponse, error)
GET/api/v2/classify/{job_id}
ModelsExpand Collapse
type ClassifyConfiguration struct{…}

Configuration for a classify job.

Rules []ClassifyConfigurationRule

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

Description string

Natural language criteria for matching this rule

maxLength500
minLength10
Type string

Document type to assign when rule matches

maxLength50
minLength1
Mode ClassifyConfigurationModeoptional

Classify execution mode

ParsingConfiguration ClassifyConfigurationParsingConfigurationoptional

Parsing configuration for classify jobs.

Lang stringoptional

ISO 639-1 language code for the document

MaxPages int64optional

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

minimum1
TargetPages stringoptional

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

type ClassifyCreateRequest struct{…}

Request to create a classify job.

Configuration ClassifyConfigurationoptional

Configuration for a classify job.

Rules []ClassifyConfigurationRule

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

Description string

Natural language criteria for matching this rule

maxLength500
minLength10
Type string

Document type to assign when rule matches

maxLength50
minLength1
Mode ClassifyConfigurationModeoptional

Classify execution mode

ParsingConfiguration ClassifyConfigurationParsingConfigurationoptional

Parsing configuration for classify jobs.

Lang stringoptional

ISO 639-1 language code for the document

MaxPages int64optional

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

minimum1
TargetPages stringoptional

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

ConfigurationID stringoptional

Saved configuration ID

DeprecatedFileID stringoptional

Deprecated: use file_input instead

FileInput stringoptional

File ID or parse job ID to classify

maxLength200
DeprecatedParseJobID stringoptional

Deprecated: use file_input instead

TransactionID stringoptional

Idempotency key scoped to the project

WebhookConfigurations []ClassifyCreateRequestWebhookConfigurationoptional

Outbound webhook endpoints to notify on job status changes

WebhookEvents []stringoptional

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

One of the following:
const ClassifyCreateRequestWebhookConfigurationWebhookEventExtractPending ClassifyCreateRequestWebhookConfigurationWebhookEvent = "extract.pending"
const ClassifyCreateRequestWebhookConfigurationWebhookEventExtractSuccess ClassifyCreateRequestWebhookConfigurationWebhookEvent = "extract.success"
const ClassifyCreateRequestWebhookConfigurationWebhookEventExtractError ClassifyCreateRequestWebhookConfigurationWebhookEvent = "extract.error"
const ClassifyCreateRequestWebhookConfigurationWebhookEventExtractPartialSuccess ClassifyCreateRequestWebhookConfigurationWebhookEvent = "extract.partial_success"
const ClassifyCreateRequestWebhookConfigurationWebhookEventExtractCancelled ClassifyCreateRequestWebhookConfigurationWebhookEvent = "extract.cancelled"
const ClassifyCreateRequestWebhookConfigurationWebhookEventParsePending ClassifyCreateRequestWebhookConfigurationWebhookEvent = "parse.pending"
const ClassifyCreateRequestWebhookConfigurationWebhookEventParseRunning ClassifyCreateRequestWebhookConfigurationWebhookEvent = "parse.running"
const ClassifyCreateRequestWebhookConfigurationWebhookEventParseSuccess ClassifyCreateRequestWebhookConfigurationWebhookEvent = "parse.success"
const ClassifyCreateRequestWebhookConfigurationWebhookEventParseError ClassifyCreateRequestWebhookConfigurationWebhookEvent = "parse.error"
const ClassifyCreateRequestWebhookConfigurationWebhookEventParsePartialSuccess ClassifyCreateRequestWebhookConfigurationWebhookEvent = "parse.partial_success"
const ClassifyCreateRequestWebhookConfigurationWebhookEventParseCancelled ClassifyCreateRequestWebhookConfigurationWebhookEvent = "parse.cancelled"
const ClassifyCreateRequestWebhookConfigurationWebhookEventClassifyPending ClassifyCreateRequestWebhookConfigurationWebhookEvent = "classify.pending"
const ClassifyCreateRequestWebhookConfigurationWebhookEventClassifyRunning ClassifyCreateRequestWebhookConfigurationWebhookEvent = "classify.running"
const ClassifyCreateRequestWebhookConfigurationWebhookEventClassifySuccess ClassifyCreateRequestWebhookConfigurationWebhookEvent = "classify.success"
const ClassifyCreateRequestWebhookConfigurationWebhookEventClassifyError ClassifyCreateRequestWebhookConfigurationWebhookEvent = "classify.error"
const ClassifyCreateRequestWebhookConfigurationWebhookEventClassifyPartialSuccess ClassifyCreateRequestWebhookConfigurationWebhookEvent = "classify.partial_success"
const ClassifyCreateRequestWebhookConfigurationWebhookEventClassifyCancelled ClassifyCreateRequestWebhookConfigurationWebhookEvent = "classify.cancelled"
const ClassifyCreateRequestWebhookConfigurationWebhookEventSheetsPending ClassifyCreateRequestWebhookConfigurationWebhookEvent = "sheets.pending"
const ClassifyCreateRequestWebhookConfigurationWebhookEventSheetsSuccess ClassifyCreateRequestWebhookConfigurationWebhookEvent = "sheets.success"
const ClassifyCreateRequestWebhookConfigurationWebhookEventSheetsError ClassifyCreateRequestWebhookConfigurationWebhookEvent = "sheets.error"
const ClassifyCreateRequestWebhookConfigurationWebhookEventSheetsPartialSuccess ClassifyCreateRequestWebhookConfigurationWebhookEvent = "sheets.partial_success"
const ClassifyCreateRequestWebhookConfigurationWebhookEventSheetsCancelled ClassifyCreateRequestWebhookConfigurationWebhookEvent = "sheets.cancelled"
const ClassifyCreateRequestWebhookConfigurationWebhookEventUnmappedEvent ClassifyCreateRequestWebhookConfigurationWebhookEvent = "unmapped_event"
WebhookHeaders map[string, string]optional

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

WebhookOutputFormat stringoptional

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

WebhookURL stringoptional

URL to receive webhook POST notifications

type ClassifyResult struct{…}

Result of classifying a document.

Confidence float64

Confidence score between 0.0 and 1.0

maximum1
minimum0
Reasoning string

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

Type string

Matched rule type, or null if no rule matched