---
title: "classify · RUAL Documentation"
description: "Classify input into exactly one of your labels using Claude; route the resulting label with a switch block."
canonical: https://docs.rual.nl/block-types/anthropic/anthropicconnection_classify
language: en
---

# classify

This block is part of the [`anthropic`](https://docs.rual.nl/block-types/anthropic) group and was last modified in core [`v15.0.0`](https://docs.rual.nl/core-versions/150000).

Classify input into exactly one of your labels using Claude; route the resulting label with a switch block.

- flow `flow`

- connection required `anthropicconnection`

- input `value` The text to classify. Optional when classifying an attachment (e.g. an image or PDF).

- labels required `array ` The candidate labels (the model must pick exactly one).

- attachments `file` Optional image(s)/PDF(s) to classify (e.g. route a document by type). Wire any file block; combine with or instead of input text.

- instructions `value` Optional extra guidance for how to choose.

- model `value` Model ID. Defaults to claude-haiku-4-5 (cheap). • Suggestions: `claude-haiku-4-5` `claude-sonnet-4-6` `claude-opus-4-8`

- flow `flow`

- connection `anthropicconnection`

- success `condition` Got a reply from Claude.

- matched `condition` The reply was one of the labels (off = no match; label carries the raw reply).

- label `value` The chosen label (canonical spelling when matched).

- usage `object` Token counts plus the call cost (cost_usd).

- stop reason `value`

- partial `value`

- errors `array ` Error codes when the call fails (success=false): config_error, internal_error, model_not_allowed, budget_exceeded, concurrency_limit_exceeded, rate_limited, refused, max_tokens, transport_error.

- warnings `array ` Non-fatal notices: cost_unknown.

- error detail `value`

| `claude classify` |
| --- |
| `ai classify` |
| `categorize` |
| `route with ai` |
| `intent` |

A typical wiring for [classify](https://docs.rual.nl/block-types/anthropic/anthropicconnection_classify): a [function trigger](https://docs.rual.nl/block-types/globals/trigger_custom_function) starts the flow; [with values](https://docs.rual.nl/block-types/array/array_of_values) feeds the `labels` pin; the `flow` out pin feeds [debug](https://docs.rual.nl/block-types/state%20ui/state_debug).

![Studio canvas example for the classify block: typical wiring for classify.](https://docs.rual.nl/canvas-examples/anthropicconnection_classify.png)

### Version history

Introduced in [`v15.0.0`](https://docs.rual.nl/core-versions/150000).
