v19

latestOpenAPI 3.0.3raw.githubusercontent.com2025-06-29204858.4 KB
Sandbox

Execute code

Run a script in a secure, isolated environment. Scripts can read from stdin and write to stdout or stderr. They can access input files, environment variables and command line arguments.

post/v1/execute

Request body

argsstring[]

List of command line arguments to pass to the script.

codestring required

The code to execute.

envobject

Set of key-value pairs to add to the script's execution environment.

language'python' | 'javascript' | 'typescript' | 'ruby' | 'php' required

The interpreter to use when executing code.

runtime_revision_idstring

The ID of the runtime revision to use when executing code.

stdinstring

Input made available to the script via 'stdin'.

Response

OK

durationinteger required

The execution time of the script in milliseconds.

exit_codeinteger required

The exit code returned by the script. Will often be '0' on success and non-zero on failure.

idstring required

The ID of the execution.

stderrstring required

The contents of 'stderr' after executing the script.

stdoutstring required

The contents of 'stdout' after executing the script.