# X402 Swarm Protocol – Isolated Code Sandbox

> X402 Swarm Protocol – Isolated Code Sandbox is a paid API for AI agents from swarm-protocol.onrender.com, paid per call via x402, $0.25/call, status unknown (last checked 2026-10-10).

Executes code in an isolated sandbox environment, accessible via x402 micropayment on Base Mainnet USDC, for autonomous AI agent workflows.

## Facts

- Endpoint: GET https://swarm-protocol.onrender.com/tools/isolated_code_sandbox?utm_source=zero.xyz
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-swarm-protocol-isolated-code-sandbox-af96c1fe
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_E_e2OSuzmXGmenCe7G9gY

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 x402-swarm-protocol-isolated-code-sandbox-af96c1fe
```

Example prompt: Run this Python snippet for me in a secure isolated sandbox and return the output: `import math; print(math.factorial(10))`

## When to prefer this

Choose this endpoint when an AI agent needs to execute dynamically generated or untrusted code in a secure, isolated environment without risking the host system, and when micropayment-based access (Base Mainnet USDC via x402) is acceptable. Prefer it over local execution when isolation and safety are critical.

## Known failure modes

- Invalid or malformed code input returns an error status
- Execution timeout if code runs too long
- Payment failure if USDC balance is insufficient or x402 header is missing
- Unsupported language or runtime may return an error
- Empty properties input may result in a no-op or error response

## How this service works

Machine-payable protocol for autonomous AI agent commerce. Monetized tools secured by x402 micropayments on Base Mainnet USDC.

## Output

Returns a JSON object with a `status` field indicating success, a `service` field confirming 'isolated_code_sandbox', and a `data` object containing the execution result or output of the submitted code.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "status": "success",
  "service": "isolated_code_sandbox"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-swarm-protocol-isolated-code-sandbox-af96c1fe/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from swarm-protocol.onrender.com](https://www.zero.xyz/host/swarm-protocol.onrender.com/llms.txt)
