Upstage Document Classification
AI-generatedSummary
Classify documents into custom categories using Upstage's API, accepting binary data or image URLs.
Inputs
- inputType (required) — Select 'Binary' to process files from a previous node or 'Image URL' to classify an online image.
- binaryPropertyName — Specify the name of the binary property containing the file (required when inputType is 'binary').
- imageUrl — Provide the URL of the image to classify (required when inputType is 'url').
- schemaInputType (required) — Choose 'Form Input' to define categories via a UI list or 'Raw JSON' to provide a JSON array of oneOf schemas.
- categories — Define the classification categories (label and description) when using Form Input.
- rawJsonSchema — Provide a JSON array defining the oneOf schema for classification when using Raw JSON.
- returnMode — Set to 'Classification Result Only' to return the predicted label and confidence, or 'Full Response' to return the raw API output.
Output shape
A list of items where each item contains the classification result (JSON object) or the full API response.
The result includes a 'classification' field with the predicted label and a 'confidence' field ('high' or 'low'). If configured for Full Response, the output matches the Upstage API structure.
Examples
Example 1: Classify uploaded PDF invoices into 'invoice' or 'other'.
Input Type: Binary, Schema Input Type: Form, Categories: Label 'invoice', Description 'Official invoice'.
Example 2: Determine if a document URL is a 'contract' or 'agreement'.
Input Type: Image URL, Schema Input Type: Raw JSON, Raw JSON Schema: [{"const": "contract"}, {"const": "agreement"}].
Example 3: Get detailed API metadata alongside the label.
Return Mode: Full Response.