Run Code
Run code on the box
Executes code inside the specified box. Supports multiple languages (bash, Python, TypeScript) and allows you to configure environment variables, arguments, working directory, and timeouts.
post/boxes/{boxId}/run-code
Path parameters
boxIdstring required
Example:c9bdc193-b54b-4ddb-a035-5ac0c598d32d
Box ID
Request body
Example request
{
"code": "print('Hello, World!')\nprint(2 + 3)",
"language": "python",
"envs": {
"PYTHONPATH": "/usr/lib/python",
"DEBUG": "true"
},
"argv": [
"--help"
],
"workingDir": "/home/user/scripts",
"timeout": "30s"
}Response
Example response
{
"stdout": "Hello, World!\n5"
}