POST
/
api
/
v1
/
blobs
/
insert
/
{user_id}
# To use the Python SDK, install the package:
# pip install memobase

from memobase import Memobase
from memobase import ChatBlob

client = Memobase(project_url='PROJECT_URL', api_key='PROJECT_TOKEN')

b = ChatBlob(messages=[
    {
        "role": "user",
        "content": "Hi, I'm here again"
    },
    {
        "role": "assistant",
        "content": "Hi, Gus! How can I help you?"
    }
])
u = client.get_user(uid)
bid = u.insert(b)
{
  "data": {
    "id": "<string>",
    "chat_results": [
      {
        "event_id": "<string>",
        "add_profiles": [
          "<string>"
        ],
        "update_profiles": [
          "<string>"
        ],
        "delete_profiles": [
          "<string>"
        ]
      }
    ]
  },
  "errno": 0,
  "errmsg": ""
}

Insert new memory data (blob) for a specific user. This endpoint handles the storage of memory data and automatically updates the user’s memory buffer.

The inserted data will be processed and integrated into the user’s long-term memory profile.

Memobase plans to support the following blob types:

  • ChatBlob: ✅ supported.
  • DocBlob: 🚧 in progress
  • ImageBlob: 🚧 in progress
  • CodeBlob: 🚧 in progress
  • TranscriptBlob: 🚧 in progress

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

user_id
string
required

The ID of the user to insert the blob for

Body

application/json

The blob data to insert

Response

200
application/json

Successful Response

The response is of type object.