---
title: "Check Labels"
method: POST
path: "/felix/data-editing/check-labels"
tags: ["felix"]
---

# Check Labels

`POST /felix/data-editing/check-labels`

Use AI to verify label quality by checking if labels match the text content.

Args:
    request: Label check request with dataset name, columns, and sample size.
    auth: Authenticated user.

Returns:
    Label check results with per-row assessments.

Raises:
    HTTPException: 404 if dataset not found, 400 for invalid columns,
        504 if upstream LLM provider times out.

## Request body

- DataEditingCheckLabelsRequest — Request to check labels using AI
  - `dataset_name` string, required — Dataset name
  - `version` string, nullable — Dataset version (latest if omitted)
  - `text_column` string, required — Column containing text
  - `label_column` string, required — Column containing labels
  - `sample_size` integer — Number of samples to check

## Response `200`

Successful Response

- DataEditingCheckLabelsResponse — Response from label checking
  - `success` boolean, required
  - `dataset_name` string, required
  - `dataset_version` string, required
  - `checked_count` integer, required
  - `successful_count` integer, required
  - `issues_found` integer, required
  - `results` LabelCheckResult[], required
    - `row_index` integer, required
    - `text` string, required
    - `current_label` string, required
    - `suggested_label` string, required
    - `confidence` number, required
    - `reasoning` string, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-24** `1cffaad2a921` — 1 warning, 2 info
  - removed the optional property `detail` from the response with the `422` status
  - added the required property `error` to the response with the `422` status
  - added the required property `successful_count` to the response with the `200` status

[Change history](https://skmtc.dev/pioneer/apis/brain-api/changes/felix/data-editing/check-labels/post.md)

---

[API](https://skmtc.dev/pioneer/apis/brain-api.md) · [All operations](https://skmtc.dev/pioneer/apis/brain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pioneer/apis/brain-api/revisions/1cffaad2a921?raw)
