> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fastino.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use https://docs.fastino.ai/llms.txt to discover and navigate pages. Use https://docs.fastino.ai/llms-full.txt when you need the complete documentation corpus. Use https://docs.fastino.ai/openapi.json as the source of truth for customer-facing routes. For GLiDE decision inference, call POST https://api.fastino.ai/v1/systemone with model fastino/GLiDE. Do not infer undocumented routes. Read API keys from FASTINO_API_KEY and never embed credentials in code, logs, or reports.

# GLiNER 2.5 Decide Classification

> Define Decide classification tasks and consume their single-label, multi-label, and multi-task results.

Add a top-level `schema.classifications` array to define one or more classification tasks. Each task accepts exactly these keys:

<ParamField body="task" type="string" required>
  A stable name for the classification task. The same name appears in the parsed result.
</ParamField>

<ParamField body="labels" type="string[]" required>
  At least one permitted label. Decide does not accept label-description objects.
</ParamField>

<ParamField body="multi_label" type="boolean" default="false">
  When `false`, return the single highest-scoring label. When `true`, return every label that reaches `cls_threshold`.
</ParamField>

<ParamField body="cls_threshold" type="number">
  An inference-time cutoff from `0` to `1` for multi-label tasks. It does not affect training and does not change single-label selection.
</ParamField>

<ParamField body="top_k" type="integer">
  Accepted for compatibility, but currently has no effect on GLiNER 2.5 Decide.
</ParamField>

## Parse classification results

GLiNER 2.5 Decide returns a standard Chat Completions envelope. The classification result is serialized as JSON inside `choices[0].message.content`:

```python theme={null}
import json

body = response.json()
result = json.loads(body["choices"][0]["message"]["content"])
```

Do not read classification tasks directly from `choices[0]`; parse `message.content` first.

## Single-label classification

```json theme={null}
{
  "classifications": [
    {
      "task": "intent",
      "labels": ["refund_request", "cancel_subscription", "login_problem"],
      "multi_label": false
    }
  ]
}
```

Single-label tasks always return the highest-scoring label:

```json theme={null}
{
  "intent": {
    "label": "refund_request",
    "confidence": 0.999862551689148
  }
}
```

`label` is one of the strings supplied in the task's `labels` array. `confidence` is the model's confidence for the selected label, from `0` to `1`.

Labels are unordered; listing `low`, `medium`, and `high` in that order does not create an ordinal scale.

## Multi-label classification

```json theme={null}
{
  "classifications": [
    {
      "task": "tags",
      "labels": ["technical_issue", "login_problem", "urgent", "human_handoff"],
      "multi_label": true,
      "cls_threshold": 0.2
    }
  ]
}
```

Multi-label tasks return an array containing each selected label and its confidence:

```json theme={null}
{
  "tags": [
    {"label": "technical_issue", "confidence": 0.4421546757221222},
    {"label": "login_problem", "confidence": 0.21206879615783691},
    {"label": "urgent", "confidence": 0.4834045469760895},
    {"label": "human_handoff", "confidence": 0.8267117738723755}
  ]
}
```

Only labels meeting the task's `cls_threshold` are selected. Increase `cls_threshold` to favor precision; decrease it to favor recall. A stricter threshold can produce a shorter array or no selected labels.

## Run multiple tasks in one request

```json theme={null}
{
  "classifications": [
    {
      "task": "intent",
      "labels": ["refund_request", "cancel_subscription", "login_problem"],
      "multi_label": false
    },
    {
      "task": "urgency",
      "labels": ["low", "normal", "high", "critical"],
      "multi_label": false
    }
  ]
}
```

Tasks are scored in one forward pass but remain independent. Classic classification does not enforce implications, exclusions, cardinality rules, or ordinal relationships between tasks.

The parsed result is keyed by the `task` names:

```json theme={null}
{
  "intent": {
    "label": "refund_request",
    "confidence": 0.99
  },
  "urgency": {
    "label": "normal",
    "confidence": 0.82
  }
}
```

## Default schema

If you omit both `schema` and `response_format`, Decide uses its catalog-default `intent` task with `book`, `cancel`, `change`, and `status`. The response reports `x_fastino.default_schema_applied: true` when that default is used.

## Common validation mistakes

| Invalid input | Use instead |
| - | - |
| `"labels": {"book": "user wants to book"}` | `"labels": ["book", "cancel"]` |
| A `label_descriptions` key | Remove it and keep labels as strings |
| A `description` key on a task | Remove it |
| `"threshold": 0.5` inside a task | `"cls_threshold": 0.5` with `"multi_label": true` |
| An empty `labels` array | Supply at least one label |

<CardGroup cols={2}>
  <Card title="Evaluate and train" icon="sliders" href="/concepts/gliner-2-5-decide-thresholds">
    Measure quality, tune thresholds, and adapt the model for your domain.
  </Card>

  <Card title="API reference" icon="book" href="/api-reference/inference/chat-completions">
    Inspect the complete Chat Completions response schema.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.