Get Context Attribution
curl --request POST \
--url https://flow.seekr.com/v1/explainability/context-attributor \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"context": "<string>",
"query": "<string>",
"response": "<string>",
"highlight": "<string>",
"granularity": "sentence",
"top_k": 5,
"num_ablations": 123,
"return_diagnostics": false
}
'import requests
url = "https://flow.seekr.com/v1/explainability/context-attributor"
payload = {
"context": "<string>",
"query": "<string>",
"response": "<string>",
"highlight": "<string>",
"granularity": "sentence",
"top_k": 5,
"num_ablations": 123,
"return_diagnostics": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
context: '<string>',
query: '<string>',
response: '<string>',
highlight: '<string>',
granularity: 'sentence',
top_k: 5,
num_ablations: 123,
return_diagnostics: false
})
};
fetch('https://flow.seekr.com/v1/explainability/context-attributor', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://flow.seekr.com/v1/explainability/context-attributor",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'context' => '<string>',
'query' => '<string>',
'response' => '<string>',
'highlight' => '<string>',
'granularity' => 'sentence',
'top_k' => 5,
'num_ablations' => 123,
'return_diagnostics' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://flow.seekr.com/v1/explainability/context-attributor"
payload := strings.NewReader("{\n \"context\": \"<string>\",\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"highlight\": \"<string>\",\n \"granularity\": \"sentence\",\n \"top_k\": 5,\n \"num_ablations\": 123,\n \"return_diagnostics\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://flow.seekr.com/v1/explainability/context-attributor")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"context\": \"<string>\",\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"highlight\": \"<string>\",\n \"granularity\": \"sentence\",\n \"top_k\": 5,\n \"num_ablations\": 123,\n \"return_diagnostics\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flow.seekr.com/v1/explainability/context-attributor")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"context\": \"<string>\",\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"highlight\": \"<string>\",\n \"granularity\": \"sentence\",\n \"top_k\": 5,\n \"num_ablations\": 123,\n \"return_diagnostics\": false\n}"
response = http.request(request)
puts response.read_body{
"response_text": "<string>",
"segments": [],
"highlight": "<string>",
"sources": [
{
"id": 123,
"text": "<string>",
"attribution": 123,
"offset": 123,
"tool_name": "<string>",
"tool_call_id": "<string>",
"tool": {
"url": "<string>",
"search_query": "<string>",
"type": "web_search",
"title": "<string>"
},
"source_type": "tool_response"
}
],
"diagnostics": {
"num_sources": 123,
"num_ablations": 123,
"lasso_alpha": 123,
"mask_probability": 123,
"tool_context_note": "<string>",
"y_vector_stats": {},
"raw_coef_stats": {},
"scaler_stats": {}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Get context attribution
Compute context attribution scores for a model response given its source text.
POST
/
v1
/
explainability
/
context-attributor
Get Context Attribution
curl --request POST \
--url https://flow.seekr.com/v1/explainability/context-attributor \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"context": "<string>",
"query": "<string>",
"response": "<string>",
"highlight": "<string>",
"granularity": "sentence",
"top_k": 5,
"num_ablations": 123,
"return_diagnostics": false
}
'import requests
url = "https://flow.seekr.com/v1/explainability/context-attributor"
payload = {
"context": "<string>",
"query": "<string>",
"response": "<string>",
"highlight": "<string>",
"granularity": "sentence",
"top_k": 5,
"num_ablations": 123,
"return_diagnostics": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
context: '<string>',
query: '<string>',
response: '<string>',
highlight: '<string>',
granularity: 'sentence',
top_k: 5,
num_ablations: 123,
return_diagnostics: false
})
};
fetch('https://flow.seekr.com/v1/explainability/context-attributor', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://flow.seekr.com/v1/explainability/context-attributor",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'context' => '<string>',
'query' => '<string>',
'response' => '<string>',
'highlight' => '<string>',
'granularity' => 'sentence',
'top_k' => 5,
'num_ablations' => 123,
'return_diagnostics' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://flow.seekr.com/v1/explainability/context-attributor"
payload := strings.NewReader("{\n \"context\": \"<string>\",\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"highlight\": \"<string>\",\n \"granularity\": \"sentence\",\n \"top_k\": 5,\n \"num_ablations\": 123,\n \"return_diagnostics\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://flow.seekr.com/v1/explainability/context-attributor")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"context\": \"<string>\",\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"highlight\": \"<string>\",\n \"granularity\": \"sentence\",\n \"top_k\": 5,\n \"num_ablations\": 123,\n \"return_diagnostics\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flow.seekr.com/v1/explainability/context-attributor")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"context\": \"<string>\",\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"highlight\": \"<string>\",\n \"granularity\": \"sentence\",\n \"top_k\": 5,\n \"num_ablations\": 123,\n \"return_diagnostics\": false\n}"
response = http.request(request)
puts response.read_body{
"response_text": "<string>",
"segments": [],
"highlight": "<string>",
"sources": [
{
"id": 123,
"text": "<string>",
"attribution": 123,
"offset": 123,
"tool_name": "<string>",
"tool_call_id": "<string>",
"tool": {
"url": "<string>",
"search_query": "<string>",
"type": "web_search",
"title": "<string>"
},
"source_type": "tool_response"
}
],
"diagnostics": {
"num_sources": 123,
"num_ablations": 123,
"lasso_alpha": 123,
"mask_probability": 123,
"tool_context_note": "<string>",
"y_vector_stats": {},
"raw_coef_stats": {},
"scaler_stats": {}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Determines which parts of the provided context contributed to the model’s response. Attribution can be returned for a specific highlight within the response, or broken into segments across the full response.
Authorizations
Body
application/json
Request model for context attribution.
Computes which parts of the context contributed to the model's response using the ContextCite algorithm.
Response
Success
Response model for context attribution.
sources
(ToolResponseSource · object | RawContextSource · object | SystemPromptSource · object)[] | null
Context sources for the highlight. Present only when you provide highlight.
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
Show child attributes
Show child attributes
Last modified on October 30, 2026
⌘I