Skip to main content
GET
/
pty
/
{session_name}
Create or reconnect to a PTY session.
curl --request GET \
  --url https://api.runloop.ai/pty/{session_name} \
  --header 'Authorization: Bearer <token>'
{
  "created": true,
  "session_name": "<string>",
  "status": "<string>",
  "protocol_version": "<string>",
  "connect_url": "<string>",
  "cols": 123,
  "rows": 123,
  "idle_ttl_seconds": 123
}

Authorizations

Authorization
string
header
required

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

Path Parameters

session_name
string
required

The client-chosen PTY session name. It must be non-empty and use only ASCII letters, digits, '-' and '_'. Reusing the same name reconnects to the same logical PTY session when it is still available.

Query Parameters

cols
string

Optional initial terminal width in character cells. Defaults to 80 when omitted.

rows
string

Optional initial terminal height in character cells. Defaults to 24 when omitted.

Response

OK

created
boolean
required
session_name
string
status
string
protocol_version
string
connect_url
string
cols
integer<int32>
rows
integer<int32>
idle_ttl_seconds
integer<int64>