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

# Close Process Stdin

> Close a process stdin pipe and deliver EOF to the process.

Close a process's stdin pipe and deliver EOF.

The process must be started with `stdin_mode: "pipe"` for this endpoint to work.

## Endpoint

```http theme={null}
POST /api/v1/processes/{pid}/stdin/close
```

## Example Request

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

## Response

Tensorlake returns `204 No Content` when stdin is closed.

If stdin was not opened in `pipe` mode, Tensorlake returns `400 Bad Request`. Missing processes return `404 Not Found`.


## OpenAPI

````yaml post /api/v1/processes/{pid}/stdin/close
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}/stdin/close:
    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
    post:
      tags:
        - sandbox-processes
      summary: Close stdin
      description: Close a process stdin pipe and deliver EOF to the process.
      operationId: sandbox_process_stdin_close
      responses:
        '204':
          description: Stdin closed
        '400':
          description: Stdin is not writable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxProxyError'
        '404':
          description: Process not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxProxyError'
components:
  schemas:
    SandboxProxyError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        code:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````