---
title: "Stream a command's stdout/stderr as `application/x-ndjson` (`@vercel/sandbox`-compatible). Each line is either `{stream:\"stdout\"|\"stderr\", data:\"...\"}` or `{stream:\"error\", data:{code, message}}`."
method: GET
path: "/v1/sandboxes/{id}/cmd/{cmd_id}/logs"
tags: ["Sandboxes"]
---

# Stream a command's stdout/stderr as \`application/x-ndjson\` (\`@vercel/sandbox\`-compatible). Each line is either \`{stream:"stdout"|"stderr", data:"..."}\` or \`{stream:"error", data:{code, message}}\`.

`GET /v1/sandboxes/{id}/cmd/{cmd_id}/logs`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/v1/sandboxes/{id}/cmd/{cmd_id}/logs`
- Auth: HTTP bearer

## Path parameters

- `id` string, required
- `cmd_id` string, required

## Response `200`

NDJSON stream of log events

## Other responses

- `404`: Sandbox or command not found

## Changes

- **2026-04-25** `774be20905f2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/v1/sandboxes/:id/cmd/:cmd_id/logs/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/3b040526eb43?raw)
