v48

latestOpenAPI 3.0.0raw.githubusercontent.com2025-12-0297180624.8 KB
Box

Get box websocket url

Get the websocket url for the box. This endpoint provides the WebSocket URLs for executing shell commands and running code snippets in the box environment. These URLs allow real-time communication and data exchange with the box, enabling interactive terminal sessions and code execution.

get/boxes/{boxId}/websocket-url

Path parameters

boxIdstring required
Example:c9bdc193-b54b-4ddb-a035-5ac0c598d32d

Box ID

Response

Box websocket url

commandstring required

WebSocket URL for executing shell commands in the box. This endpoint allows real-time command execution with streaming output, supporting interactive terminal sessions and long-running processes.

runCodestring required

WebSocket URL for running code snippets in the box environment. This endpoint enables execution of code in various programming languages with real-time output streaming, perfect for interactive coding sessions and script execution.

Example response

{
  "command": "wss://gbox.ai/api/v1/boxes/8adec333-dd17-4e89-aa99-d8e29b2a6013/exec",
  "runCode": "wss://gbox.ai/api/v1/boxes/8adec333-dd17-4e89-aa99-d8e29b2a6013/run-code"
}