POST
/
v1
/
memory
curl --location 'https://api.personal.ai/v1/memory' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{user_api_key}}' \
--data '{
    "Text": "my cat is born in #2000",
    "RawFeedText": "My <b>cat</b> is born in <b>2000</b>",
    "CreatedTime": "Wed, 19 Sep 2023 13:31:00 PDT",
    "SourceName": "Twitter",
    "Tags": "pet,cat,meow two"
}'
{
    "type": "memory",
    "payload": [
        {
            "data": [
                {
                    "type": "MEMORY",
                    "memlevel": "MEMBLOCK",
                    "memlabel": "my cat is born in #2000",
                    "start_time_utc": "2023-09-19T20:31:00.000+00:00",
                    "source": {
                        "type": "text",
                        "name": "Twitter"
                    },
                    "topics": [
                        {
                            "value": "pet"
                        },
                        {
                            "value": "cat"
                        },
                        {
                            "value": "meow two"
                        }
                    ]
                }
            ]
        }
    ]
}

Overview

The Memory API enables you to create text memories programmatically in your memory stack.

Authorization

x-api-key
string
required
Your Personal AI API key

Headers

Content-Type
string
required
Must be set to application/json

Body

Text
string
required
Plain text memories to upload to your stack
Example
"My first memory with Personal AI"
CreatedTime
string
Time (including timezone) of the memory. Defaults to current time if not specified.
Example
"Wed, 28 Jul 2021 13:30:00 PDT"
SourceName
string
required
The source or application of memory to help you recall where it is from
Example
"Notes"
RawFeedText
string
The formatted text that can be stored as it is
Example
"My <b>first</b> memory with Personal AI"
DomainName
string
required
The AI persona where the memory will be uploaded. This is the prefix before .personal.ai
Example
"ai-climbing"
Tags
string
Comma delimited list of tags for the memory
Example
"pet,dog,woof woof"

Example Responses

type
string
Type of response (memory)
payload
array
Array containing the memory data
curl --location 'https://api.personal.ai/v1/memory' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{user_api_key}}' \
--data '{
    "Text": "my cat is born in #2000",
    "RawFeedText": "My <b>cat</b> is born in <b>2000</b>",
    "CreatedTime": "Wed, 19 Sep 2023 13:31:00 PDT",
    "SourceName": "Twitter",
    "Tags": "pet,cat,meow two"
}'
{
    "type": "memory",
    "payload": [
        {
            "data": [
                {
                    "type": "MEMORY",
                    "memlevel": "MEMBLOCK",
                    "memlabel": "my cat is born in #2000",
                    "start_time_utc": "2023-09-19T20:31:00.000+00:00",
                    "source": {
                        "type": "text",
                        "name": "Twitter"
                    },
                    "topics": [
                        {
                            "value": "pet"
                        },
                        {
                            "value": "cat"
                        },
                        {
                            "value": "meow two"
                        }
                    ]
                }
            ]
        }
    ]
}