Skip to main content
GET
Streams the sandbox’s logs as Server-Sent Events. Two log sources are available:
  • container: stdout of the sandbox’s main process.
  • system: lifecycle events, such as image pulls and container starts.
Output from exec commands doesn’t appear in this stream. An open log stream counts as activity, so it keeps the sandbox from timing out as idle. Each event has an id line and a JSON data payload:
The event 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

A text/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