POST
/
vectors
/
delete
PINECONE_API_KEY="YOUR_API_KEY"
INDEX_HOST="INDEX_HOST"

curl -X POST "https://$INDEX_HOST/vectors/delete" \
  -H "Api-Key: $PINECONE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "ids": [
      "id-1", 
      "id-2"
    ],
    "namespace": "example-namespace"
  }
'
{}

Authorizations

Api-Key
string
headerrequired

An API Key is required to call Pinecone APIs. Get yours from the console.

Body

application/json
ids
string[]

Vectors to delete.

deleteAll
boolean
default: false

This indicates that all vectors in the index namespace should be deleted.

namespace
string

The namespace to delete vectors from, if applicable.

filter
object

If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive with specifying IDs to delete in the ids param or using delete_all=True. For guidance and examples, see filtering-with-metadata.

Serverless indexes do not support delete by metadata. Instead, you can use the list operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID.

Response

200 - application/json

The response for the delete operation.