---
title: "SSE endpoint streaming each stdout/stderr line from a detached job as it's produced. Mirrors the `Command.logs()` async iterator shape on `@vercel/sandbox` — events carry `{ stream, data }`."
method: GET
path: "/v1/sandboxes/{id}/jobs/{job_id}/logs"
tags: ["Sandboxes"]
---

# SSE endpoint streaming each stdout/stderr line from a detached job as it's produced. Mirrors the \`Command.logs()\` async iterator shape on \`@vercel/sandbox\` — events carry \`{ stream, data }\`.

`GET /v1/sandboxes/{id}/jobs/{job_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}/jobs/{job_id}/logs`
- Auth: HTTP bearer

Late subscribers only see events produced after they connect. The
JobState snapshot (`GET /jobs/{job_id}`) covers the history.

A "done" sentinel event fires when the broadcast channel closes
(the exec task has exited and dropped the sender), signalling
callers they can stop reading.

## Path parameters

- `id` string, required
- `job_id` string, required

## Response `200`

SSE stream of log events

## Other responses

- `404`: Sandbox or job not found

## Changes

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

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/v1/sandboxes/:id/jobs/:job_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)
