Hanzo
OpenapiEval

Is your org's AI overview board over a window: totals (generations, prompt and…

Is your org's AI overview board over a window: totals (generations, prompt and completion tokens, cost in cents, errors, success rate, distinct models and…

GET /v1/eval/metrics

Addresshttps://api.hanzo.ai/v1/eval/metrics
MethodGET
Operationget_eval_metrics
AuthAuthorization: Bearer $HANZO_API_KEY

Is your org's AI overview board over a window: totals (generations, prompt and completion tokens, cost in cents, errors, success rate, distinct models and users), a gap-filled time series, a per-model breakdown with the long tail folded into "other", and latency percentiles read from the GenAI spans.

The window the answer was actually computed over is echoed back, so a client never has to infer it. A platform admin sees the board across ALL orgs; everyone else sees their own.

The board is HONEST-EMPTY where it cannot be computed: with no datastore wired, or under a named project scope the usage ledger does not yet carry, it answers a valid board with zero totals and a flat series rather than a fabricated number or a 500. Requires a validated principal; 403 without one.

Request

2 fields.

FieldInTypeRequiredDescription
rangequerystringRange is 24h (the default), 7d or 30d.
intervalquerystringInterval overrides the bucket the series is grouped into: "hour" or "day".

Response

StatusBodyMeaning
200Boardok

200 body — 60 fields.

FieldInTypeAlwaysDescription
byModelbodyModelStat[]the top models by spend
byModel[].completionTokensbodyintegertokens it answered with
byModel[].costCentsbodyintegerwhat this model cost, in cents
byModel[].costPctbodynumbershare of total spend, 0..100
byModel[].errorRatebodynumbershare of its calls that failed, 0..1
byModel[].errorsbodyintegercalls to it that did not succeed
byModel[].modelbodystringthe model this row is about, or "other" for the fold
byModel[].modelCountbodyinteger>0 only on the "other" fold
byModel[].p50Msbodynumbermedian latency, null when no spans carry it
byModel[].p95Msbodynumber95th-percentile latency, null when unknown
byModel[].p99Msbodynumber99th-percentile latency, null when unknown
byModel[].promptTokensbodyintegertokens sent to it
byModel[].providerbodystringwho serves it
byModel[].requestsbodyintegercalls to this model in the window
byModel[].totalTokensbodyintegerprompt plus completion
latencybodyLatencyStat
latency.availablebodybooleanfalse when no GenAI spans carry timing; the percentiles are then null
latency.p50Msbodynumbermedian latency over the window
latency.p95Msbodynumber95th-percentile latency
latency.p99Msbodynumber99th-percentile latency
otherbodyModelStat
other.completionTokensbodyintegertokens it answered with
other.costCentsbodyintegerwhat this model cost, in cents
other.costPctbodynumbershare of total spend, 0..100
other.errorRatebodynumbershare of its calls that failed, 0..1
other.errorsbodyintegercalls to it that did not succeed
other.modelbodystringthe model this row is about, or "other" for the fold
other.modelCountbodyinteger>0 only on the "other" fold
other.p50Msbodynumbermedian latency, null when no spans carry it
other.p95Msbodynumber95th-percentile latency, null when unknown
other.p99Msbodynumber99th-percentile latency, null when unknown
other.promptTokensbodyintegertokens sent to it
other.providerbodystringwho serves it
other.requestsbodyintegercalls to this model in the window
other.totalTokensbodyintegerprompt plus completion
rangebodyBoardRange
range.endbodystringRFC3339 (UTC)
range.intervalbodystringhour | day
range.rangebodystringechoed label (24h | 7d | 30d | custom)
range.startbodystringRFC3339 (UTC)
scopebodyBoardScope
scope.allOrgsbodybooleantrue when a platform admin is seeing every org at once
scope.orgbodystringthe org the board covers; "" when it covers all of them
scope.projectbodystringthe sub-scope within the org; "" is the whole org
seriesbodyBoardPoint[]one gap-filled bucket per interval, so a chart never breaks
series[].costCentsbodyintegerwhat this bucket cost, in cents
series[].errorsbodyintegercalls in this bucket that did not succeed
series[].generationsbodyintegermodel calls in this bucket
series[].tbodystringRFC3339 (UTC) bucket start
series[].totalTokensbodyintegertokens in this bucket
totalsbodyBoardTotals
totals.completionTokensbodyintegertokens the models answered with
totals.costCentsbodyintegerwhat the window cost, in cents
totals.errorsbodyintegercalls that did not succeed
totals.generationsbodyintegerhow many model calls the window holds
totals.modelsbodyintegerhow many distinct models were called
totals.promptTokensbodyintegertokens sent to the models
totals.successRatebodynumbershare of calls that succeeded, 0..1
totals.totalTokensbodyintegerprompt plus completion
totals.usersbodyintegerhow many distinct users called them

Failure carries the platform error shape — see Errors.

Examples

hanzo evals metrics

Eval API · All Hanzo APIs · Interactive reference

How is this guide?

On this page