# Statemind Python Sandbox Executor

> Statemind Python Sandbox Executor is a paid API for AI agents from api.statemind.ai, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-15).

Executes Python code in an isolated, network-free, read-only container and reports results against caller-provided test examples

## Facts

- Endpoint: POST https://api.statemind.ai/mcp#execute_python
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/statemind-python-sandbox-executor-3a63f2c0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_snLT4z1u003nKytOty_Wb

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 statemind-python-sandbox-executor-3a63f2c0 -d '<json body>'
```

Example prompt: Run this Python function in a safe sandbox with no network access and check if it produces the right output for these three examples: input 5 → output 120, input 0 → output 1, input 3 → output 6 — the function is supposed to compute factorial.

## When to prefer this

Prefer this endpoint when you need to safely execute arbitrary or untrusted Python code without any risk of network exfiltration, filesystem modification, or side effects, and especially when you want to validate code correctness against specific input/output examples in a single call. It is ideal for code testing, grading, or algorithm verification workflows where isolation and reproducibility are critical.

## Known failure modes

- Code with syntax errors fails to execute and returns a parse error
- Code that attempts network access is silently blocked or raises a connection error
- Code exceeding execution time limits is terminated and returns a timeout error
- Code attempting to write to the filesystem raises a permission error
- Missing or malformed example inputs cause comparison step to fail
- Import of unavailable third-party libraries raises ModuleNotFoundError

## How this service works

Run Python in a throwaway container with no network and a read-only filesystem, and report what it did against the caller's examples.

## Output

Returns the execution output (stdout, stderr, return values) of the Python code alongside a pass/fail comparison report for each caller-provided example, indicating whether the actual output matched the expected output. No network calls or filesystem writes are made during execution.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/statemind-python-sandbox-executor-3a63f2c0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.statemind.ai](https://www.zero.xyz/host/api.statemind.ai/llms.txt)
