Authorizations
Enter your API Key in the format: Bearer <token>. Get it from https://gbox.ai
Path Parameters
Box ID
"c9bdc193-b54b-4ddb-a035-5ac0c598d32d"
Body
Request parameters for running code in various languages
The code to run
"print('Hello, World!')\nprint(2 + 3)"
The language of the code.
bash
, python
, typescript
"python"
The environment variables to run the code
{
"PYTHONPATH": "/usr/lib/python",
"DEBUG": "true"
}
The arguments to run the code. For example, if you want to run "python index.py --help", you should pass ["--help"] as arguments.
["--help"]
The working directory of the code. It not provided, the code will be run in the box.config.workingDir
directory.
"/home/user/scripts"
The timeout of the code execution. If the code execution times out, the exit code will be 124.
Supported time units: ms (milliseconds), s (seconds), m (minutes), h (hours) Example formats: "500ms", "30s", "5m", "1h" Default: 30s
"30s"