---
title: "One file of the chat's sandbox, for the viewer. Text is cut at 1 MiB; binary files come back without content."
method: GET
path: "/ai/conversations/{public_id}/sandbox/file"
tags: ["AI Chat"]
---

# One file of the chat's sandbox, for the viewer. Text is cut at 1 MiB; binary files come back without content.

`GET /ai/conversations/{public_id}/sandbox/file`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/ai/conversations/{public_id}/sandbox/file`
- Auth: HTTP bearer

## Path parameters

- `public_id` string, required

## Query parameters

- `path` string, required

## Response `200`

File content

- SandboxFileView: One file of the chat's sandbox, for the viewer.
  - `binary` boolean, required
  - `content` string, nullable: The text, or its first [`MAX_VIEW_BYTES`] when `truncated`. `None` for a binary file.
  - `path` string, required: Absolute path inside the sandbox.
  - `size` integer, required: Size in bytes of the whole file.
  - `truncated` boolean, required

## Other responses

- `400`: Invalid path
- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Conversation, sandbox or file not found
- `409`: No sandbox is linked, or it could not be started
- `500`: The read command failed
- `503`: This server has no sandbox backend
- `504`: The sandbox did not answer in time

## Changes

> 81 revisions in range; 1 not diffed.

- **2026-10-20** `79089e9f49ee`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/ai/conversations/:public_id/sandbox/file/get.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) · [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) · [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/ab6d5d19e930?raw)
