Retrieve an experiment trace

Retrieve one experiment trace with its full span tree and enriched evaluator scores.

Authentication

AuthorizationBearer

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, OpenAI or Azure OpenAI provider credentials go in Settings -> Providers or the request body credential_override field, not in this auth field.

OR
AuthorizationBearer

Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.

Path parameters

experiment_idstringRequired

Experiment ID returned as id in experiment responses.

log_idstringRequired

Trace ID returned as id in experiment trace list responses.

Response

Experiment trace details.
idstring

Trace ID. Use this value as log_id for trace detail and wait-workflow resume routes.

trace_unique_idstring
Trace unique ID.
root_span_unique_idstring or null
environmentstring or null
customer_identifierstring or null
namestring or null
inputany or null
Trace input. May be a JSON value or serialized JSON string depending on storage.
outputany or null
Trace output. May be a JSON value or serialized JSON string depending on storage.
expected_outputany or null
Expected output from the dataset row, when available.
statusstring or null
comparison_keystring or null
Stable key for comparing the same input across experiments.
start_timedatetime or null
end_timedatetime or null
durationdouble or null
Trace duration in seconds.
span_countinteger or null
llm_call_countinteger or null
total_costdouble or null
total_tokensinteger or null
total_prompt_tokensinteger or null
total_completion_tokensinteger or null
error_countinteger or null
scoresmap from strings to objects

Scores keyed by evaluator ID or slug. Each value includes evaluator metadata and the score value field matching score_value_type.

span_treelist of objects
Hierarchical span tree for this trace.

Errors

401
Unauthorized Error
404
Not Found Error