Skip to main content
POST
/
api
/
v1
/
processes
/
{pid}
/
stdin
Write to stdin
curl --request POST \
  --url https://{sandbox_id_or_name}.sandbox.tensorlake.ai/api/v1/processes/{pid}/stdin \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/octet-stream' \
  --data '"<string>"'
{
  "error": "<string>",
  "code": "<string>"
}
Write raw bytes to a process’s stdin. The process must be started with stdin_mode: "pipe" for this endpoint to work.

Write to Stdin

POST /api/v1/processes/{pid}/stdin
curl -X POST https://<sandbox-id>.sandbox.tensorlake.ai/api/v1/processes/42/stdin \
  -H "Authorization: Bearer $TENSORLAKE_API_KEY" \
  -H "Content-Type: application/octet-stream" \
  --data-binary "print('hello')\n"
Tensorlake returns 204 No Content when the bytes are accepted. If stdin was not opened in pipe mode, Tensorlake returns 400 Bad Request. Missing processes return 404 Not Found. To deliver EOF without killing the process, use Close Process Stdin.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

pid
integer<int32>
required

The operating system PID of the process.

Body

application/octet-stream

The body is of type file.

Response

Stdin bytes accepted