> For the complete documentation index, see [llms.txt](https://docs.rememberizer.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rememberizer.ai/vi/tai-nguyen-cho-nha-phat-trien/api-docs/memorize-content-to-rememberizer.md).

# Ghi nhớ nội dung vào Rememberizer

{% openapi src="/files/uCR2Hrq9CjDxpCLaqzhl" path="/documents/memorize/" method="post" %}
[rememberizer\_openapi.yml](https://4187618229-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwbxu0T4faQnPtKbPzrD5%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media\&token=b77a395b-ed7b-4546-9ec7-182d4939fd1b)
{% endopenapi %}

## Ví dụ Yêu cầu

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST \
  https://api.rememberizer.ai/api/v1/documents/memorize/ \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Thông tin Quan trọng",
    "content": "Đây là nội dung quan trọng mà tôi muốn Rememberizer ghi nhớ."
  }'
```

{% hint style="info" %}
Thay thế `YOUR_JWT_TOKEN` bằng mã thông báo JWT thực tế của bạn.
{% endhint %}
{% endtab %}

{% tab title="JavaScript" %}

```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: 'Thông tin Quan trọng',
      content: 'Đây là nội dung quan trọng mà tôi muốn Rememberizer ghi nhớ.'
    })
  });
  
  if (response.status === 201) {
    console.log("Nội dung đã được lưu thành công");
  } else {
    console.error("Lưu nội dung không thành công");
    const errorData = await response.json();
    console.error(errorData);
  }
};

memorizeContent();
```

{% hint style="info" %}
Thay thế `YOUR_JWT_TOKEN` bằng mã thông báo JWT thực tế của bạn.
{% endhint %}
{% endtab %}

{% tab title="Python" %}

```python
import requests
import json

def memorize_content():
    headers = {
        "Authorization": "Bearer YOUR_JWT_TOKEN",
        "Content-Type": "application/json"
    }
    
    payload = {
        "name": "Thông tin Quan trọng",
        "content": "Đây là nội dung quan trọng mà tôi muốn Rememberizer ghi nhớ."
    }
    
    response = requests.post(
        "https://api.rememberizer.ai/api/v1/documents/memorize/",
        headers=headers,
        data=json.dumps(payload)
    )
    
    if response.status_code == 201:
        print("Nội dung đã được lưu thành công")
    else:
        print(f"Lưu nội dung không thành công: {response.text}")

memorize_content()
```

{% hint style="info" %}
Thay thế `YOUR_JWT_TOKEN` bằng mã thông báo JWT thực tế của bạn.
{% endhint %}
{% endtab %}
{% endtabs %}

## Tham số yêu cầu

| Tham số | Loại  | Mô tả                                                         |
| ------- | ----- | ------------------------------------------------------------- |
| name    | chuỗi | **Bắt buộc.** Một tên cho nội dung được lưu trữ.              |
| content | chuỗi | **Bắt buộc.** Nội dung văn bản để lưu trữ trong Rememberizer. |

## Phản hồi

Một yêu cầu thành công trả về mã trạng thái 201 Đã tạo mà không có nội dung phản hồi.

## Phản hồi Lỗi

| Mã Trạng Thái | Mô Tả                                                                      |
| ------------- | -------------------------------------------------------------------------- |
| 400           | Yêu cầu không hợp lệ - Thiếu các trường bắt buộc hoặc tham số không hợp lệ |
| 401           | Không được phép - Xác thực không hợp lệ hoặc thiếu                         |
| 500           | Lỗi Máy Chủ Nội Bộ                                                         |

## Trường Hợp Sử Dụng

Điểm cuối này đặc biệt hữu ích cho:

1. Lưu trữ các ghi chú hoặc thông tin quan trọng mà bạn muốn truy cập sau này
2. Thêm nội dung không có sẵn thông qua các nguồn dữ liệu tích hợp
3. Thêm thông tin thủ công cần phải có thể tìm kiếm
4. Thêm thông tin ngữ cảnh cho các LLM truy cập vào cơ sở kiến thức của bạn

Nội dung đã lưu trữ trở nên có thể tìm kiếm thông qua các điểm cuối tìm kiếm và có thể được bao gồm trong các kỷ niệm.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.rememberizer.ai/vi/tai-nguyen-cho-nha-phat-trien/api-docs/memorize-content-to-rememberizer.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
