> ## Documentation Index
> Fetch the complete documentation index at: https://api-reference.scale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# File Endpoints

> File Upload File Import Get Assets

# File Upload

\*\* File Upload Size:\*\* There is a size limit of 80 MB per file. Need more? **[Get in touch](/docs/customer-support)**.

<ParamField path="Body Params" type="object">
  <ParamField path="file" type="file" required>
    The local file to be uploaded.

    ***
  </ParamField>

  <ParamField path="display_name" type="string">
    A human readable name for the file.

    ***
  </ParamField>

  <ParamField path="project_name" type="string">
    Which project this file will be associated with. This is only used for the "Scale Rapid" data labeling tool. In order to upload the same file to multiple projects, call the File Upload API multiple times with the same id and different project\_name values.

    ***
  </ParamField>

  <ParamField path="reference_id" type="string">
    A unique identifier for your file used for upload idempotency. Uploading two files with the same\_reference\_id will result in a 409 (Conflict) error.

    ***
  </ParamField>

  <ParamField path="metadata" type="object">
    A JSON object used to store additional data associated with the file.

    ***
  </ParamField>
</ParamField>

<CodeGroup>
  ```python Python theme={null}
  import requests
  from requests.auth import HTTPBasicAuth
  import json


  url = "https://api.scale.com/v1/files/upload"

  auth = HTTPBasicAuth('{{api_key}}', '')

  headers = {
      "Accept": "application/json",
  }

  with open("kitten.png", "rb") as f:
      response = requests.request(
          "POST",
          url,
          data={
              "project_name": "kitten_labeling",
              "metadata": json.dumps({"id": "kitten0"}),
          },
          files={"file": f},
          headers=headers,
          auth=auth,
      )
      print(response.text)

  ```

  ```python Python SDK theme={null}
  with open(file_name, 'rb') as f:
      my_file = client.upload_file(
          file=f,
          project_name = "test_project",
      )
  ```
</CodeGroup>

<CodeGroup />

# File Import

<ParamField path="Body Params" type="object">
  <ParamField path="file_url" type="file" required>
    The file url to be uploaded.

    ***
  </ParamField>
</ParamField>

<CodeGroup>
  ```python Python theme={null}
  import requests
  url = "https://api.scale.com/v1/files/import"
  payload = { "file_url": "http://www.example.com/file.png" }
  headers = {
      "accept": "application/json",
      "content-type": "application/json",
      "authorization": "<YOUR_API_KEY>"
  }
  response = requests.post(url, json=payload, headers=headers)
  print(response.text)
  ```

  ```python Python SDK theme={null}
  my_file = client.import_file(
      file_url="http://i.imgur.com/v4cBreD.jpg",
      project_name = "test_project",
  )
  ```
</CodeGroup>

<CodeGroup />

# Get Assets

<ParamField path="Body Params" type="object">
  <ParamField path="project" type="string" required>
    Project filter

    ***
  </ParamField>

  <ParamField path="metadata" type="string">
    Metadata filter

    ***
  </ParamField>

  <ParamField path="cursor" type="string">
    Cursor for pagination

    ***
  </ParamField>
</ParamField>

<CodeGroup />

<CodeGroup />
