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

# Files

> Move files in and out of a sandbox

<CodeGroup>
  ```bash CLI theme={null}
  # Push local files into the sandbox
  prime sandbox upload sbx_123 notebooks/analysis.ipynb /workspace/

  # Pull results back
  prime sandbox download sbx_123 /workspace/report.csv reports/latest.csv
  ```

  ```python Python theme={null}
  client.upload_file(sandbox.id, "/workspace/model.bin", "./artifacts/model.bin")
  client.download_file(sandbox.id, "/workspace/report.csv", "./reports/report.csv")

  # Read small files directly
  contents = client.read_file(sandbox.id, "/workspace/report.csv")
  print(contents.content[:80])
  ```
</CodeGroup>

* Uploads are limited to **16 MiB per file**. They overwrite existing files and create missing parent directories.
* `read_file` is capped at **10 MiB** and raises `SandboxFileTooLargeError` past it; use `download_file` for large files.
* Transfers use short-lived gateway tokens stored in a local cache. If you rotate credentials or hit 401s, run `prime sandbox reset-cache` (CLI) or `client.clear_auth_cache()` (SDK).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.