4e064cf81dae

latestOpenAPI 3.1.02026-08-131831,331960.0 KB
spans

Retrieve a span

Retrieve a span by its unique ID. Returns the full span including input, output, metrics, metadata, trace context, evaluation scores, and credit/budget info (limit_info). Metadata keys beginning with _ are reserved for platform use and are omitted from customer-facing span and trace responses, so they do not round-trip through read APIs.

get/api/request-logs/{unique_id}/

Path parameters

unique_idstring required

The unique ID of the log to get.

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

Successful response for Retrieve span

idstring required

Span ID (alias of unique_id).

unique_idstring

Stored unique span ID.

span_unique_idstring

Tracing span ID, when supplied.

trace_unique_idstring

Parent trace ID.

span_namestring

Span name.

span_parent_idstring

Parent span ID.

span_workflow_namestring

Workflow name associated with the span.

timestampstring date-time

Completion timestamp.

start_timestring date-time

Start timestamp.

period_startstring date-time

Billing/aggregation period start.

period_endstring date-time

Billing/aggregation period end.

prompt_messagesobject[]
completion_messageobject
full_requestobject

Credential-sanitized full request.

full_responseobject

Credential-sanitized full response.

modelstring

Model used by the span.

provider_idstring

Provider route used by the span.

environmentstring

API-key environment.

log_typestring

Span/log type.

log_methodstring

How this span was ingested.

statusstring

Span status.

status_codeinteger

HTTP or application status code.

error_codestring

Normalized error code.

error_messagestring

Error message, when the span failed.

prompt_tokensinteger

Input token count.

completion_tokensinteger

Output token count.

total_request_tokensinteger

Total token count.

prompt_cache_hit_tokensinteger

Cached input-token count.

prompt_cache_creation_tokensinteger

Cache-creation input-token count.

reasoning_tokensinteger

Reasoning-token count.

costnumber double

Cost in USD.

latencynumber double

End-to-end latency in seconds.

time_to_first_tokennumber double

Time to first token in seconds.

tokens_per_secondnumber double

Output throughput.

routing_timenumber double

Gateway routing time.

metadataobject

Customer metadata. Keys beginning with _ are reserved and omitted from customer-facing responses.

variablesobject
toolsobject[]
tool_callsobject[]
scoresobject

Evaluation scores keyed by evaluator identifier or slug.

customer_identifierstring

End-customer identifier.

customer_emailstring

End-customer email.

customer_namestring

End-customer name.

custom_identifierstring

Indexed custom identifier.

group_identifierstring

Group identifier.

session_identifierstring

Session identifier.

thread_identifierstring

Conversation thread identifier.

organization_idstring

Organization UUID.

unique_organization_idstring

Organization UUID.

organization_key_idstring

API-key identifier.

organization_key_namestring

API-key display name.

prompt_idstring

Prompt family ID.

prompt_namestring

Prompt display name.

prompt_version_numberinteger

Prompt version number.

deployment_idstring

Deployment ID.

deployment_namestring

Deployment name.

streamboolean

Whether the response streamed.

temperaturenumber double

Sampling temperature.

top_pnumber double

Nucleus-sampling parameter.

max_tokensinteger

Configured generation limit.

response_formatobject
blurredboolean

When true, usage policy reduced the response to visibility-safe fields.