POST
/
user_memory
/
generate_user_memory
cURL
curl --request POST \
  --url https://api.usecortex.ai/user_memory/generate_user_memory \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --header 'accept: <accept>'
{
  "success": true,
  "generated_user_memories": [
    "<string>"
  ]
}

📋 Functionality

  • Takes user query and user name from request
  • Rewrites the user query using OpenAI (without clarifications)
  • Generates multiple user memories based on both original and rewritten queries
  • Automatically inserts all generated memories into the vector store
  • Returns the list of generated user memories
  • Most sophisticated endpoint combining query processing, memory generation, and storage

Sample Request

curl --location 'https://api.usecortex.ai/user_memory/generate_user_memory?tenant_id={TENANT_ID}&sub_tenant_id={SUB_TENANT_ID}&user_query={USER_QUERY}&user_name={USER_NAME}' \
  --header 'Authorization: Bearer {API_KEY}' \
  --header 'accept: application/json' \
  --header 'Content-Type: application/json'

Authorizations

Authorization
string
header
required

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

Headers

Authorization
string
required

Bearer token (Firebase token)

Content-Type
string
default:application/json
required

Request content type

accept
string
default:application/json
required

Response content type

Query Parameters

tenant_id
string
required

Tenant identifier

sub_tenant_id
string
required

Sub-tenant identifier

user_query
string
required

User query to generate memories from

user_name
string
required

Name of the user for personalization

Response

200
application/json

Generated memories returned successfully

The response is of type object.