Recall chat history
curl --request POST \
--url https://www.memoryplugin.com/api/chat-history/inject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "What decisions did I make about the database schema?",
"maxTokens": 600,
"conversationContext": "<string>",
"conversationHistory": [
{
"content": "<string>"
}
],
"queries": [
{
"query": "<string>",
"maxTokens": 123
}
]
}
'import requests
url = "https://www.memoryplugin.com/api/chat-history/inject"
payload = {
"query": "What decisions did I make about the database schema?",
"maxTokens": 600,
"conversationContext": "<string>",
"conversationHistory": [{ "content": "<string>" }],
"queries": [
{
"query": "<string>",
"maxTokens": 123
}
]
}
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({
query: 'What decisions did I make about the database schema?',
maxTokens: 600,
conversationContext: '<string>',
conversationHistory: [{content: '<string>'}],
queries: [{query: '<string>', maxTokens: 123}]
})
};
fetch('https://www.memoryplugin.com/api/chat-history/inject', 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://www.memoryplugin.com/api/chat-history/inject",
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([
'query' => 'What decisions did I make about the database schema?',
'maxTokens' => 600,
'conversationContext' => '<string>',
'conversationHistory' => [
[
'content' => '<string>'
]
],
'queries' => [
[
'query' => '<string>',
'maxTokens' => 123
]
]
]),
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://www.memoryplugin.com/api/chat-history/inject"
payload := strings.NewReader("{\n \"query\": \"What decisions did I make about the database schema?\",\n \"maxTokens\": 600,\n \"conversationContext\": \"<string>\",\n \"conversationHistory\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"queries\": [\n {\n \"query\": \"<string>\",\n \"maxTokens\": 123\n }\n ]\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://www.memoryplugin.com/api/chat-history/inject")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"What decisions did I make about the database schema?\",\n \"maxTokens\": 600,\n \"conversationContext\": \"<string>\",\n \"conversationHistory\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"queries\": [\n {\n \"query\": \"<string>\",\n \"maxTokens\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.memoryplugin.com/api/chat-history/inject")
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 \"query\": \"What decisions did I make about the database schema?\",\n \"maxTokens\": 600,\n \"conversationContext\": \"<string>\",\n \"conversationHistory\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"queries\": [\n {\n \"query\": \"<string>\",\n \"maxTokens\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"content": "<string>",
"sources": [
{
"conversationId": "<string>",
"conversationTitle": "<string>",
"messageId": "<string>",
"date": "<string>",
"relevanceScore": 123
}
],
"tokenCount": 123,
"processingTime": "<string>",
"model": "<string>"
}{
"error": "<string>",
"text": "<string>",
"score": 123
}{
"error": "<string>",
"text": "<string>",
"score": 123
}Chat History Endpoints
Recall Chat History
Search and synthesize context from the user’s past AI conversations. This is the primary recall endpoint — it performs semantic search, then uses AI to synthesize matching results into a coherent summary with source citations. This is the same function powering the recall_chat_history tool in the MCP server.
Supports parallel queries for complex topics that benefit from multiple search angles (e.g., timeline, decisions, people).
POST
/
api
/
chat-history
/
inject
Recall chat history
curl --request POST \
--url https://www.memoryplugin.com/api/chat-history/inject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "What decisions did I make about the database schema?",
"maxTokens": 600,
"conversationContext": "<string>",
"conversationHistory": [
{
"content": "<string>"
}
],
"queries": [
{
"query": "<string>",
"maxTokens": 123
}
]
}
'import requests
url = "https://www.memoryplugin.com/api/chat-history/inject"
payload = {
"query": "What decisions did I make about the database schema?",
"maxTokens": 600,
"conversationContext": "<string>",
"conversationHistory": [{ "content": "<string>" }],
"queries": [
{
"query": "<string>",
"maxTokens": 123
}
]
}
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({
query: 'What decisions did I make about the database schema?',
maxTokens: 600,
conversationContext: '<string>',
conversationHistory: [{content: '<string>'}],
queries: [{query: '<string>', maxTokens: 123}]
})
};
fetch('https://www.memoryplugin.com/api/chat-history/inject', 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://www.memoryplugin.com/api/chat-history/inject",
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([
'query' => 'What decisions did I make about the database schema?',
'maxTokens' => 600,
'conversationContext' => '<string>',
'conversationHistory' => [
[
'content' => '<string>'
]
],
'queries' => [
[
'query' => '<string>',
'maxTokens' => 123
]
]
]),
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://www.memoryplugin.com/api/chat-history/inject"
payload := strings.NewReader("{\n \"query\": \"What decisions did I make about the database schema?\",\n \"maxTokens\": 600,\n \"conversationContext\": \"<string>\",\n \"conversationHistory\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"queries\": [\n {\n \"query\": \"<string>\",\n \"maxTokens\": 123\n }\n ]\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://www.memoryplugin.com/api/chat-history/inject")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"What decisions did I make about the database schema?\",\n \"maxTokens\": 600,\n \"conversationContext\": \"<string>\",\n \"conversationHistory\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"queries\": [\n {\n \"query\": \"<string>\",\n \"maxTokens\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.memoryplugin.com/api/chat-history/inject")
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 \"query\": \"What decisions did I make about the database schema?\",\n \"maxTokens\": 600,\n \"conversationContext\": \"<string>\",\n \"conversationHistory\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"queries\": [\n {\n \"query\": \"<string>\",\n \"maxTokens\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"content": "<string>",
"sources": [
{
"conversationId": "<string>",
"conversationTitle": "<string>",
"messageId": "<string>",
"date": "<string>",
"relevanceScore": 123
}
],
"tokenCount": 123,
"processingTime": "<string>",
"model": "<string>"
}{
"error": "<string>",
"text": "<string>",
"score": 123
}{
"error": "<string>",
"text": "<string>",
"score": 123
}Overview
This is the primary endpoint for retrieving context from a user’s past AI conversations. It searches across all imported chat history, then uses AI to synthesize the results into a coherent summary with source citations. This is the same function that powers therecall_chat_history tool in the MCP server.
How it works
- Your query is embedded and searched against all conversation chunks (vector + keyword hybrid search)
- Results are filtered and ranked by relevance
- An AI model synthesizes the top results into a coherent narrative
- Source citations are attached so you can trace back to specific conversations
When to use this vs. Search
| Endpoint | Returns | Best for |
|---|---|---|
Recall (/inject) | AI-synthesized summary + sources | Building context for AI conversations, getting a coherent answer |
Search (/search) | Raw matched chunks with scores | Building custom UIs, debugging, fine-grained control |
Parallel queries
For complex topics, use thequeries array to search from multiple angles simultaneously. Each query is searched and synthesized independently.
curl -X POST https://www.memoryplugin.com/api/chat-history/inject \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"queries": [
{ "query": "what database schema decisions were made", "maxTokens": 500 },
{ "query": "authentication architecture discussions", "maxTokens": 500 }
]
}'
Single query
curl -X POST https://www.memoryplugin.com/api/chat-history/inject \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "what did I decide about the API rate limiting approach?",
"maxTokens": 800
}'
Authorizations
Body
application/json
Response
Synthesized context from chat history
Was this page helpful?