Skip to main content
POST
/
serve
/
api
/
v1
/
chat_personal_stream
Chat with Personal Media Entities
curl --request POST \
  --url https://api.memories.ai/serve/api/v1/chat_personal_stream \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "When did I went to the beach?",
  "session_id": "",
  "unique_id": "default"
}
'
"<string>"

Overview

Query both private transcripts (associated with your account) and public transcripts.

Host URL

Endpoints

1. Chat Personal (Streaming)

POST /serve/api/v1/chat_personal_stream
/serve/api/v1/chat_personal_stream

2. Chat Personal (Non-streaming)

POST /serve/api/v1/chat_personal
/serve/api/v1/chat_personal

Authentication

All requests must include the API key in the Authorization header.
Authorization: <YOUR_API_KEY>

Request Example

Streaming

import requests
import json

url = "https://api.memories.ai/serve/api/v1/chat_personal_stream"
payload = json.dumps({ "session_id": "", "prompt": "When did I went to the beach?", "unique_id": "test"})
headers = { 'Authorization': 'sk-test', 'Content-Type': 'application/json', 'Accept': 'text/event-stream'}

with requests.post(url, headers=headers, data=payload) as resp: 
    resp.raise_for_status() 
    for line in resp.iter_lines(decode_unicode=True): 
        if line: 
            print(line)

Non-streaming

import requests
import json

url = "https://api.memories.ai/serve/api/v1/chat_personal"
payload = json.dumps({ "session_id": "", "prompt": "When did I went to the beach?", "unique_id": "test"})
headers = { 'Authorization': 'sk-test', 'Content-Type': 'application/json'}

response = requests.post(url, headers=headers, data=payload)
print(response.text)

Response Format

Streaming (SSE)

data: {"token": "This is ..."}
data: {"token": "..."}
data: [DONE]

Non-streaming (JSON)

{ 
    "code": "0000", 
    "msg": "success", 
    "data": { 
        "role": "ASSISTANT", 
        "content": "This year, you've been quite active...", 
        "refs": [ { "video": {...}, "refItems": [...] } ], 
        "thinkings": [ ... ] 
    }, 
    "session_id": "...", 
    "failed": false, 
    "success": true
}

Authorizations

Authorization
string
header
required

Body

application/json
prompt
string
required
Example:

"When did I went to the beach?"

session_id
string
Example:

""

unique_id
string
default:default

Response

Streaming SSE response or JSON response

The response is of type string.