# Speccy x402 — Sandbox Python Exec

> Speccy x402 — Sandbox Python Exec is a paid API for AI agents from exec.speccy.cloud, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Runs untrusted Python 3.12 code in an isolated Docker sandbox and returns stdout, stderr, and exit code

## Facts

- Endpoint: POST https://exec.speccy.cloud/v1/exec
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/speccy-x402-sandbox-python-exec-5a61408b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2bxiGgYUUkJc1tcXkbY7P

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 speccy-x402-sandbox-python-exec-5a61408b -d '<json body>'
```

Example prompt: Run this Python 3.12 script in a secure sandbox and give me the stdout and exit code: `import math; print(math.factorial(20))`

## When to prefer this

Use this endpoint when you need to safely execute arbitrary or untrusted Python 3.12 code without risking your own infrastructure — for example, running LLM-generated code, user-submitted scripts, or one-off computations. It is preferable to local execution when isolation, resource limits, and auditability matter. The $0.02 per-call pricing via x402 makes it suitable for on-demand, per-invocation workloads rather than high-throughput batch jobs.

## Known failure modes

- Code exceeds 64KB size limit — request rejected
- Execution times out after 30 seconds — process killed, partial or no stdout returned
- Runtime error in user code — non-zero exit code with traceback in stderr
- Out-of-memory error — process killed mid-execution
- Network access attempted inside sandbox — connection refused (no network available)
- Invalid or malformed request body — HTTP 4xx error

## How this service works

Run untrusted Python 3.12 code in an isolated Docker sandbox (no network, read-only FS, 0.5 CPU, 512MB RAM, 30s timeout). Returns stdout, stderr and exit code. Max code size 64KB.

## Output

Returns HTTP response containing stdout (the text printed to standard output), stderr (any error messages or tracebacks), and the exit code of the Python process. Execution is capped at 30 seconds, 512MB RAM, 0.5 CPU, and 64KB code size.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/speccy-x402-sandbox-python-exec-5a61408b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from exec.speccy.cloud](https://www.zero.xyz/host/exec.speccy.cloud/llms.txt)
