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

# Check Labels

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

## Request

- Base URL: `https://api.pioneer.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pioneer.ai/v1/data-editing/check-labels`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/pioneer/apis/brain-api/docs/v1/data-editing/check-labels/post.ts> (a function with typed inputs; its response is checked against the schema)

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** `0e5e86e2bae5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pioneer/apis/brain-api/changes/v1/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/0e5e86e2bae5?raw)
