experiments

Retrieve an experiment trace

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

get/api/v2/experiments/{experiment_id}/logs/{log_id}/

Path parameters

experiment_idstring required

Experiment ID returned as id in experiment responses.

log_idstring required

Trace ID returned as id in experiment trace list responses.

Headers

Authorizationstring required

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.

Response

Experiment trace details.

idstring required

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 nullable
environmentstring nullable
customer_identifierstring nullable
namestring nullable
{"stackTrail":"components:schemas:Experiments_retrieveExperimentSpan_Response_200:properties:input:oneOf","oasType":"schema","type":"unknown","description":"Any type","nullable":true}
{"stackTrail":"components:schemas:Experiments_retrieveExperimentSpan_Response_200:properties:output:oneOf","oasType":"schema","type":"unknown","description":"Any type","nullable":true}
{"stackTrail":"components:schemas:Experiments_retrieveExperimentSpan_Response_200:properties:expected_output:oneOf","oasType":"schema","type":"unknown","description":"Any type","nullable":true}
statusstring nullable
comparison_keystring nullable

Stable key for comparing the same input across experiments.

start_timestring date-time nullable
end_timestring date-time nullable
durationnumber double nullable

Trace duration in seconds.

span_countinteger nullable
llm_call_countinteger nullable
total_costnumber double nullable
total_tokensinteger nullable
total_prompt_tokensinteger nullable
total_completion_tokensinteger nullable
error_countinteger nullable
scoresobject

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

Changes