List vocabulary

Publishes the closed vocabularies and the precedence rule that resolves a conflict between two sources.

GET /v1/label/vocabulary

Addresshttps://api.hanzo.ai/v1/label/vocabulary
MethodGET
OperationriskLabelVocabulary
AuthAuthorization: Bearer $HANZO_API_KEY

Publishes the closed vocabularies and the precedence rule that resolves a conflict between two sources.

A precedence rule nobody can read is a rule nobody can audit or dispute, and the whole defensibility of a contested label rests on being able to say why one assertion beat another. The order returned here is derived from the same declaration the resolver reads — it is not a description of it.

Request

GET /v1/label/vocabulary takes no parameters and no body — the credential is the whole request.

Response

StatusBodyMeaning
200label.riskLabelVocabularyok
defaultproblem-detailsrefused

200 body — 5 fields.

FieldInTypeAlwaysDescription
dispositionsbodystring[]—Dispositions is the closed set a write's disposition must be drawn from, published in full so a caller can validate a batch before filing it instead of discovering a refusal per member: "productive", "unproductive", and "" — the EMPTY STRING is a member and means an explicit unjudged, so a client that filters empties out of this list drops a third of the vocabulary and can never file "we looked and could not say".
kindsbodystring[]—Kinds, Dispositions and Sources are the closed vocabularies.
precedencebodystring[]—Precedence is the sources in the order that resolves a conflict, strongest first.
retentionbodyinteger (int64)—Retention is the platform floor in days: no tenant may dispose of a label younger than this, because a label can be the input to an adverse action.
rulebodystring[]—Rule states the tie-breaks below rank, in order, so a caller reading a contested resolution can reproduce it.

Failure carries the platform error shape — see Errors.

Examples

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

const api = new LabelApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.riskLabelVocabulary();
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_vocabulary()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.LabelAPI.RiskLabelVocabulary(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_vocabulary(&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).riskLabelVocabulary();
curl https://api.hanzo.ai/v1/label/vocabulary \
  -H "Authorization: Bearer $HANZO_API_KEY"

Tool label, op riskLabelVocabulary — 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": "riskLabelVocabulary",
           "input": {}
         }
       }
     }'

Label API · All Hanzo APIs · Interactive reference

Was this page useful?