Direct API
Call it from your own code.
Use this path if you want to talk to B.R.A.I.N. from a script, a terminal, or your own app. The API lives at the same address as this site. You send your key in the Authorization header and ask for JSON. You can do that with curl or a few lines of JavaScript or Python, with no package required. If you'd rather use a package, install @telonyte/brain with npm install @telonyte/brain or telonyte-brain with pip install telonyte-brain. Package pages: npm and PyPI. LangChain and LlamaIndex adapters are published too: npm install @telonyte/brain-langchain, npm install @telonyte/brain-llamaindex, pip install telonyte-brain-langchain, and pip install telonyte-brain-llamaindex. Adapter pages: LangChain on npm, LlamaIndex on npm, LangChain on PyPI, and LlamaIndex on PyPI. The packages answer from a local copy on your computer, kept in sync with your team, and show Hyper speed on when they do. On serverless platforms they ask the host instead.
Before you start
You need a key. Sign in to the dashboard, copy your team's install sentence, and have a bot redeem it, or follow the paste-into-chat path first. Save the key as BRAIN_KEY in your own secret store or environment. It is shown once. Never paste it into a chat.
Every call uses these headers:
Authorization: Bearer $BRAIN_KEY content-type: application/json
Checks the connection.
Saves a note. The reply has the note's uid.
Looks up notes. Read the lines array in the reply.
Removes a note by uid.
The same examples, plus GET /v1/ws, are also on the Developers page.
1. Pick curl, JavaScript, or Python
Each example below saves a note, then looks it up. Copy the one you want. Replace nothing except your key, which should already be in BRAIN_KEY.
2. curl
Paste these in a terminal. Press return after each one. The second command should print a JSON body that includes the Friday note in lines.
curl -s https://brain.telonyte.com/v1/add \
-H "Authorization: Bearer $BRAIN_KEY" \
-H "content-type: application/json" \
-d '{"bot":"my-bot","text":"NEW | The staging deploy runs on Fridays | team notes"}'
curl -s https://brain.telonyte.com/v1/find \
-H "Authorization: Bearer $BRAIN_KEY" \
-H "content-type: application/json" \
-d '{"q":"staging deploy","n":5,"format":"json"}'
3. JavaScript (fetch)
Paste this into a Node.js file, or any environment that has fetch and process.env. Run it. It should print the Friday note.
const base = "https://brain.telonyte.com";
const headers = {
Authorization: `Bearer ${process.env.BRAIN_KEY}`,
"content-type": "application/json",
};
const post = (path, body) =>
fetch(base + path, { method: "POST", headers, body: JSON.stringify(body) }).then((r) => r.json());
await post("/v1/add", { bot: "my-bot", text: "NEW | The staging deploy runs on Fridays | team notes" });
const found = await post("/v1/find", { q: "staging deploy", n: 5, format: "json" });
console.log(found.lines.join("\n"));
4. Python 3 (standard library)
Paste this into a .py file and run it with python3. It should print the Friday note. This example uses only the standard library, so no extra packages are required. If you'd rather use the published client, run pip install telonyte-brain. Keep the User-Agent header; some networks reject Python's default one.
import json, os, urllib.request
BASE = "https://brain.telonyte.com"
HEADERS = {
"Authorization": "Bearer " + os.environ["BRAIN_KEY"],
"content-type": "application/json",
"User-Agent": "brain-setup-example",
}
def post(path, body):
req = urllib.request.Request(BASE + path, data=json.dumps(body).encode(), headers=HEADERS, method="POST")
with urllib.request.urlopen(req) as r:
return json.load(r)
post("/v1/add", {"bot": "my-bot", "text": "NEW | The staging deploy runs on Fridays | team notes"})
found = post("/v1/find", {"q": "staging deploy", "n": 5, "format": "json"})
print("\n".join(found["lines"]))
5. Check that it works
After you run the add call, the find call should return the note about Fridays. That is the confirmation. If you later hook this up to an AI, also try: ask it to remember a fact, then start a new chat and ask the fact back.
If something goes wrong
The key is missing, typo'd, or revoked. Check that the Authorization header is Bearer, then a space, then the key. Get a new key from the dashboard if it was revoked. Do not paste the key into a chat.
Some networks block Python's default User-Agent. Use the example as written, including the User-Agent header. curl and the installed brain client already send one.
Passwords, codes, keys, account numbers, and street addresses are refused. Nothing is saved. Reword the note without those, and try again.
Try the exact words from the note, such as staging deploy. Confirm the add call returned a uid first.
Use POST /v1/delete with the uid from the add reply, or run brain delete <uid> if you installed the client.
Other ways to install
All paths · AI bots, including Grok Bot · Mac · Windows · Claude Code · Cursor · Claude Desktop · Gemini CLI · Direct API · Developers
Keep your key private
Never paste an API key into a chat, a ticket, or a note. Each bot has its own key, and you can pause or revoke it in the dashboard. Questions? Contact us.