# List coverage

URL: https://docs.hanzo.ai/docs/openapi/label/risklabelcoverage

> Reports how much of a window has matured and how much of that is judged, per source.

`GET /v1/label/coverage`

> [Label →](https://docs.hanzo.ai/docs/openapi/label) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                          |
| ------------- | ---------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/label/coverage` |
| **Method**    | `GET`                                    |
| **Operation** | `riskLabelCoverage`                      |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`   |

Reports how much of a window has matured and how much of that is
judged, per source.

It is the gate on training. A supervised fit over a window whose judged count
is near zero produces a number, and the number is meaningless; this op is what
lets that be stated before the fit rather than discovered after it.

It reads the RECORD plane and folds every assertion at that event's OWN as-of,
so the counts obey exactly the leakage rule a materialisation would. It counts
only what was ASSERTED: what share of the whole event STREAM carries a label is
a question about the feature plane's denominator and is not answerable here.

## Request

3 fields.

| Field     | In    | Type    | Required | Description                                                             |
| --------- | ----- | ------- | -------- | ----------------------------------------------------------------------- |
| `from`    | query | string  | —        | From and To bound the EVENT window, half-open, RFC 3339.                |
| `to`      | query | string  | —        |                                                                         |
| `horizon` | query | integer | —        | Horizon is the maturity horizon in days the coverage is measured under. |

## Response

| Status    | Body                    | Meaning |
| --------- | ----------------------- | ------- |
| `200`     | label.riskLabelCoverage | ok      |
| `default` | problem-details         | refused |

`200` body — 18 fields.

| Field              | In   | Type                        | Always | Description                                                                                                                                                              |
| ------------------ | ---- | --------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `contested`        | body | integer (int64)             | —      | Contested is how many matured events have two visible assertions that disagree.                                                                                          |
| `events`           | body | integer (int64)             | —      | Events is how many DISTINCT judged events those assertions name, keyed on (kind, subject, at).                                                                           |
| `explore`          | body | number (double)             | —      | Explore is the share of judged events whose winning assertion came from the below-the-line sample.                                                                       |
| `facts`            | body | integer (int64)             | —      | Facts is how many assertions the window holds; Events is how many distinct judged events they cover.                                                                     |
| `from`             | body | string                      | —      | From is the INCLUSIVE start of the EVENT window these counts were folded over, RFC 3339, echoed with the defaults filled in — the caller's, or 90 days before To.        |
| `horizon`          | body | integer (int64)             | —      | Horizon is the maturity horizon these counts were measured under, IN DAYS — the caller's, or 120.                                                                        |
| `judged`           | body | integer (int64)             | —      | Judged is how many MATURED events resolve, at their own as-of, to something other than unjudged.                                                                         |
| `matured`          | body | integer (int64)             | —      | Matured is how many of those events have aged past the horizon and may therefore be admitted to a supervised set at all.                                                 |
| `pending`          | body | integer (int64)             | —      | Pending is how many of this tenant's assertions the DERIVED columnar copy is not known to hold yet.                                                                      |
| `productive`       | body | integer (int64)             | —      | Productive is how many matured events resolve, at their own as-of, to a WINNING assertion of `productive` — the event led somewhere: escalated, reported, charged back.  |
| `sources`          | body | label.riskSourceCoverage\[] | —      | Sources breaks the judged events down by the source that WON, so a plane that looks labelled because one noisy source dominates is visible as such.                      |
| `sources[].facts`  | body | integer (int64)             | —      | Facts is how many assertions this source filed; Won is how many judged events it was the assertion in force for.                                                         |
| `sources[].source` | body | string                      | —      | Source is the asserter these two counts are for — chargeoff, dispute, case, refund, review or sample.                                                                    |
| `sources[].won`    | body | integer (int64)             | —      | Won is how many JUDGED events this source's assertion was the one IN FORCE for, at that event's own as-of — it beat every other visible claim under the precedence rule. |
| `to`               | body | string                      | —      | To is the EXCLUSIVE end of that window (at < To).                                                                                                                        |
| `unlabelled`       | body | integer (int64)             | —      | Unlabelled is how many MATURED events had no assertion knowable by their own as-of — including every assertion that arrived after that instant.                          |
| `unmatured`        | body | integer (int64)             | —      | Unmatured is how many events in the window have NOT aged past the horizon.                                                                                               |
| `unproductive`     | body | integer (int64)             | —      | Unproductive is every OTHER judged event: the winner claimed `unproductive`, judged not suspicious.                                                                      |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo label coverage
```

**SDK**

**.ts**

```ts
import { Configuration, LabelApi } from 'hanzoai';

const api = new LabelApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.riskLabelCoverage();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import LabelApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = LabelApi(client).risk_label_coverage()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.LabelAPI.RiskLabelCoverage(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, label_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = label_api::risk_label_coverage(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.LabelApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new LabelApi(client).riskLabelCoverage();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/label/coverage \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

Tool `label`, op `riskLabelCoverage` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "label",
         "arguments": {
           "op": "riskLabelCoverage",
           "input": {}
         }
       }
     }'
```

---

[Label API](https://docs.hanzo.ai/docs/openapi/label) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
