# Single-Label Classification Model

### About this block

The Single-Label Classification Model block lets you run a single-label classification model trained on or uploaded to Roboflow.

Single-label classification models return a category for an image. For example, you could use this block to:

1. Identify what defect is present in an image
2. Sort images into one or more categories
3. Identify the type of product in an image

You can run private models stored in your Workspace, or public models on Roboflow Universe.

<figure><img src="/files/RtqFibPku7SCcWyXUIbL" alt=""><figcaption><p>The Single-Label Classification Model block.</p></figcaption></figure>

### What you can send into this block

You can run the Object Detection Model block on:

1. An image that you send to your Workflow
2. A video frame that you send to your Workflow
3. A cropped region of an image that is calculated in your Workflow (i.e. with a Crop block)

### What this block returns

The Single-Label Classification Model block returns the class your model thinks most closely represents the contents of the image. The block also returns a confidence value showing how confident the model thinks it is in its result.

To see the results from your classification model plotted on an image, you need to use a Visualizer block. You may want to use the:

* Classification Label Visualization block: Show labels from a classification model on an image.

Here is an example showing the results from a single-label classification model with a Classification label Visualization:

<figure><img src="/files/uxX7QNJM4z7MBZrlgJAQ" alt=""><figcaption><p>The label "loose-straw" appears in the top left corner of the image.</p></figcaption></figure>

### How to configure the block

When you set up this block, you will be asked to choose a model from your Workspace:

<figure><img src="/files/HpI6DyBux7H7yqrS9zr7" alt=""><figcaption></figcaption></figure>

To use a model in your Workspace, choose from the list of Your Models.

You can also specify the ID of any model found on Universe. [Learn how to find a model on Universe.](/universe/find-a-model-on-universe.md)

To use a Universe model, navigate to the Public Models tab, then paste in the Universe Model ID for the model you want to use.

You can then configure the block using the options available in the Workflows editor.

### Use cases

This block is useful for any Workflow that involves running a classification model.

If you need a zero-shot classification model, you may be interested in using CLIP, or trying a multimodal model like Claude.

### Predictions format

Expand the card below to see the JSON data returned by this block.

<details>

<summary>Predictions format</summary>

Predictions are returned in the following format:

```json
[
    "model_predictions": {
      "inference_id": "866010bb-e432-4b9c-9b95-35d87f0ffafa",
      "time": 0.28171608800039394,
      "image": {
        "width": 960,
        "height": 1280
      },
      "predictions": [
        {
          "class": "loose-straw",
          "class_id": 4,
          "confidence": 0.5229
        }
      ],
      "top": "loose-straw",
      "confidence": 0.5229,
      "prediction_type": "classification",
      "parent_id": "image",
      "root_parent_id": "image"
    }
  }
]
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/workflows/workflow-blocks/run-a-model/single-label-classification-model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
