Read File
Filesystem
Read File
Read a file from the session workspace. Path is relative to the workspace root.
GET
Read File
Overview
Returns the base64-encoded content of a file in the session’s workspace. The workspace is a per-session scratch directory inside the sandbox; paths must be relative (no leading/, no .., no NUL byte, up to 4096 bytes). Large files are truncated at the sandbox-enforced read limit — check truncated in the response.
Path Parameters
Browser session ID (UUID).
Query Parameters
Workspace-relative file path, e.g.
notes/todo.txt.Example Request
Response
Success Response (200)
The requested workspace-relative path.
Base64-encoded file content.
Decoded byte length of the file.
True when the content was truncated to the maximum read size.
Error Responses
| Status | Description |
|---|---|
400 | Invalid path — leading /, contains .., NUL byte, or exceeds 4096 bytes. |
401 | Unauthorized — invalid or missing API key. |
404 | Session or file not found. |
413 | File exceeds the maximum read size. |