Skip to main content
GET
Read or stream a sandbox command's output

Authorizations

Authorization
string
header
required

Runpod API key authentication. Generate an API key in the Runpod console and send it in the Authorization header as Bearer <api_key>. Keys are scoped to the permissions granted when created; requests may return 403 when a valid key lacks access to the requested resource or action.

Console sessions (Clerk JWTs) act for the signed-in user. To act for a team instead, also send X-Team-Id: <team_id>; it applies only when the user owns or belongs to that team, otherwise the request runs against the user's own account. API keys created inside a team already act for that team and do not need the header.

Path Parameters

id
string
required

Sandbox identifier

commandId
string
required

Command identifier

Pattern: ^[0-9A-Za-z-]{1,64}$

Query Parameters

stream
boolean
default:false

Stream the output as Server-Sent Events instead of returning a snapshot.

offset
integer<int64>

Byte offset to read from. Takes precedence over tail as the start point, but tail still bounds how much is read, so offset=N&tail=M reads about M bytes from N.

Required range: x >= 0
tail
integer<int64>

Read about the last this many bytes. Snapshot only. The size is approximate: the host reads at least about 64 KiB whatever the value, and about 64 KiB more for a command whose output is separated into stdout and stderr. With offset, it bounds how much is read from offset.

Required range: 1 <= x <= 2097152
streams
enum<string>

Only this stream's lines. 409 when the command's output is not separated.

Available options:
stdout,
stderr

Response

Output snapshot, or the event stream with stream=true.

offset
integer<int64>
required

Byte offset of the first byte of output.

nextOffset
integer<int64>
required

Offset to pass as offset to continue after this read.

output
string
required

Output read. At most 256 KiB per call when tail is not set; with tail (up to 2 MiB) a snapshot can be larger.

eof
boolean
required

True when output reaches the end of what has been captured so far. The command has finished only when eof is true and its status is terminal.

Last modified on November 6, 2026