Classify Text

jina.classify
ActionAI & modelsconnection required

Calls the Jina AI API with the connection's credentials.

Classify inputs zero-shot against candidate labels, or with a classifier previously trained on this account.

Connection

Required
Yes — the node will not save without one
Auth type
Bearer token
Providers
Jina AI
Secret shape
the API key, or {"api_key": "…"}
Config it needs
base_url, default_embedding_model, default_reranker_model
Resolved by
config.connection_id, else node.connection_id

Configuration

4 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
input
Items to classify: up to 512 strings or {"text": "…"} objects.
arrayYes——["the invoice is overdue"]
labels
Candidate labels for zero-shot classification — up to 512 of them. Leave empty when using a trained classifier_id.
arrayNo—array of string["billing","support"]
model
Embedding model backing the zero-shot classifier, for example jina-embeddings-v3. Falls back to the connection's default.
stringNo——jina-embeddings-v3
classifier_id
Use a trained few-shot classifier instead of labels.
stringNo———
  • At least one of labels, classifier_id must be set.

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "input": [
    "the invoice is overdue"
  ],
  "labels": [
    "billing",
    "support"
  ],
  "model": "jina-embeddings-v3"
}

Output

One shape.

result

FieldTypeExample
predictions
One result per input item, in input order.
array—
predictions[].index
The item's position in the input.
number—
predictions[].prediction
The winning label.
any—
predictions[].score
Confidence in the winning label.
any—
predictions[].predictions
Every candidate label with its score.
array—
count
How many items were classified.
number—
usage
Token usage Jina billed for this call.
object—
{
  "count": 0,
  "predictions": [
    {
      "index": 0,
      "prediction": null,
      "predictions": [],
      "score": null
    }
  ],
  "usage": {}
}

See Classify Text run in a workflow.

In a technical demo we add the Jina AI connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.