ベクターストアに新しいテキスト文書を追加
post
Create a new text document in a vector store.
Path parameters
vector-store-idstringRequired
The ID of the vector store.
Header parameters
x-api-keystringRequired
The API key for authentication.
Body
namestringOptional
The name of the document.
textstringOptional
The text content of the document.
Responses
201
Document created successfully.
application/json
post
/vector-stores/{vector-store-id}/documents/createPOST /api/v1/vector-stores/{vector-store-id}/documents/create HTTP/1.1
Host: api.rememberizer.ai
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 29
{
"name": "text",
"text": "text"
}201
Document created successfully.
{
"id": 1,
"name": "text",
"type": "text",
"vector_store": "text",
"size": 1,
"status": "text",
"processing_status": "text",
"indexed_on": "2025-11-08T00:38:52.258Z",
"status_error_message": "text",
"created": "2025-11-08T00:38:52.258Z",
"modified": "2025-11-08T00:38:52.258Z"
}例リクエスト
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": "製品概要",
"text": "私たちの製品は、ベクトル埋め込みを管理するための革新的なソリューションです。既存のシステムとのシームレスな統合を提供し、強力なセマンティック検索機能を備えています。"
}'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',
'製品概要',
'私たちの製品は、ベクトル埋め込みを管理するための革新的なソリューションです。既存のシステムとのシームレスな統合を提供し、強力なセマンティック検索機能を備えています。'
);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',
'製品概要',
'私たちの製品は、ベクトル埋め込みを管理するための革新的なソリューションです。既存のシステムとのシームレスな統合を提供し、強力なセマンティック検索機能を備えています。'
)パスパラメータ
パラメータ
タイプ
説明
vector-store-id
string
必須。 ドキュメントを追加するベクトルストアのID。
リクエストボディ
{
"name": "製品概要",
"text": "私たちの製品は、ベクトル埋め込みを管理するための革新的なソリューションです。既存のシステムとのシームレスな統合を提供し、強力なセマンティック検索機能を備えています。"
}パラメータ
タイプ
説明
name
string
必須。 ドキュメントの名前。
text
string
必須。 ドキュメントのテキスト内容。
レスポンスフォーマット
{
"id": 1234,
"name": "製品概要",
"type": "text/plain",
"vector_store": "vs_abc123",
"size": 173,
"status": "処理中",
"processing_status": "キュー待ち",
"indexed_on": null,
"status_error_message": null,
"created": "2023-06-15T10:15:00Z",
"modified": "2023-06-15T10:15:00Z"
}認証
このエンドポイントは、x-api-key ヘッダーを使用して API キーによる認証を必要とします。
エラー応答
ステータスコード
説明
400
不正なリクエスト - 必須フィールドが欠落しているか、無効なフォーマット
401
認証エラー - 無効または欠落しているAPIキー
404
未発見 - ベクターストアが見つかりません
500
サーバ内部エラー
このエンドポイントを使用すると、テキストコンテンツを直接ベクターストアに追加できます。これは、製品説明、ナレッジベースの記事、またはカスタムコンテンツなど、ファイル形式で存在しない可能性のある情報を保存するのに特に便利です。テキストは自動的にベクター埋め込みに処理され、意味的類似性を使用して検索可能になります。
Last updated