Read File
Filesystem API
Read File
Read the content of a file inside a sandbox.
GET
Read File
Reads the specified file from the sandbox filesystem and returns its raw content
as a plain-text response body (
Content-Type: text/plain). The bytes are returned
unmodified — no encoding is applied.
Path Parameters
The sandbox identifier. Format:
sbx-<8 chars>.Query Parameters
Absolute path of the file to read inside the sandbox.Example:
/home/user/script.pyResponse
Returns the raw file content astext/plain. The response body is the file’s
bytes — no JSON wrapper.
Example
Error Responses
| Status | Cause |
|---|---|
401 | Missing or invalid API key |
404 | File not found or sandbox not found |
409 | Sandbox is paused — resume it before accessing files |
410 | Sandbox has been killed |
502 | envd daemon unreachable |
503 | Sandbox has no VM |