List traces

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.

GET /v1/eval/traces

Addresshttps://api.hanzo.ai/v1/eval/traces
MethodGET
Operationget_eval_traces
AuthAuthorization: Bearer $HANZO_API_KEY

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; 401 without one. Traces live in the datastore, so a deployment with none wired answers 503 rather than an empty page.

Request

4 fields.

FieldInTypeRequiredDescription
sessionIdquerystring—SessionID narrows to one session, which for an evaluation is one run.
runNamequerystring—RunName narrows to the calls one run made.
datasetNamequerystring—Dataset narrows to the calls made against one dataset.
limitqueryinteger—

Response

StatusBodyMeaning
200eval.traceListok
defaultproblem-detailsrefused

200 body — 16 fields.

FieldInTypeAlwaysDescription
databodyeval.traceView[]—Data is the caller org's traces matching the filters, bounded by limit.
data[].apiKeyHashbodystring—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[].datasetItemIdbodystring—ItemID is the example the call answered.
data[].datasetNamebodystring—Dataset is the set the graded example came from.
data[].endTimebodystring—EndTime is when it returned.
data[].idbodystring—ID is the trace's handle, the value a score points at.
data[].inputbodyany—Input is what the model was given.
data[].latencyMsbodynumber (double)—LatencyMs is EndTime-StartTime in milliseconds, nil when the trace carries no timing (so the console renders "—", never a fabricated 0).
data[].modelbodystring—Model is the model that answered.
data[].namebodystring—Name is the trace's label, "eval:<run>" for a call a run made.
data[].outputbodystring—Output is what it answered.
data[].projectIdbodystring—ProjectID is the sub-scope within the org the call was made under.
data[].runNamebodystring—RunName is the run the call belongs to.
data[].sessionIdbodystring—SessionID groups the calls of one run.
data[].startTimebodystring—StartTime is when the call began.
data[].timestampbodystring—Timestamp is the trace's own clock, equal to StartTime for a timed call.

Failure carries the platform error shape — see Errors.

Examples

hanzo eval traces
import { 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 := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.EvalAPI.GetEvalTraces(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::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.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new EvalApi(client).getEvalTraces();
curl https://api.hanzo.ai/v1/eval/traces \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches eval through the eval tool, which names its 16 operations with its own verbs — this one among them, under a name only MCP 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"
         }
       }
     }'

Eval API · All Hanzo APIs · Interactive reference

Was this page useful?