Search risk

Runs an exhaustive search for the model shape that best fits the caller organisation's own history, and answers 202 with the run to read back.

POST /v1/risk/search

Addresshttps://api.hanzo.ai/v1/risk/search
MethodPOST
OperationriskSearch
AuthAuthorization: Bearer $HANZO_API_KEY

Runs an exhaustive search for the model shape that best fits the caller organisation's own history, and answers 202 with the run to read back.

Every candidate is replayed over that organisation's OWN feature surface in its own sandbox — its own aggregates, its own model, neither of them the live one — so a run cannot move a live threshold and cannot see another organisation's data. The result is the learning curve for each shape and the one that fit best, ranked on how closely it honoured the stated appetite, whether it warmed at all, whether it saturated, and how much of the coordinate space it left blind.

An empty history is REFUSED rather than reported as zero alerts, because "no alerts" is exactly what a quiet model looks like.

Request

1 field, body application/json (required).

FieldInTypeRequiredDescription
daysbodyinteger (int64)—Days is how much of the organisation's own history to replay, 1 to 400.

Response

StatusBodyMeaning
202risk.riskSearchRunaccepted
defaultproblem-detailsrefused

202 body — 3 fields.

FieldInTypeAlwaysDescription
candidatesbodyinteger (int64)—Candidates is how many model shapes will be tried.
eventsbodyinteger (int64)—Events is how much of the organisation's own history the run will replay.
idbodystring—ID addresses the run.

Failure carries the platform error shape — see Errors.

Examples

hanzo risk search create
import { Configuration, RiskApi } from 'hanzoai';

const api = new RiskApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.riskSearch({ days: 0 });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import RiskApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = RiskApi(client).risk_search(days=0)
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.RiskAPI.RiskSearch(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, risk_api};

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

let result = risk_api::risk_search(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.RiskApi;

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

var result = new RiskApi(client).riskSearch();
curl -X POST https://api.hanzo.ai/v1/risk/search \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "days": 0
     }'

Tool risk, op riskSearch — 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": "risk",
         "arguments": {
           "op": "riskSearch",
           "input": {
             "days": 0
           }
         }
       }
     }'

Risk API · All Hanzo APIs · Interactive reference

Was this page useful?