Manage files ↗
noOriginal Documentation
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.
List, check status, and delete files from your assistant.
File upload limitations depend on the plan you are using. For more information, see Pricing and limitations.
List files in an assistant#
View all files#
You can get the status, ID, and metadata for each file in your assistant, as in the following example:
# To use the Python SDK, install the plugin:
# pip install --upgrade pinecone pinecone-plugin-assistant
from pinecone import Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
# Get your assistant.
assistant = pc.assistant.Assistant(
assistant_name="example-assistant",
)
# List files in your assistant.
files = assistant.list_files()import { Pinecone } from '@pinecone-database/pinecone'
const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' });
const assistantName = 'example-assistant';
const assistant = pc.Assistant(assistantName);
const files = await assistant.listFiles();
console.log(files);PINECONE_API_KEY="YOUR_API_KEY"
ASSISTANT_NAME="example-assistant"
curl -X GET "https://prod-1-data.ke.pinecone.io/assistant/files/$ASSISTANT_NAME" \
-H "Api-Key: $PINECONE_API_KEY"This operation returns a response like the following:
{
"files": [
{
"status": "Available",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "example_file.txt",
"size": 1073470,
"metadata": {},
"updated_on": "2025-07-16T16:46:40.787204651Z",
"created_on": "2025-07-16T16:45:59.414273474Z",
"percent_done": 1.0,
"signed_url": null,
"error_message": null
}
]
}You can use the id value to check the status of an individual file.
You can list file in an assistant using the Pinecone console. Select the assistant and view the files in the Assistant playground.
View a filtered list of files#
Metadata filter expressions can be included when listing files. This will limit the list of files to only those matching the filter expression. Use the filter parameter to specify the metadata filter expression.
For more information about filtering with metadata, see Understanding files.
The following example lists files that are a manuscript:
# To use the Python SDK, install the plugin:
# pip install --upgrade pinecone pinecone-plugin-assistant
from pinecone import Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
# Get your assistant.
assistant = pc.assistant.Assistant(
assistant_name="example-assistant",
)
# List files in your assistant that match the metadata filter.
files = assistant.list_files(filter={"document_type":"manuscript"})import { Pinecone } from '@pinecone-database/pinecone'
const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' });
const assistantName = 'example-assistant';
const assistant = pc.Assistant(assistantName);
const files = await assistant.listFiles({
filter: { document_type: 'manuscript' },
});
console.log(files);
// You can also use filter operators:
// const files = await assistant.listFiles({
// filter: { document_type: { '$ne': 'manuscript' } },
// });
PINECONE_API_KEY="YOUR_API_KEY"
ASSISTANT_NAME="example-assistant"
ENCODED_METADATA="%7B%22document_type%22%3A%20%22manuscript%22%7D" # URL encoded metadata - See w3schools.com/tags/ref_urlencode.ASP
curl -X GET "https://prod-1-data.ke.pinecone.io/assistant/files/$ASSISTANT_NAME?filter=$ENCODED_METADATA" \
-H "Api-Key: $PINECONE_API_KEY"Get the status of a file#
You can get the status and metadata for your assistant, as in the following example:
# To use the Python SDK, install the plugin:
# pip install --upgrade pinecone pinecone-plugin-assistant
from pinecone import Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
# Get an assistant.
assistant = pc.assistant.Assistant(
assistant_name="example-assistant",
)
# Describe a file.
# To get a signed URL in the response, set `include_url` to `True`.
file = assistant.describe_file(file_id="3c90c3cc-0d44-4b50-8888-8dd25736052a", include_url=True)import { Pinecone } from '@pinecone-database/pinecone'
const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' });
const assistantName = 'example-assistant';
const assistant = pc.Assistant(assistantName);
const fileId = "3c90c3cc-0d44-4b50-8888-8dd25736052a";
// Describe a file. Returns a signed URL by default.
const file = await assistant.describeFile(fileId)
// To exclude signed URL, set `includeUrl` to `false`.
// const includeUrl = false;
// const file = await assistant.describeFile(fileId, includeUrl)
PINECONE_API_KEY="YOUR_API_KEY"
ASSISTANT_NAME="example-assistant"
FILE_ID="3c90c3cc-0d44-4b50-8888-8dd25736052a"
# Describe a file.
# To get a signed URL in the response, set `include_url` to `true`.
curl -X GET "https://prod-1-data.ke.pinecone.io/assistant/files/$ASSISTANT_NAME/$FILE_ID?include_url=true" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2025-10"This operation returns a response like the following:
{
"status": "Available",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "example_file.txt",
"size": 1073470,
"metadata": {},
"updated_on": "2025-07-16T16:46:40.787204651Z",
"created_on": "2025-07-16T16:45:59.414273474Z",
"percent_done": 1.0,
"signed_url": "https://storage.googleapis.com/...",
"error_message": null
}
signed_url provides temporary, read-only access to the relevant file. Anyone with the link can access the file, so treat it as sensitive data. Expires in one hour.
You can check the status a file using the Pinecone console. In the Assistant playground, click the file for more details.
Delete a file#
You can delete a file from an assistant.
# To use the Python SDK, install the plugin:
# pip install --upgrade pinecone pinecone-plugin-assistant
from pinecone import Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
# Get your assistant.
assistant = pc.assistant.Assistant(
assistant_name="example-assistant",
)
# Delete a file from your assistant.
assistant.delete_file(file_id="3c90c3cc-0d44-4b50-8888-8dd25736052a")import { Pinecone } from '@pinecone-database/pinecone'
const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' });
const assistantName = 'example-assistant';
const assistant = pc.Assistant(assistantName);
const file = await assistant.deleteFile("070513b3-022f-4966-b583-a9b12e0290ff")PINECONE_API_KEY="YOUR_API_KEY"
ASSISTANT_NAME="example-assistant"
FILE_ID="3c90c3cc-0d44-4b50-8888-8dd25736052a"
curl -X DELETE "https://prod-1-data.ke.pinecone.io/assistant/files/$ASSISTANT_NAME/$FILE_ID" \
-H "Api-Key: $PINECONE_API_KEY"- Once a file is deleted, you cannot recover it.
- You can delete a file while it is still processing. You do not need to wait for processing to complete.
- You can also delete a file from an assistant using the Pinecone console. In the Assistant playground, find the file and click the ellipsis (…) menu > Delete.