Create or replace a file in the specified assistant. If a file with the given assistant_file_id already exists, it will be replaced with the new file. If it doesn’t exist, a new file will be created with that identifier.
This operation is asynchronous. The file processing will occur in the background.
For guidance and examples, see Manage files.
Processing operation. The error_message field is present only when the operation status is Failed.Pinecone API Key
Required date-based version header
The name of the assistant to upload files to.
The identifier of the file to be created or replaced. Must be 1-128 characters long and consist only of alphanumeric characters, hyphens (-), or underscores (_).
1 - 128Optional flag to opt in to multimodal file processing (PDFs only). Can be either true or false. Default is false.
The desired file to be uploaded and processed into the assistant.
The file to upload.
Optional metadata associated with the file. This metadata can be used to filter files when listing them or to restrict search results when querying the assistant. Maximum size is 16KB.
{
"created_by": "Jane Doe",
"published": "2025-10-01T00:00:00.000Z",
"tags": ["report", "Q4", "analytics"]
}File upload has been accepted for processing. The file will be created if it doesn't exist, or replaced if it already exists. The operation will complete asynchronously.
The OperationModel describes the status of an ongoing or completed server operation.
The unique identifier for the operation.
"op-1234-abcd-5678"
The kind of action represented by this operation, such as uploading or deleting a file.
"upload_file"
The status of the operation.
Processing: The operation is in progress.Completed: The operation finished successfully.Failed: The operation failed. See error_message for details."Processing"
The timestamp when the operation was created, in ISO 8601 format.
"2025-10-01T12:30:00.000Z"
The identifier of the file being operated on.
"my-file-id-123"
The timestamp when the operation completed or failed, in ISO 8601 format. Present only when status is Completed or Failed.
"2025-10-01T12:35:00.000Z"
The progress made by the operation, as a percentage (0-100).
0 <= x <= 10042
A message describing the error that caused the operation to fail.
Present only when status is Failed.
"File processing failed: unsupported file format."