Skip to main content
A sidecar runs your Node.js or Python program inside the session’s virtual machine. Upload a single file or a gzip tar archive with an entry file. The process runs for the session’s lifetime. The browser’s CDP address is available in TILION_CDP_URL. The program must listen for HTTP on the port specified by PORT. The passthrough endpoint provides external access because the sidecar has no independent network access. Sidecars must be enabled for the account. Otherwise, these routes return 403 sidecar_not_enabled.

PUT /v1/session/{session_id}/sidecar

Upload and start the session’s sidecar. Auth: Bearer API key (sessions:write). Request: Response: {"session_id": "...", "state": "..."}. Errors: 403 sidecar_not_enabled; 404 or 410 for a session that is not yours or has ended; 409 sidecar_unavailable (this session has no sidecar slot (create a new session)); 422 bundle_b64 is not base64, 422 sidecar_start_failed with the runner’s message, or a 422 validation list for a bad runtime or entry.

GET /v1/session/{session_id}/sidecar

The sidecar’s state. Add ?log=true for its output so far in log. Auth: Bearer API key. On a session with no sidecar:
Errors: 403 sidecar_not_enabled; 409 sidecar_unavailable; 404 or 410 for the session.

DELETE /v1/session/{session_id}/sidecar

Stop the sidecar. The session keeps running. Answers 204 No Content. Errors: 403, 409, 404 or 410 as above.

GET, POST, PUT, PATCH, DELETE /v1/session/{session_id}/sidecar/http/{path}

Call your sidecar’s own HTTP API. The path after /http/, the query string, the body and the Content-Type and Accept headers pass through; the sidecar’s status, body and content type come back as it wrote them. A call may run for up to 300 seconds. Auth: Bearer API key with sessions:write, for every method including GET. With no sidecar running:
Errors: 502 sidecar_unreachable when nothing is listening on the port (not started, crashed, or still starting); 403 sidecar_not_enabled; 409 sidecar_unavailable; 404 or 410 for the session.