> ## 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.

# Get Process Stderr

> Read the captured stderr lines for a process.

Read stderr that has already been captured for a process.

## Endpoint

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

## Example Request

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

## Response

Tensorlake returns `200 OK`:

```json theme={null}
{
  "pid": 42,
  "lines": [
    "Traceback (most recent call last):",
    "ValueError: invalid input"
  ],
  "line_count": 2
}
```

If you need stdout only, use [Get Process Stdout](/api-reference/v2/processes/stdout). If you need both streams merged, use [Get Process Output](/api-reference/v2/processes/output).


## OpenAPI

````yaml get /api/v1/processes/{pid}/stderr
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:
    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: Get stderr
      description: Read the captured stderr lines for a process.
      operationId: sandbox_process_stderr
      responses:
        '200':
          description: Captured stderr
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxProcessOutputResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxProxyError'
components:
  schemas:
    SandboxProcessOutputResponse:
      type: object
      required:
        - pid
        - lines
        - line_count
      properties:
        pid:
          type: integer
          format: int32
        lines:
          type: array
          items:
            type: string
        line_count:
          type: integer
          format: int32
    SandboxProxyError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        code:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````