Unified Agent APIs

Unified Code Execute

Execute code in a secure, isolated sandbox and return stdout, stderr, exit code, and output files.

post/v1/code/execute

Request body

codestring required

The code to execute

languagestring

Programming language: python, javascript, or shell

timeoutinteger

Maximum execution time in seconds (1-300)

templatestring nullable

Pre-configured environment: default, data-science, web-dev, video

input_filesInputFile[] — unresolved $ref

Files to upload to the sandbox before execution

packagesstring[]

Additional pip packages to install before execution

Response

Successful Response

{"stackTrail":"paths:/v1/code/execute:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes