# Simple execution
curl -X POST https://api.runtools.ai/v1/execute \
-H "X-API-Key: rt_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"runtime": "python",
"code": "print(sum([1, 2, 3, 4, 5]))"
}'
# Multiple files
curl -X POST https://api.runtools.ai/v1/execute \
-H "X-API-Key: rt_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"runtime": "python",
"files": {
"main.py": "import helper\nprint(helper.greet(\"World\"))",
"helper.py": "def greet(name):\n return f\"Hello, {name}!\""
},
"entrypoint": "main.py"
}'