# Sandboxd Code Run – Python/JS/TS Execute

> Sandboxd Code Run – Python/JS/TS Execute is a paid API for AI agents from sandboxd-code-run.saastemly.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-10).

Executes Python, JavaScript, or TypeScript code in an isolated one-shot sandbox and returns stdout, stderr, exit code, and output file artifacts

## Facts

- Endpoint: POST https://sandboxd-code-run.saastemly.com/v1/execute-code?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sandboxd-code-run-python-js-ts-execute-4f0fe97f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wNPN9gQzO45mpO8OE2KId

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability sandboxd-code-run-python-js-ts-execute-4f0fe97f -d '<json body>'
```

Example prompt: Run this Python script in an isolated sandbox and give me the stdout, stderr, and exit code — the script reads a CSV from a file I'll provide called data.csv, computes the column averages, and writes the result to output.json; use a 30-second timeout.

## When to prefer this

Choose this endpoint when you need to run Python, JavaScript, or TypeScript code safely in an isolated, one-shot sandbox with support for file I/O, environment variables, and argv — especially when the Daytona CodeRunRequest/ExecuteResponse API shape is expected. Prefer this over shell-command sandboxes when you need language-specific runtimes. Prefer this over persistent environments when statelessness and isolation are required.

## Known failure modes

- Timeout: code runs longer than the specified timeout (1-120s, default 60) and exits with code 124
- Code exceeds 1 MB UTF-8 limit — request rejected
- More than 50 input files or total file size exceeds 4 MB — request rejected
- Requested output file missing after run — path listed in missingOutputs
- Output file exceeds 1 MB — path listed in tooLargeOutputs instead of inline
- Invalid environment variable key (must match [A-Za-z_][A-Za-z0-9_]*) — request rejected
- Unsupported language value — validation error
- Payment failure via x402 protocol — 402 response returned

## How this service works

Runs Python, JavaScript or TypeScript code in an isolated one-shot sandbox and returns stdout, stderr, exit code and artifacts (Daytona CodeRunRequest/ExecuteResponse compatible)

## Output

Returns a JSON object containing stdout (string), stderr (string), exit code (integer — 124 on timeout), base64-encoded contents of any requested output files (outputFiles), a list of output paths that were too large to inline (tooLargeOutputs), and a list of output paths that were absent after the run (missingOutputs).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "env": {
   "type": "object",
   "description": "Environment variables; keys must match [A-Za-z_][A-Za-z0-9_]* (Daytona's rule)"
  },
  "argv": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Command-line arguments for the program (sys.argv[1:] in Python, process.argv.slice(2) in Node)"
  },
  "code": {
   "type": "string",
   "description": "The code to run (up to 1 MB of UTF-8)"
  },
  "files": {
   "type": "object",
   "description": "Text files written into the work directory next to the program (up to 50, 1 MB each, 4 MB total); the entry point main.py/main.js/main.ts is reserved"
  },
  "outputs": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Relative paths to read back after the run (up to 20); up to 1 MB each comes back base64 in outputFiles, larger in tooLargeOutputs, absent in missingOutputs"
  },
  "timeout": {
   "type": "integer",
   "description": "Run timeout in seconds, 1-120 (default 60); a timed-out run answers exitCode 124"
  },
  "language": {
   "enum": [
    "python",
    "javascript",
    "typescript"
   ],
   "type": "string",
   "description": "\"python\", \"javascript\" or \"typescript\""
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sandboxd-code-run-python-js-ts-execute-4f0fe97f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from sandboxd-code-run.saastemly.com](https://www.zero.xyz/host/sandboxd-code-run.saastemly.com/llms.txt)
