List coverage

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

GET /v1/label/coverage

Addresshttps://api.hanzo.ai/v1/label/coverage
MethodGET
OperationriskLabelCoverage
AuthAuthorization: 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.

FieldInTypeRequiredDescription
fromquerystring—From and To bound the EVENT window, half-open, RFC 3339.
toquerystring—
horizonqueryinteger—Horizon is the maturity horizon in days the coverage is measured under.

Response

StatusBodyMeaning
200label.riskLabelCoverageok
defaultproblem-detailsrefused

200 body — 18 fields.

FieldInTypeAlwaysDescription
contestedbodyinteger (int64)—Contested is how many matured events have two visible assertions that disagree.
eventsbodyinteger (int64)—Events is how many DISTINCT judged events those assertions name, keyed on (kind, subject, at).
explorebodynumber (double)—Explore is the share of judged events whose winning assertion came from the below-the-line sample.
factsbodyinteger (int64)—Facts is how many assertions the window holds; Events is how many distinct judged events they cover.
frombodystring—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.
horizonbodyinteger (int64)—Horizon is the maturity horizon these counts were measured under, IN DAYS — the caller's, or 120.
judgedbodyinteger (int64)—Judged is how many MATURED events resolve, at their own as-of, to something other than unjudged.
maturedbodyinteger (int64)—Matured is how many of those events have aged past the horizon and may therefore be admitted to a supervised set at all.
pendingbodyinteger (int64)—Pending is how many of this tenant's assertions the DERIVED columnar copy is not known to hold yet.
productivebodyinteger (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.
sourcesbodylabel.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[].factsbodyinteger (int64)—Facts is how many assertions this source filed; Won is how many judged events it was the assertion in force for.
sources[].sourcebodystring—Source is the asserter these two counts are for — chargeoff, dispute, case, refund, review or sample.
sources[].wonbodyinteger (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.
tobodystring—To is the EXCLUSIVE end of that window (at < To).
unlabelledbodyinteger (int64)—Unlabelled is how many MATURED events had no assertion knowable by their own as-of — including every assertion that arrived after that instant.
unmaturedbodyinteger (int64)—Unmatured is how many events in the window have NOT aged past the horizon.
unproductivebodyinteger (int64)—Unproductive is every OTHER judged event: the winner claimed unproductive, judged not suspicious.

Failure carries the platform error shape — see Errors.

Examples

hanzo label coverage
import { Configuration, LabelApi } from 'hanzoai';

const api = new LabelApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.riskLabelCoverage();
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()
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
}
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?;
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();
curl https://api.hanzo.ai/v1/label/coverage \
  -H "Authorization: Bearer $HANZO_API_KEY"

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

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 · All Hanzo APIs · Interactive reference

Was this page useful?