Skip to main content
POST
/
api
/
v1
/
pty
/
{session_id}
/
resize
Resize a PTY session
curl --request POST \
  --url https://{sandbox_id_or_name}.sandbox.tensorlake.ai/api/v1/pty/{session_id}/resize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "rows": 123,
  "cols": 123
}
'
{
  "error": "<string>",
  "code": "<string>"
}
Resize a PTY session.

Endpoint

POST /api/v1/pty/{session_id}/resize

Example Request

curl -X POST https://<sandbox-id>.sandbox.tensorlake.ai/api/v1/pty/<session-id>/resize \
  -H "Authorization: Bearer $TENSORLAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rows": 40, "cols": 120}'

Request Body

{
  "rows": 40,
  "cols": 120
}
Tensorlake clamps rows to 1..500 and cols to 1..1000.

Response

Tensorlake returns 204 No Content when the resize is applied. If the session does not exist, Tensorlake returns 404 Not Found.

Authorizations

Authorization
string
header
required

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

Path Parameters

session_id
string
required

The PTY session identifier.

Body

application/json
rows
integer<int32>
required
cols
integer<int32>
required

Response

PTY session resized