---
title: "On-demand error localization for a single dataset cell."
method: POST
path: "/model-hub/cells/{cell_id}/run-error-localizer/"
tags: ["model-hub"]
---

# On-demand error localization for a single dataset cell.

`POST /model-hub/cells/{cell_id}/run-error-localizer/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/model-hub/cells/{cell_id}/run-error-localizer/`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in header `X-Secret-Key`

Use case: in the dataset detail drawer, the user opens an eval cell
that doesn't have an `error_analysis` block (because the eval was
run before error_localization was enabled, or the user wants a
fresh run). They click "Run error localization" and we:

  1. Look up the cell + its UserEvalMetric (column.source_id) +
     the EvalTemplate.
  2. Resolve the metric's `mapping` (template_var → column UUID)
     against the row's other cells to build `input_data`.
  3. Pull the eval verdict + reason from `cell.value` /
     `cell.value_infos`.
  4. Upsert an `ErrorLocalizerTask(source=DATASET, source_id=cell.id,
     status=PENDING)` so the existing 30s Temporal schedule picks it
     up and processes it via `process_single_error_localization`.

Returns the task id + status. The frontend then polls the cell
detail / task status endpoint until `error_analysis` lands in
`cell.value_infos`.

POST /model-hub/cells/{cell_id}/run-error-localizer/

## Request body

- ModelHubEmptyRequest

## Response `200`

OK

- CellErrorLocalizerResponse
  - `status` boolean, required
  - `result` CellErrorLocalizerResult, required
    - `task_id` string, uuid
    - `cell_id` string, uuid, required
    - `status` string, nullable
    - `error_analysis` object, nullable
    - `selected_input_key` string, nullable
    - `input_data` object, nullable
    - `input_types` object, nullable
    - `error_message` string, nullable

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `500`: Internal Server Error
- `default`: Default error response

---

[API](https://skmtc.dev/futureagi/apis/future-agi-management-api.md) · [All operations](https://skmtc.dev/futureagi/apis/future-agi-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/futureagi/apis/future-agi-management-api/revisions/c8684118e142?raw)
