> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tensorlake.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Managing Files

> Upload, list, and delete files in Tensorlake — or skip the upload step by passing a pre-signed or publicly accessible URL to the parse endpoint.

You can upload files to Tensorlake for parsing without relying on any external storage like S3.

The file upload API returns a unique `file_id` that can be used with the [parse](/api-reference/v2/parse/parse) endpoint to parse the file.

<Info>
  We also support pre-signed URLs or any publicly accessible URLs for files. You
  can skip the upload step and directly use the
  [parse](/api-reference/v2/parse/parse) endpoint with file URLs.
</Info>

## Upload Files

Files uploaded are scoped to a specific project in your account. The API key provided with the API calls
is used to determine the project to which the file is uploaded. This is used to secure the files uploaded
and isolate them from other projects in your account.

<Warning>
  The file upload API is not intended for files larger than 1 GB. If you have
  files larger than 1 GB, please reach out to us at [support@tensorlake.ai](mailto:support@tensorlake.ai).
</Warning>

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    from tensorlake.documentai import DocumentAI

    doc_ai = DocumentAI(api_key="xxxx")
    file_id = doc_ai.upload(path="/path/to/file.pdf")
    ```
  </Tab>

  <Tab title="curl">
    ```bash theme={null}
    curl -X POST https://api.tensorlake.ai/documents/v2/files \
    -H "Authorization: Bearer <API_KEY>" \
    -F "file=@/path/to/file.pdf"
    ```
  </Tab>
</Tabs>

## List Files

Using the API key for a specific Tensorlake project, you can list all of the files that are a part of that project.

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    from tensorlake.documentai import DocumentAI
    doc_ai = DocumentAI(api_key="xxxx")

    files_page = doc_ai.files()
    ```
  </Tab>

  <Tab title="curl">
    ```bash theme={null}
    curl -X GET https://api.tensorlake.ai/documents/v2/files \
    -H "Authorization: Bearer <API_KEY>"
    ```
  </Tab>
</Tabs>

## Delete Files

If you have documents you want to remove from Tensorlake Cloud, you can quickly delete them by passing in the file\_id.

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    from tensorlake.documentai import DocumentAI

    doc_ai.delete_file(file_id="file_unique_id ")
    ```
  </Tab>

  <Tab title="curl">
    ```bash theme={null}
    curl -X DELETE https://api.tensorlake.ai/documents/v2/files/file_unique_id  \
    -H "Authorization: Bearer <API_KEY>"
    ```
  </Tab>
</Tabs>
