Code Execution
code-executeExecute code in a secure sandbox with pre-configured environments. Returns stdout, stderr, the exit code, the run time, and the files the code wrote to /home/user/output/ as base64. Use for calculations, data processing and running scripts. Each call runs in a fresh sandbox that is destroyed afterwards, so nothing carries over from one call to the next. Cost: 2 credits, charged only when a call succeeds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The code to execute. | |
| timeout | No | Max execution time (1-300s). | |
| language | No | Programming language. | python |
| template | No | Pre-configured environment. | default |