Upstage Document Classify icon

Upstage Document Classify

Classify documents into predefined categories using Upstage Document Classification

Upstage Document Classify

AI-generated

Summary

Classify documents into specified categories using Upstage's document-classification API.

Inputs

  • inputType (required) — How to provide the document for classification: binary (from previous node) or url (image URL). Default: binary.
  • binaryPropertyName — Name of the input item binary property that contains the file. Shown when inputType is binary. Default: data.
  • imageUrl — URL of the image to classify. Shown when inputType is url. Must use http:// or https://. Default: empty.
  • schemaInputType (required) — How to define the classification categories. Options: form (provide categories via the Categories field) or json (provide a raw JSON oneOf schema). Default: form.
  • categories — Fixed collection of category definitions, each with a label and description. Shown when schemaInputType is form. Multiple values allowed.
  • rawJsonSchema — Raw JSON array string defining the oneOf schema for classification. Shown when schemaInputType is json. Must be a valid JSON array.
  • returnMode — What to return from the node. Options: classification (default) returns label + confidence; full returns the complete API response.

Output shape

Returns an array of processed items, one per input item. Each item contains a json field and a pairedItem referencing the source index.

If returnMode is classification: json contains classification (string) and confidence (high if API finish_reason is stop, else low). If returnMode is full: json contains the raw API response object.

Examples

Example 1: Classify a binary document from a previous node into categories invoice, receipt, contract.

inputType=binary, binaryPropertyName=data, schemaInputType=form, categories.values=[{label:invoice, description:A document requesting payment...}, {label:receipt, description:A document confirming payment has been made}], returnMode=classification

Example 2: Classify a publicly accessible image from a URL into free-form categories defined by a JSON schema.

inputType=url, imageUrl=https://example.com/doc.jpg, schemaInputType=json, rawJsonSchema=[{const:invoice, description:A payment request}, {const:receipt, description:Payment confirmation}], returnMode=full

Links

Discussion