Get context attribution from run
Compute context attribution scores for the response generated during a specific agent run.
thread_id— ID of the thread to analyze
run_id— The run to analyze. If not provided, uses the latest completed run.highlight— A specific portion of the response to attributegranularity— How to partition the context:sentenceorchunktop_k— Number of top sources to return per segmentnum_ablations— Number of ablation experiments to run (32–256). Auto-computed if not set.return_diagnostics— Iftrue, includes internal diagnostic information in the response. Defaults tofalse.
Authorizations
Your Seekr API key, sent in the Authorization header with no 'Bearer' prefix.
Body
Request model for context attribution from an agent run. Extracts the context, query, and response from the run, then computes attribution scores across the retrieved sources.
ID of the thread to analyze.
Optional run ID. If not provided, uses the latest completed run.
Specific portion of response to attribute. If None, attributes all segments.
Granularity for partitioning context: sentence or chunk.
sentence, chunk Number of top attributed sources to return per segment.
x >= 1Number of ablation experiments to run. If None, computed dynamically using O(k log d) formula. Must be between 32 and 256 (inclusive) if specified.
If True, include diagnostic information in the response.
Response
Successful Response
Response model for context attribution.
The full response text that was attributed.
Attribution results for each response segment. Populated when highlight is not provided.
The highlighted portion of the response (if provided in request).
Context sources for the highlight. Only populated when highlight is provided.
A context source that originated from a tool call.
This model contains the core attribution fields plus tool-specific metadata
nested in the tool field.
- ToolResponseSource
- RawContextSource
- SystemPromptSource
Diagnostic information. Only populated when return_diagnostics=True.