Related
What one fact or excerpt links to - how the people and things it names relate to others memory holds - by the ref a result gave you.
- Auth
- read key
- Cost
- free; never refused for your plan
A search returns what bears on a question. Related goes on from one thing it returned: send a fact's or an
excerpt's ref, and get how the people and things it names relate to others memory holds, each link in words
with the ref of the fact that says it. Follow a link with open, or open a name it holds whole with
subject.
What the item itself says is left out: its own links are already in it.
Headers
AuthorizationstringrequiredBearer tm_…. A read key is enough.
X-Alexein-UserstringrequiredThe app user whose memory to read. See App users.
X-Request-IdstringYour id for this request, echoed on the response.
Body
refstringrequiredA fact's or an excerpt's ref, such as mem_5pQ1zX8gHd2. Valid for this app user only.
Response
linksobject[]Newest said first, up to 20, each {link, date, ref, source}: link in words, such as Alice Chen works at Acme; date, the day it was said; ref, the fact that says it; and source, the ref of the excerpt that
fact was learned from, or null. Empty when memory holds no links for what the item names.
Each link is a line for your model; don't parse it. Links resting on anything the person asked memory to
forget are not shown.
Errors
400bad requestX-Alexein-User is missing or not a usable id.
401unauthorizedThe bearer is not a key this service issued.
403forbiddenThe organisation has been closed in the console.
404not foundA ref memory does not hold for this app user.
422invalidAn empty ref: `ref` must not be empty.
429too many requestsToo many requests in flight, or reads too fast. Retry after Retry-After seconds. See
Limits.
503unavailableThe service is busy or briefly unavailable. Retry after Retry-After seconds, or with backoff when
there is none.
curl https://api.alexein.ai/v2/memory/related \
-H "Authorization: Bearer $ALEXEIN_API_KEY" \
-H "X-Alexein-User: user_42" \
-H "Content-Type: application/json" \
-d '{ "ref": "mem_5pQ1zX8gHd2" }'{
"links": [
{
"link": "Alice Chen works at Acme",
"date": "2026-10-01",
"ref": "mem_2nM7kP4wQs9",
"source": "mem_9fK2xQ7aLp3"
},
{
"link": "Alice Chen leads Acme billing migration",
"date": "2026-08-04",
"ref": "mem_6sG2bN8yRc4",
"source": "mem_1aZ5cX7vBn2"
}
]
}