Sandboxes
Stream sandbox logs
Stream a Runpod sandbox’s container and system logs in real time as Server-Sent Events, with backfill and resumable reconnects via Last-Event-ID.
GET
Streams the sandbox’s logs as Server-Sent Events. Two log sources are available:
The event
container: stdout of the sandbox’s main process.system: lifecycle events, such as image pulls and container starts.
id line and a JSON data payload:
id is the event’s ts timestamp, so an EventSource client that reconnects resumes where it left off by sending Last-Event-ID.
Logs are available only once the sandbox has a backing container, which can lag creation by a short while. Until then, and after the sandbox stops, this endpoint returns 409.
Path parameters
string
required
The sandbox ID.
Query parameters
enum<string>
Log source to stream:
container or system. Omit to include both.integer
default:"100"
Number of historical lines to backfill before streaming live. Set
0 to stream live with no backfill. Maximum 5000. Ignored when since or Last-Event-ID is provided.string<date-time>
RFC 3339 timestamp to resume from. When set,
tail is ignored. Ignored when Last-Event-ID is provided.Headers
string<date-time>
Reconnect cursor: an event
id previously emitted by this endpoint. Takes precedence over since and tail. EventSource sends it automatically on reconnect.Response
Atext/event-stream response. Each event’s data payload has these fields:
string
The log source:
container or system.string
The log line.
string<date-time>
When the line was logged. Also used as the event
id.Errors
Last modified on October 19, 2026