Is the traces behind your evaluations — one per model call an evaluation made,…
Is the traces behind your evaluations — one per model call an evaluation made, carrying its input, output, model and timing — narrowed by any of…
GET /v1/eval/traces
| Address | https://api.hanzo.ai/v1/eval/traces |
| Method | GET |
| Operation | get_eval_traces |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Is the traces behind your evaluations — one per model call an evaluation made, carrying its input, output, model and timing — narrowed by any of sessionId, runName and datasetName.
Scoped by org AND by project: the project is the caller's server-minted scope, not a parameter, so it cannot be widened by asking. Requires a validated principal; 403 without one. Traces live in the datastore, so a deployment with none wired answers 503 rather than an empty page.
Request
4 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
sessionId | query | string | — | SessionID narrows to one session, which for an evaluation is one run. |
runName | query | string | — | RunName narrows to the calls one run made. |
datasetName | query | string | — | Dataset narrows to the calls made against one dataset. |
limit | query | integer | — |
Response
| Status | Body | Meaning |
|---|---|---|
200 | traceList | ok |
200 body — 16 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
data | body | traceView[] | — | Data is the caller org's traces matching the filters, bounded by limit. |
data[].apiKeyHash | body | string | — | APIKeyHash is the non-reversible credential ref (never a plaintext key), so a trace correlates to the key that drove it without the store holding a secret. |
data[].datasetItemId | body | string | — | ItemID is the example the call answered. |
data[].datasetName | body | string | — | Dataset is the set the graded example came from. |
data[].endTime | body | string | — | EndTime is when it returned. |
data[].id | body | string | — | ID is the trace's handle, the value a score points at. |
data[].input | body | object | — | Input is what the model was given. |
data[].latencyMs | body | number | — | LatencyMs is EndTime-StartTime in milliseconds, nil when the trace carries no timing (so the console renders "—", never a fabricated 0). |
data[].model | body | string | — | Model is the model that answered. |
data[].name | body | string | — | Name is the trace's label, "eval:<run>" for a call a run made. |
data[].output | body | string | — | Output is what it answered. |
data[].projectId | body | string | — | ProjectID is the sub-scope within the org the call was made under. |
data[].runName | body | string | — | RunName is the run the call belongs to. |
data[].sessionId | body | string | — | SessionID groups the calls of one run. |
data[].startTime | body | string | — | StartTime is when the call began. |
data[].timestamp | body | string | — | Timestamp is the trace's own clock, equal to StartTime for a timed call. |
Failure carries the platform error shape — see Errors.
Examples
hanzo evals tracesimport { Configuration, EvalApi } from 'hanzoai';
const api = new EvalApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getEvalTraces();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import EvalApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = EvalApi(client).get_eval_traces()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.EvalAPI.GetEvalTraces(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, eval_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = eval_api::get_eval_traces(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.EvalApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new EvalApi(client).getEvalTraces();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/eval/traces \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches eval through the evals tool, which names its 16 operations with its own verbs — this one among them, under a name only the door declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "list_eval_datasets"
}
}
}'How is this guide?