Run Code
run_codeExecute code in a sandboxed Docker container via the OnlineCompiler.io API.
Runs source code with the specified compiler and optional stdin input. Returns output, error, status, cpu time, and memory usage. Code execution is limited to 30 seconds and 512MB RAM.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The source code to execute | |
| input | No | Standard input (stdin) to provide to the program | |
| compiler | Yes | Compiler identifier (e.g. 'python-3.14', 'gcc-15'). Use list_compilers to see all options. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||