Skip to main content
POST
/
vectors
/
delete
from pinecone import Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

# To get the unique host for an index, 
# see https://docs.pinecone.io/guides/manage-data/target-an-index
index = pc.Index(host="INDEX_HOST")

index.delete(ids=["vec1", "vec2"], namespace="example-namespace")

Documentation Index

Fetch the complete documentation index at: https://docs.pinecone.io/llms.txt

Use this file to discover all available pages before exploring further.

from pinecone import Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

# To get the unique host for an index, 
# see https://docs.pinecone.io/guides/manage-data/target-an-index
index = pc.Index(host="INDEX_HOST")

index.delete(ids=["vec1", "vec2"], namespace="example-namespace")

Authorizations

Api-Key
string
header
required

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

Headers

X-Pinecone-Api-Version
string
default:202601-alpha
required

Required date-based version header

Body

application/json

The request for the delete operation.

ids
string[]

Vectors to delete.

Example:
["id-0", "id-1"]
deleteAll
boolean
default:false

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

Example:

false

namespace
string

The namespace to delete records from, if applicable.

Example:

"example-namespace"

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. See Delete data.

Response

A successful response.

The response for the delete operation.