Add new text document to a Vector Store¶
{% openapi src="/assets/images/f-7T1Jx6BU3fZ2U5LsImW1.webp" path="/vector-stores/{vector-store-id}/documents/create" method="post" %} rememberizer_openapi.yml
Example Requests¶
{% tabs %}
curl -X POST \
https://api.rememberizer.ai/api/v1/vector-stores/vs_abc123/documents/create \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Product Overview",
"text": "Our product is an innovative solution for managing vector embeddings. It provides seamless integration with your existing systems and offers powerful semantic search capabilities."
}'
Info
Replace YOUR_API_KEY with your actual Vector Store API key and vs_abc123 with your Vector Store ID.
{% endtab %}
{% tab title="JavaScript" %}
const addTextDocument = async (vectorStoreId, name, text) => {
const response = await fetch(`https://api.rememberizer.ai/api/v1/vector-stores/${vectorStoreId}/documents/create`, {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: name,
text: text
})
});
const data = await response.json();
console.log(data);
};
addTextDocument(
'vs_abc123',
'Product Overview',
'Our product is an innovative solution for managing vector embeddings. It provides seamless integration with your existing systems and offers powerful semantic search capabilities.'
);
Info
Replace YOUR_API_KEY with your actual Vector Store API key and vs_abc123 with your Vector Store ID.
{% endtab %}
{% tab title="Python" %}
import requests
import json
def add_text_document(vector_store_id, name, text):
headers = {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"name": name,
"text": text
}
response = requests.post(
f"https://api.rememberizer.ai/api/v1/vector-stores/{vector_store_id}/documents/create",
headers=headers,
data=json.dumps(payload)
)
data = response.json()
print(data)
add_text_document(
'vs_abc123',
'Product Overview',
'Our product is an innovative solution for managing vector embeddings. It provides seamless integration with your existing systems and offers powerful semantic search capabilities.'
)
Info
Replace YOUR_API_KEY with your actual Vector Store API key and vs_abc123 with your Vector Store ID.
{% endtab %}
Path Parameters¶
| Parameter | Type | Description |
|---|---|---|
| vector-store-id | string | Required. The ID of the vector store to add the document to. |
Request Body¶
{
"name": "Product Overview",
"text": "Our product is an innovative solution for managing vector embeddings. It provides seamless integration with your existing systems and offers powerful semantic search capabilities."
}
| Parameter | Type | Description |
|---|---|---|
| name | string | Required. The name of the document. |
| text | string | Required. The text content of the document. |
Response Format¶
{
"id": 1234,
"name": "Product Overview",
"type": "text/plain",
"vector_store": "vs_abc123",
"size": 173,
"status": "processing",
"processing_status": "queued",
"indexed_on": null,
"status_error_message": null,
"created": "2023-06-15T10:15:00Z",
"modified": "2023-06-15T10:15:00Z"
}
Authentication¶
This endpoint requires authentication using an API key in the x-api-key header.
Error Responses¶
| Status Code | Description |
|---|---|
| 400 | Bad Request - Missing required fields or invalid format |
| 401 | Unauthorized - Invalid or missing API key |
| 404 | Not Found - Vector Store not found |
| 500 | Internal Server Error |
This endpoint allows you to add text content directly to your vector store. It's particularly useful for storing information that might not exist in file format, such as product descriptions, knowledge base articles, or custom content. The text will be automatically processed into vector embeddings, making it searchable using semantic similarity.