# Upload file to assistant

For guidance and examples, see [Manage files](/guides/upload-your-data-manage-files#upload-a-local-file).

:::code-group
```bash curl theme={null}
PINECONE_API_KEY="YOUR_API_KEY"
ASSISTANT_NAME="example-assistant"
ENCODED_METADATA="%7B%22published%22%3A%222024-01-01%22%2C%22document_type%22%3A%22script%22%7D" # URL encoded metadata - See w3schools.com/tags/ref_urlencode.ASP
LOCAL_FILE_PATH="/Users/jdoe/Downloads/example_file.txt"

curl -X POST "https://prod-1-data.ke.pinecone.io/assistant/files/$ASSISTANT_NAME?metadata=$ENCODED_METADATA" \
     -H "Api-Key: $PINECONE_API_KEY" \
     -F "file=@$LOCAL_FILE_PATH"
```
:::

:::code-group
```json curl theme={null}
{
  "name": "example-file.txt",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "metadata": "{ 'published': '2024-01-01', 'document_type': 'manuscript' }",
  "created_on": "2023-11-07T05:31:56Z",
  "updated_on": "2023-11-07T05:31:56Z",
  "status": "Processing",
  "percent_done": 50,
  "signed_url": "https://storage.googleapis.com/bucket/file.pdf",
  "error_message": "<string>"
}
```
:::

`POST /files/{assistant_name}`

#### Authorizations

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `Api-Key` | `string` | - | Pinecone API Key |

#### Headers

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `X-Pinecone-Api-Version` | `string` | `2025-10` | Required date-based version header |

#### Path Parameters

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `assistant_name` | `string` | - | The name of the assistant to upload files to. |

#### Query Parameters

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `metadata?` | `string` | - | Optional JSON-encoded metadata for files. |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `multimodal?` | `string` | - | Optional flag to opt in to multimodal file processing (PDFs only). Can be either true or false. Default is false. |

#### Response

`200` — File upload has been accepted.

The response format for a successful file upload request.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | `string` | - |  |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` | `string` | - |  |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `metadata?` | `object \| null` | - |  |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `created_on?` | `string` | - |  |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `updated_on?` | `string` | - |  |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `status?` | `string` | - | The current state of the uploaded file. Possible values: - Processing: File is being processed (parsed, chunked, embedded) - Available: Processing completed successfully; file is ready for use - Deleting: Deletion has been initiated but not yet completed - ProcessingFailed: Processing failed with an error Note: Once a file is deleted, the API returns 404 Not Found instead of a file object. |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `percent_done?` | `number \| null` | - | The percentage of the file that has been processed |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `signed_url?` | `string \| null` | - | Example: https://storage.googleapis.com/bucket/file.pdf?... |

A [signed URL](https://cloud.google.com/storage/docs/access-control/signed-urls) that provides temporary, read-only access to the underlying file. Anyone with the link can access the file, so treat it as sensitive data. Expires after a short time.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `error_message?` | `string \| null` | - | A message describing any error during file processing. Provided only if an error occurs. |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `multimodal?` | `boolean` | - | Indicates whether the file was processed as multimodal. |

## Related pages

- [Account management](./account-management-index.md)
- [Admin](./admin-2-index.md)
- [Admin](./admin-index.md)
- [APIs](./apis-index.md)
- [Architecture](./architecture-index.md)
- [Assistants](./assistants-index.md)
- [Bring Your Own Cloud](./bring-your-own-cloud-index.md)
- [Build an assistant](./build-an-assistant-index.md)
- [Build an integration](./build-an-integration-index.md)
- [Changelog](./changelog-index.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
