Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Theme

Delete vector store

client.VectorStores.Delete(ctx, vectorStoreID) (*VectorStoreDeleted, error)
DELETE
/vector_stores/{vector_store_id}

Delete a vector store.

Delete vector store

package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  vectorStoreDeleted, err := client.VectorStores.Delete(context.TODO(), "vector_store_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", vectorStoreDeleted.ID)
}
Response example
{
  "id": "vs_abc123",
  "object": "vector_store.deleted",
  "deleted": true
}
Parameters
vectorStoreID string
Returns
type VectorStoreDeleted struct{…}
ID string
Deleted bool
Object VectorStoreDeleted
Returns Examples
Response example
{
  "id": "vs_abc123",
  "object": "vector_store.deleted",
  "deleted": true
}