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>"
  },
  "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

blob_type
enum<string>
required
Available options:
chat,
doc,
image,
code,
transcript
blob_data
object
required
fields
object | null
created_at
string | null
updated_at
string | null

Response

200
application/json
Successful Response
data
object | null

Response containing a single ID

errno
enum<integer>

Error code, 0 means success

Available options:
0,
400,
401,
403,
404,
405,
409,
422,
500,
501,
502,
503,
504
errmsg
string
default:

Error message, empty when success