curl --request POST \
--url https://api.tensorpro.ai/api/v1/sip/build \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"include_global": false,
"project_id": "<string>",
"query": "<string>",
"session_id": "<string>"
}
'import requests
url = "https://api.tensorpro.ai/api/v1/sip/build"
payload = {
"include_global": False,
"project_id": "<string>",
"query": "<string>",
"session_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
include_global: false,
project_id: '<string>',
query: '<string>',
session_id: '<string>'
})
};
fetch('https://api.tensorpro.ai/api/v1/sip/build', 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://api.tensorpro.ai/api/v1/sip/build",
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([
'include_global' => false,
'project_id' => '<string>',
'query' => '<string>',
'session_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.tensorpro.ai/api/v1/sip/build"
payload := strings.NewReader("{\n \"include_global\": false,\n \"project_id\": \"<string>\",\n \"query\": \"<string>\",\n \"session_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.tensorpro.ai/api/v1/sip/build")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"include_global\": false,\n \"project_id\": \"<string>\",\n \"query\": \"<string>\",\n \"session_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorpro.ai/api/v1/sip/build")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"include_global\": false,\n \"project_id\": \"<string>\",\n \"query\": \"<string>\",\n \"session_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"records_used": 123,
"sip": "<string>",
"user_id": "<string>",
"abstain": false,
"citations": [],
"grounded": false,
"sip_sections": {
"active_context": [
{}
],
"calibration_notes": {},
"identity": [
{}
],
"preferences": [
{}
],
"uncertain_facts": [
{}
]
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Build a SIP
Retrieve the most relevant memory for a query and render it as a SIP: a compact memory-context block you can prepend to a model prompt. The response returns a flat context string plus a structured five-section view (identity, active context, preferences, calibration notes, and uncertain facts). Set project_id to scope the build to a workspace, optionally including general memory with include_global; a project-scoped build that finds no matching sources returns a grounded prompt instructing the model to answer only from the project. Requires session_id and counts against your daily SIP quota.
curl --request POST \
--url https://api.tensorpro.ai/api/v1/sip/build \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"include_global": false,
"project_id": "<string>",
"query": "<string>",
"session_id": "<string>"
}
'import requests
url = "https://api.tensorpro.ai/api/v1/sip/build"
payload = {
"include_global": False,
"project_id": "<string>",
"query": "<string>",
"session_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
include_global: false,
project_id: '<string>',
query: '<string>',
session_id: '<string>'
})
};
fetch('https://api.tensorpro.ai/api/v1/sip/build', 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://api.tensorpro.ai/api/v1/sip/build",
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([
'include_global' => false,
'project_id' => '<string>',
'query' => '<string>',
'session_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.tensorpro.ai/api/v1/sip/build"
payload := strings.NewReader("{\n \"include_global\": false,\n \"project_id\": \"<string>\",\n \"query\": \"<string>\",\n \"session_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.tensorpro.ai/api/v1/sip/build")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"include_global\": false,\n \"project_id\": \"<string>\",\n \"query\": \"<string>\",\n \"session_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorpro.ai/api/v1/sip/build")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"include_global\": false,\n \"project_id\": \"<string>\",\n \"query\": \"<string>\",\n \"session_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"records_used": 123,
"sip": "<string>",
"user_id": "<string>",
"abstain": false,
"citations": [],
"grounded": false,
"sip_sections": {
"active_context": [
{}
],
"calibration_notes": {},
"identity": [
{}
],
"preferences": [
{}
],
"uncertain_facts": [
{}
]
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
EDN API key presented as a bearer token in the Authorization header ('Authorization: Bearer '). Create and manage keys from the Console.
Body
Response
Successful Response
Show child attributes
Show child attributes
The structured, five-section view of a SIP.
Rendered from the same records as the flat sip string, grouped by role:
identity: records the user has stated or confirmed about themselves.active_context: other factual records relevant to the query.preferences: recorded user preferences.calibration_notes: reserved for future personalisation signals.uncertain_facts: unconfirmed, AI-generated statements, marked uncertain.
This view is additive: consumers that only need the flat sip string can
ignore it entirely.
Show child attributes
Show child attributes
