# 벡터 저장소에서 문서 제거

{% openapi src="/files/fAmF2Kwil50sF5cXMoEX" path="/vector-stores/{vector-store-id}/documents/{document-id}/" method="delete" %}
[rememberizer\_openapi.yml](https://2913883985-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fs0e4JCKQXzEGPRlMO7nt%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media\&token=ac0eeb18-73cf-42a3-93fe-2ff232a978a3)
{% endopenapi %}

## 예제 요청

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

```bash
curl -X DELETE \
  https://api.rememberizer.ai/api/v1/vector-stores/vs_abc123/documents/1234/ \
  -H "x-api-key: YOUR_API_KEY"
```

{% hint style="info" %}
`YOUR_API_KEY`를 실제 Vector Store API 키로, `vs_abc123`를 Vector Store ID로, `1234`를 문서 ID로 교체하세요.
{% endhint %}
{% endtab %}

{% tab title="JavaScript" %}

```javascript
const deleteDocument = async (vectorStoreId, documentId) => {
  const response = await fetch(`https://api.rememberizer.ai/api/v1/vector-stores/${vectorStoreId}/documents/${documentId}/`, {
    method: 'DELETE',
    headers: {
      'x-api-key': 'YOUR_API_KEY'
    }
  });
  
  if (response.status === 204) {
    console.log("문서가 성공적으로 삭제되었습니다");
  } else {
    console.error("문서 삭제에 실패했습니다");
  }
};

deleteDocument('vs_abc123', 1234);
```

{% hint style="info" %}
`YOUR_API_KEY`를 실제 Vector Store API 키로, `vs_abc123`를 Vector Store ID로, `1234`를 문서 ID로 교체하세요.
{% endhint %}
{% endtab %}

{% tab title="Python" %}

```python
import requests

def delete_document(vector_store_id, document_id):
    headers = {
        "x-api-key": "YOUR_API_KEY"
    }
    
    response = requests.delete(
        f"https://api.rememberizer.ai/api/v1/vector-stores/{vector_store_id}/documents/{document_id}/",
        headers=headers
    )
    
    if response.status_code == 204:
        print("문서가 성공적으로 삭제되었습니다")
    else:
        print(f"문서 삭제에 실패했습니다: {response.text}")

delete_document('vs_abc123', 1234)
```

{% hint style="info" %}
`YOUR_API_KEY`를 실제 Vector Store API 키로, `vs_abc123`를 Vector Store ID로, `1234`를 문서 ID로 교체하세요.
{% endhint %}
{% endtab %}
{% endtabs %}

## 경로 매개변수

| 매개변수            | 유형  | 설명                             |
| --------------- | --- | ------------------------------ |
| vector-store-id | 문자열 | **필수.** 문서가 포함된 벡터 저장소의 ID입니다. |
| document-id     | 정수  | **필수.** 삭제할 문서의 ID입니다.         |

## 응답

성공적인 요청은 응답 본문 없이 204 No Content 상태 코드를 반환합니다.

## 인증

이 엔드포인트는 `x-api-key` 헤더에 API 키를 사용하여 인증이 필요합니다.

## 오류 응답

| 상태 코드 | 설명                              |
| ----- | ------------------------------- |
| 401   | 권한 없음 - 잘못되었거나 누락된 API 키        |
| 404   | 찾을 수 없음 - 벡터 저장소 또는 문서를 찾을 수 없음 |
| 500   | 내부 서버 오류                        |

이 엔드포인트는 벡터 저장소에서 문서를 제거할 수 있게 해줍니다. 삭제되면 문서와 그 벡터 임베딩은 더 이상 검색 작업에 사용할 수 없습니다. 이는 구식, 관련 없는 또는 민감한 콘텐츠를 지식 기반에서 제거하는 데 유용합니다.

{% hint style="warning" %}
경고: 문서 삭제는 영구적이며 되돌릴 수 없습니다. 문서를 삭제하기 전에 중요한 문서의 백업을 확보하십시오.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.rememberizer.ai/ko/undefined-1/api-docs/vector-store/remove-a-document-in-vector-store.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
