Skip to content

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.

POST/v2/memory/relatedTry it in the Playground
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

Authorizationstringrequired

Bearer tm_…. A read key is enough.

X-Alexein-Userstringrequired

The app user whose memory to read. See App users.

X-Request-Idstring

Your id for this request, echoed on the response.

Body

refstringrequired

A 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 request

X-Alexein-User is missing or not a usable id.

401unauthorized

The bearer is not a key this service issued.

403forbidden

The organisation has been closed in the console.

404not found

A ref memory does not hold for this app user.

422invalid

An empty ref: `ref` must not be empty.

429too many requests

Too many requests in flight, or reads too fast. Retry after Retry-After seconds. See Limits.

503unavailable

The service is busy or briefly unavailable. Retry after Retry-After seconds, or with backoff when there is none.

Request
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" }'
200 OK
{
  "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"
    }
  ]
}