Suprsonic

Code Execution

Execute code in a secure sandbox with pre-configured environments. Returns stdout, stderr, the exit code, the run time, and the files the code wrote to /home/user/output/ as base64. Use for calculations, data processing and running scripts. Each call runs in a fresh sandbox that is destroyed afterwards, so nothing carries over from one call to the next. Cost: 2 credits, charged only when a call succeeds.

post/v1/code/execute

Request

  • Base URL
    https://suprsonic.ai
  • Auth
    HTTP bearer

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

packagesstring[]

Additional pip packages to install before execution

Response

The call's envelope: success, data (the capability's result), metadata, and credits_used (0 when the call did not succeed).

successboolean required
credits_usedinteger

Changes

No recorded changes to this operation across all 1 revision of this API.