콘텐츠로 이동

Memorize content to Rememberizer

{% openapi src="/assets/images/f-7T1Jx6BU3fZ2U5LsImW1.webp" path="/documents/memorize/" method="post" %} rememberizer_openapi.yml

Example Requests

{% tabs %}

curl -X POST \
  https://api.rememberizer.ai/api/v1/documents/memorize/ \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Important Information",
    "content": "This is important content that I want Rememberizer to remember."
  }'

Info

Replace YOUR_JWT_TOKEN with your actual JWT token.

{% endtab %}

{% tab title="JavaScript" %}

const memorizeContent = async () => {
  const response = await fetch('https://api.rememberizer.ai/api/v1/documents/memorize/', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_JWT_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      name: 'Important Information',
      content: 'This is important content that I want Rememberizer to remember.'
    })
  });

  if (response.status === 201) {
    console.log("Content stored successfully");
  } else {
    console.error("Failed to store content");
    const errorData = await response.json();
    console.error(errorData);
  }
};

memorizeContent();

Info

Replace YOUR_JWT_TOKEN with your actual JWT token.

{% endtab %}

{% tab title="Python" %}

import requests
import json

def memorize_content():
    headers = {
        "Authorization": "Bearer YOUR_JWT_TOKEN",
        "Content-Type": "application/json"
    }

    payload = {
        "name": "Important Information",
        "content": "This is important content that I want Rememberizer to remember."
    }

    response = requests.post(
        "https://api.rememberizer.ai/api/v1/documents/memorize/",
        headers=headers,
        data=json.dumps(payload)
    )

    if response.status_code == 201:
        print("Content stored successfully")
    else:
        print(f"Failed to store content: {response.text}")

memorize_content()

Info

Replace YOUR_JWT_TOKEN with your actual JWT token.

{% endtab %}

Request Parameters

Parameter Type Description
name string Required. A name for the content being stored.
content string Required. The text content to store in Rememberizer.

Response

A successful request returns a 201 Created status code with no response body.

Error Responses

Status Code Description
400 Bad Request - Missing required fields or invalid parameters
401 Unauthorized - Invalid or missing authentication
500 Internal Server Error

Use Cases

This endpoint is particularly useful for:

  1. Storing important notes or information that you want to access later
  2. Adding content that isn't available through integrated data sources
  3. Manually adding information that needs to be searchable
  4. Adding contextual information for LLMs accessing your knowledge base

The stored content becomes searchable through the search endpoints and can be included in mementos.