http://localhost:3000
Executes a multi-file project in a secure, isolated environment.
- URL:
/run - Method:
POST - Content-Type:
application/json
| Field | Type | Required | Description |
|---|---|---|---|
language |
string |
Yes | The programming language ID. Supported: python, cpp, javascript. |
files |
Array<File> |
Yes | List of files to execute. |
File Object Structure:
{
"name": "filename.ext",
"content": "source code content",
"toBeExec": true // Optional: Set to true for the entry point file (e.g., main.py)
}{
"language": "python",
"files": [
{
"name": "main.py",
"content": "from utils import add\nprint(add(5, 3))",
"toBeExec": true
},
{
"name": "utils.py",
"content": "def add(a, b):\n return a + b"
}
]
}{
"stdout": "8\n",
"stderr": "",
"exitCode": 0
}{
"error": "Invalid request body. 'language' and 'files' are required."
}{
"error": "Execution failed due to system error."
}Checks if the server is running.
- URL:
/health - Method:
GET
{
"status": "ok",
"version": "1.0.0"
}