runtime_sandboxes_interpreter_run
Run code in a stateful interpreter inside a running sandbox: variables and imports persist per context, like notebook cells (Go keeps declarations, not values). Returns stdout, stderr, results (text, HTML, PNG charts, tables for DataFrames) and any error with its traceback; values over 48 KiB come back as refs to files. For data analysis, charts and quick computations; runtime_sandboxes_exec runs shell commands. timeoutMs defaults to 300000.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| code | Yes | ||
| context | No | A context's id; each language's name is its default context, started on first use. | |
| language | No | python by default. R, Java and Go are installed on first use (tens of seconds, once) when the image lacks them. | |
| timeoutMs | No | ||
| idempotencyKey | No | Optional: left out, one is made and returned as idempotencyKey. Send it back only to retry this exact call after a temporary error. | |
| interruptOnDisconnect | No |