> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tensorlake.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Follow Process Stderr

> Replay captured stderr and follow live stderr over Server-Sent Events.

Replay captured stderr and follow new stderr over Server-Sent Events.

## Endpoint

```http theme={null}
GET /api/v1/processes/{pid}/stderr/follow
```

Use `curl -N` or an SSE client so the connection stays open.

## Example Request

```bash theme={null}
curl -N https://<sandbox-id>.sandbox.tensorlake.ai/api/v1/processes/42/stderr/follow \
  -H "Authorization: Bearer $TENSORLAKE_API_KEY"
```

## SSE Events

Tensorlake first replays any captured stderr, then streams live events:

```text theme={null}
event: output
data: {"line":"Traceback (most recent call last):","timestamp":0}

event: output
data: {"line":"ValueError: invalid input","timestamp":1710000001000}

event: eof
data: {}
```

Stderr-only events do not include a `stream` field. If you need merged stdout and stderr with stream tags, use [Follow Process Output](/api-reference/v2/processes/follow-output).


## OpenAPI

````yaml get /api/v1/processes/{pid}/stderr/follow
openapi: 3.1.0
info:
  title: Tensorlake API
  description: >-
    Tensorlake Cloud APIs for Sandboxes, Document Ingestion, and Serverless
    Workflows
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://api.tensorlake.ai/
security:
  - bearerAuth: []
tags:
  - name: Tensorlake Cloud API
    description: >-
      Tensorlake Cloud APIs for Sandboxes, Document Ingestion, and Serverless
      Workflows
paths:
  /api/v1/processes/{pid}/stderr/follow:
    servers:
      - url: https://{identifier}.sandbox.tensorlake.ai
        description: >-
          Example sandbox proxy host for a specific running sandbox. For
          programmatic access, use the sandbox's `ingress_endpoint`.
        variables:
          identifier:
            default: example-sandbox
            description: The sandbox ID or sandbox name.
    parameters:
      - name: pid
        in: path
        description: The operating system PID of the process.
        required: true
        schema:
          type: integer
          format: int32
    get:
      tags:
        - sandbox-processes
      summary: Follow stderr
      description: Replay captured stderr and follow live stderr over Server-Sent Events.
      operationId: sandbox_process_stderr_follow
      responses:
        '200':
          description: Stderr event stream
          content:
            text/event-stream:
              schema:
                type: string
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````