Run Code
POST/run_code
Run Code
Request
- application/json
Body
required
- MOD1
compile timeout for compiled languages
10
code run timeout
10
the code to run
stdin
object
optional string to pass into stdin
anyOf
string
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
a list of file paths to fetch after code execution
[]
Responses
- 200
- 422
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
- CommandRunResult
- MOD1
- MOD1
- MOD1
- MOD1
- CommandRunResult
- MOD1
- MOD1
- MOD1
- MOD1
- MOD1
Possible values: [Success
, Failed
, SandboxError
]
compile_result
object
anyOf
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
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
{
"status": "Success",
"message": "string",
"compile_result": {},
"run_result": {},
"executor_pod_name": "string",
"files": {}
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- MOD1
- MOD2
]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}