AI Applications

Attach an interactive terminal to an application workspace

Changed on

Upgrades to a WebSocket carrying a PTY in the application's persistent workspace sandbox. Binary frames are raw terminal bytes in both directions; text frames are JSON control ({"type":"resize","cols":N,"rows":N}) and events (ready, exit, error). The thread query parameter names a terminal thread, which owns its shell: attaching the same thread again resumes the running program. Requires sandboxes:exec.

get/ai/applications/{application_public_id}/workspace/terminal

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/ai/applications/{application_public_id}/workspace/terminal
  • Auth: HTTP bearer

Path parameters

application_public_idstring required

Query parameters

threadstring required

Public id of the terminal thread to attach to.

colsinteger nullable

Initial terminal width in columns (default 80).

rowsinteger nullable

Initial terminal height in rows (default 24).

Changes