Search exhaustively for the model shape that fits your own history
Search 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
| Address | https://api.hanzo.ai/v1/risk/search |
| Method | POST |
| Operation | riskSearch |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Search 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).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
days | body | integer | — | Days is how much of the organisation's own history to replay, 1 to 400. |
Response
| Status | Body | Meaning |
|---|---|---|
202 | riskSearchRun | accepted |
202 body — 3 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
candidates | body | integer | — | Candidates is how many model shapes will be tried. |
events | body | integer | — | Events is how much of the organisation's own history the run will replay. |
id | body | string | — | ID addresses the run. |
Failure carries the platform error shape — see Errors.
Examples
hanzo risk search createimport { 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 := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.RiskAPI.RiskSearch(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::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.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + 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
}
}
}
}'How is this guide?