---
title: "ClassificationRequest"
canonical_url: "https://www.nutrient.io/api/python/requests/classification-request/"
md_url: "https://www.nutrient.io/api/python/requests/classification-request.md"
last_updated: "2026-07-15T14:46:57.766Z"
description: "Describes a zero-shot classification request for `Classify`: the candidate labels the document is scored against."
---

Describes a zero-shot classification request for `Classify`: the candidate labels the document is scored against. Each label optionally carries a longer description that gives the matcher more context; the description never appears in the result. At least two labels are required — classification is zero-shot, so the labels define the entire output space, and a single label would trivially win with probability 1.

Branch weights, supplied text, and the other classification knobs are controlled separately via `DocumentClassificationSettings` on the document's settings.

```python

from nutrient_sdk import ClassificationRequest

```

## Construction

```python

ClassificationRequest()

```

Creates a new `ClassificationRequest` instance with default settings.

## Methods

### add_candidate_label

```python

def add_candidate_label(self, label: str) -> None

```

```python

def add_candidate_label(self, label: str, description: str) -> None

```

Adds a candidate label with no description. Adding a label that is already present (case-insensitive) replaces the existing entry.

**Parameters:**

| Name                       | Type  | Description                                                                                                                 |
| -------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------- |
| `label`                    | `str` | The short display name of the class (for example, "Invoice"). This is the name reported in the result.                      |
| `description` *(optional)* | `str` | Longer context that helps the matcher (for example, "An itemized bill listing goods or services and the total amount due"). |

---

---

## Related pages

- [All public classes import directly from the top-level package:](/api/python/requests.md)
- [Schema Generation Request](/api/python/requests/schema-generation-request.md)
- [Structured Extraction Request](/api/python/requests/structured-extraction-request.md)

