---
title: "Both sides of one changed file: as last committed, and as it is now."
method: GET
path: "/ai/conversations/{public_id}/sandbox/changes/diff"
tags: ["AI Chat"]
---

# Both sides of one changed file: as last committed, and as it is now.

`GET /ai/conversations/{public_id}/sandbox/changes/diff`

## 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/changes/diff`
- Auth: HTTP bearer

## Path parameters

- `public_id` string, required

## Query parameters

- `repo` string, required
- `path` string, required
- `old_path` string, nullable

## Response `200`

Both sides of the diff

- SandboxFileDiff: Both sides of one file's diff against the last commit.
  - `binary` boolean, required: True when either side is binary; both sides are then `None`.
  - `modified` string, nullable: The file as it is now. `None` when it was deleted.
  - `original` string, nullable: The file as last committed. `None` when it is new.
  - `path` string, required: Path relative to the repository root.
  - `repo` string, required: Absolute path of the repository root.
  - `truncated` boolean, required: True when either side was cut at [`MAX_VIEW_BYTES`].

## Other responses

- `400`: Invalid repository or path
- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Conversation or sandbox not found
- `409`: No sandbox is linked, or it could not be started
- `500`: The Git 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/changes/diff/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)
