const result = await rt.execute({
// Required
language: 'python', // Language identifier
// Code input (one of these is required)
code: 'print(42)', // Shorthand for single file
files: [ // Multi-file support
{ name: 'main.py', content: 'from utils import add\nprint(add(1, 2))' },
{ name: 'utils.py', content: 'def add(a, b): return a + b' },
],
// Optional
stdin: 'input data', // Standard input
sessionId: 'abc-123', // Reuse a persistent sandbox
version: '*', // Version selector (default: latest)
runTimeout: 300000, // Run timeout in ms (default: 300000 = 5 min)
compileTimeout: 60000, // Compile timeout in ms (default: 60000 = 1 min)
});