---
title: "Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint."
url: "https://kongair.terwilligar.com/apis/openai-api-2-3-0/versions/ea92d048-c746-4ead-a6a8-da28d93137d1/operations/deleteVectorStoreFile"
---

> Full API specification: https://kongair.terwilligar.com/apis/openai-api-2-3-0/versions/ea92d048-c746-4ead-a6a8-da28d93137d1.md

# Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint.

`DELETE` `/vector_stores/{vector_store_id}/files/{file_id}`

Operation ID: `deleteVectorStoreFile`

## Path parameters

- `vector_store_id` (string, required) - The ID of the vector store that the file belongs to.
- `file_id` (string, required) - The ID of the file to delete.

## Responses

- `200` - OK

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: OpenAI API
  version: 2.3.0
servers:
  - url: https://api.openai.com/v1
paths:
  /vector_stores/{vector_store_id}/files/{file_id}:
    delete:
      operationId: deleteVectorStoreFile
      tags:
        - Vector stores
      summary: Delete a vector store file. This will remove the file from the vector
        store but the file itself will not be deleted. To delete the file, use
        the [delete file](/docs/api-reference/files/delete) endpoint.
      parameters:
        - in: path
          name: vector_store_id
          required: true
          schema:
            type: string
          description: The ID of the vector store that the file belongs to.
        - in: path
          name: file_id
          required: true
          schema:
            type: string
          description: The ID of the file to delete.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteVectorStoreFileResponse"
      x-oaiMeta:
        name: Delete vector store file
        group: vector_stores
        beta: true
        returns: Deletion status
        examples:
          request:
            curl: |
              curl https://api.openai.com/v1/vector_stores/vs_abc123/files/file-abc123 \
                -H "Authorization: Bearer $OPENAI_API_KEY" \
                -H "Content-Type: application/json" \
                -H "OpenAI-Beta: assistants=v2" \
                -X DELETE
            python: >
              from openai import OpenAI

              client = OpenAI()


              deleted_vector_store_file =
              client.beta.vector_stores.files.delete(
                  vector_store_id="vs_abc123",
                  file_id="file-abc123"
              )

              print(deleted_vector_store_file)
            node.js: >
              import OpenAI from "openai";

              const openai = new OpenAI();


              async function main() {
                const deletedVectorStoreFile = await openai.beta.vectorStores.files.del(
                  "vs_abc123",
                  "file-abc123"
                );
                console.log(deletedVectorStoreFile);
              }


              main();
          response: |
            {
              id: "file-abc123",
              object: "vector_store.file.deleted",
              deleted: true
            }
security:
  - ApiKeyAuth: []
components:
  schemas:
    DeleteVectorStoreFileResponse:
      type: object
      properties:
        id:
          type: string
        deleted:
          type: boolean
        object:
          type: string
          enum:
            - vector_store.file.deleted
          x-stainless-const: true
      required:
        - id
        - object
        - deleted
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
```
