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, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication 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_idstringOptional
Trace unique ID.
root_span_unique_idstring or nullOptional
environmentstring or nullOptional
customer_identifierstring or nullOptional
namestring or nullOptional
inputany or nullOptional
Trace input. May be a JSON value or serialized JSON string depending on storage.
outputany or nullOptional
Trace output. May be a JSON value or serialized JSON string depending on storage.
expected_outputany or nullOptional
Expected output from the dataset row, when available.
statusstring or nullOptional
comparison_keystring or nullOptional
Stable key for comparing the same input across experiments.
start_timedatetime or nullOptional
end_timedatetime or nullOptional
durationdouble or nullOptional
Trace duration in seconds.
span_countinteger or nullOptional
llm_call_countinteger or nullOptional
total_costdouble or nullOptional
total_tokensinteger or nullOptional
total_prompt_tokensinteger or nullOptional
total_completion_tokensinteger or nullOptional
error_countinteger or nullOptional
scoresmap from strings to objectsOptional

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

span_treelist of objectsOptional
Hierarchical span tree for this trace.

Errors

401
Unauthorized Error
404
Not Found Error
413
Content Too Large Error