# Dataset Health Check

You can retrieve health check statistics for a dataset using the following endpoint:

```bash
curl "https://api.roboflow.com/:workspace/:project/health?api_key=$ROBOFLOW_API_KEY"
```

This returns class distribution, annotation counts, image dimension summaries, and other dataset quality metrics. See [Dataset Health Check](https://docs.roboflow.com/datasets/dataset-health-check) for more on what these statistics mean.

## Query Parameters

| Parameter    | Type    | Description                                                                                                 |
| ------------ | ------- | ----------------------------------------------------------------------------------------------------------- |
| `regenerate` | boolean | Set to `true` to force a fresh recomputation of health statistics. By default, cached results are returned. |

## Response

The endpoint returns a JSON object with dataset health statistics:

```json
{
  "health": true,
  "stats": {
    "numImages": 120,
    "numAnnotations": 842,
    "avgImageSize": [640, 480],
    "medianImageRatio": 1.33,
    "missingAnnotations": 3,
    "nullAnnotations": 5,
    "classDistribution": {
      "cat": 410,
      "dog": 432
    }
  }
}
```

The response includes dataset-level metrics such as image count, annotation count, class distribution, and image dimension statistics. Fields like heatmaps and per-image breakdowns are excluded from the API response.


---

# 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/developer/rest-api/dataset-health-check.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.
