# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
pc.assistants.delete_file(
assistant_name="example-assistant",
file_id="070513b3-022f-4966-b583-a9b12e0290ff",
)
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
const assistant = pc.assistant({ name: 'example-assistant' });
const operation = await assistant.deleteFile('070513b3-022f-4966-b583-a9b12e0290ff');
console.log(operation);
PINECONE_API_KEY="YOUR_API_KEY"
ASSISTANT_NAME="example-assistant"
FILE_ID="070513b3-022f-4966-b583-a9b12e0290ff"
curl -X DELETE "https://prod-1-data.ke.pinecone.io/assistant/files/$ASSISTANT_NAME/$FILE_ID" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2026-07"
{
"id": "op-1234-abcd-5678",
"operation_type": "upload_file",
"status": "Processing",
"created_on": "2025-10-01T12:30:00.000Z",
"file_id": "my-file-id-123",
"completed_on": "2025-10-01T12:35:00.000Z",
"percent_complete": 42,
"error_message": "File processing failed: unsupported file format.",
"ingestion_units": 50
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Invalid API key."
},
"status": 401
}{
"error": {
"code": "NOT_FOUND",
"message": "File with id 72490b32-46d9-4db1-b48b-666e9176d9be not found in provided assistant"
},
"status": 404
}{
"error": {
"code": "UNKNOWN",
"message": "Internal server error"
},
"status": 500
}Files
Delete a file
Delete an uploaded file from an assistant.
This operation is asynchronous. The response includes an operation ID that can be used to poll for completion via the describe operation endpoint.
DELETE
/
files
/
{assistant_name}
/
{assistant_file_id}
# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
pc.assistants.delete_file(
assistant_name="example-assistant",
file_id="070513b3-022f-4966-b583-a9b12e0290ff",
)
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
const assistant = pc.assistant({ name: 'example-assistant' });
const operation = await assistant.deleteFile('070513b3-022f-4966-b583-a9b12e0290ff');
console.log(operation);
PINECONE_API_KEY="YOUR_API_KEY"
ASSISTANT_NAME="example-assistant"
FILE_ID="070513b3-022f-4966-b583-a9b12e0290ff"
curl -X DELETE "https://prod-1-data.ke.pinecone.io/assistant/files/$ASSISTANT_NAME/$FILE_ID" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2026-07"
{
"id": "op-1234-abcd-5678",
"operation_type": "upload_file",
"status": "Processing",
"created_on": "2025-10-01T12:30:00.000Z",
"file_id": "my-file-id-123",
"completed_on": "2025-10-01T12:35:00.000Z",
"percent_complete": 42,
"error_message": "File processing failed: unsupported file format.",
"ingestion_units": 50
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Invalid API key."
},
"status": 401
}{
"error": {
"code": "NOT_FOUND",
"message": "File with id 72490b32-46d9-4db1-b48b-666e9176d9be not found in provided assistant"
},
"status": 404
}{
"error": {
"code": "UNKNOWN",
"message": "Internal server error"
},
"status": 500
}# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
pc.assistants.delete_file(
assistant_name="example-assistant",
file_id="070513b3-022f-4966-b583-a9b12e0290ff",
)
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
const assistant = pc.assistant({ name: 'example-assistant' });
const operation = await assistant.deleteFile('070513b3-022f-4966-b583-a9b12e0290ff');
console.log(operation);
PINECONE_API_KEY="YOUR_API_KEY"
ASSISTANT_NAME="example-assistant"
FILE_ID="070513b3-022f-4966-b583-a9b12e0290ff"
curl -X DELETE "https://prod-1-data.ke.pinecone.io/assistant/files/$ASSISTANT_NAME/$FILE_ID" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2026-07"
Path Parameters
Response
The request to delete the file has been accepted. The deletion will be processed asynchronously.
Describes the status of an ongoing or completed server operation.
Was this page helpful?