Skip to main content

Run Code

POST 

/run_code

Run Code

Request

Body

required

    compile_timeout Compile Timeout (number)

    compile timeout for compiled languages

    Default value: 10
    run_timeout Run Timeout (number)

    code run timeout

    Default value: 10
    code Code (string)required

    the code to run

    stdin

    object

    optional string to pass into stdin

    anyOf

    string

    language Language (string)required

    the language or execution mode to run the code

    Possible values: [python, cpp, nodejs, go, go_test, java, php, csharp, bash, typescript, sql, rust, cuda, lua, R, perl, D_ut, ruby, scala, julia, pytest, junit, kotlin_script, jest, verilog, python_gpu, lean, swift, racket]

    files

    object

    a dict from file path to base64 encoded file content

    property name* string
    fetch_files string[]

    a list of file paths to fetch after code execution

    Default value: []

Responses

Successful Response

Schema

    status RunStatus (string)required

    Possible values: [Success, Failed, SandboxError]

    message Message (string)required

    compile_result

    object

    anyOf

    status CommandRunStatus (string)required

    Possible values: [Finished, Error, TimeLimitExceeded]

    execution_time

    object

    anyOf

    number

    return_code

    object

    anyOf

    integer

    stdout

    object

    anyOf

    string

    stderr

    object

    anyOf

    string

    run_result

    object

    anyOf

    status CommandRunStatus (string)required

    Possible values: [Finished, Error, TimeLimitExceeded]

    execution_time

    object

    anyOf

    number

    return_code

    object

    anyOf

    integer

    stdout

    object

    anyOf

    string

    stderr

    object

    anyOf

    string

    executor_pod_name

    object

    anyOf

    string

    files

    object

    property name* string
Loading...