List history

Returns the router-improvement time-series.

GET /v1/ai/router/history

Addresshttps://api.hanzo.ai/v1/ai/router/history
MethodGET
Operationget_ai_router_history
AuthAuthorization: Bearer $HANZO_API_KEY

Returns the router-improvement time-series. Two scopes, one route, mirroring /v1/ai/router/stats:

  • ?scope=platform — PUBLIC-safe aggregate over ALL orgs, no authentication. Emits the daily reward/cost-saved/adoption series (task mix included, model ids NOT) and the retrain timeline. This is what world.hanzo.ai polls.
  • default (org scope) — requires a signed-in principal, scoped to the caller's OWN org (a super admin may pass ?org= to target another or "" for all).

Window: ?days=N (default 30, capped at 90). Aggregates only.

Request

GET /v1/ai/router/history takes no parameters and no body — the credential is the whole request.

Response

StatusBodyMeaning
200Success.
401—No credential, or one this service does not accept.
403—A valid credential that may not do this.

200 body — 35 fields.

FieldInTypeAlwaysDescription
databodyany—The operation's own result.
data2bodyany—A second result the operation defines, when it has one.
msgbodystringyesEmpty on success, the reason on failure.
statusbodystringyesOne of ok, error.
data.dailybodyai.HistoryDay[]—
data.daily[].by_taskbodyobject—
data.daily[].by_task.*bodyinteger—
data.daily[].cost_saved_indexbodynumber—
data.daily[].cumulative_cost_savedbodynumber—
data.daily[].datebodystring—
data.daily[].eventsbodyinteger—
data.daily[].learned_sharebodynumber—
data.daily[].reward_ratebodynumber—
data.daily[].rewarded_eventsbodyinteger—
data.retrainsbodyai.HistoryRetrain[]—
data.retrains[].datebodystring—
data.retrains[].eventsbodyinteger—
data.retrains[].gate_basebodynumber—
data.retrains[].gate_metricbodystring—
data.retrains[].gate_passbodyboolean—
data.retrains[].gate_valuebodynumber—
data.retrains[].holdout_accuracybodynumber—
data.retrains[].publishedbodyboolean—
data.retrains[].trained_timebodystring—
data.retrains[].versionbodystring—
data.scopebodystring—
data.totalsbodyai.HistoryTotals—
data.totals.cumulative_cost_savedbodynumber—
data.totals.days_activebodyinteger—
data.totals.eventsbodyinteger—
data.totals.reward_ratebodynumber—
data.windowbodyai.HistoryWindow—
data.window.daysbodyinteger—
data.window.sincebodystring—
data.window.untilbodystring—

Failure carries the platform error shape — see Errors.

Examples

hanzo ai router history
import { Configuration, AiApi } from 'hanzoai';

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

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

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

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

let result = ai_api::get_ai_router_history(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.AiApi;

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

var result = new AiApi(client).getAiRouterHistory();
curl https://api.hanzo.ai/v1/ai/router/history \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP declares no tool for ai — tools/list on https://api.hanzo.ai/v1/mcp names the products it does reach. Use HTTP or an SDK.


AI API · All Hanzo APIs · Interactive reference

Was this page useful?