# PayWeave Sandbox – Pay-per-call Code Execution

> PayWeave Sandbox – Pay-per-call Code Execution is a paid API for AI agents from sandbox.payweave.services, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14, last successful call 2026-08-05).

Executes an arbitrary shell command in an isolated sandbox environment, charging $0.01 USDC per execution via x402 micropayment.

## Facts

- Endpoint: POST https://sandbox.payweave.services/exec
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Last successful call: 2026-08-05
- Success rate: 100% of calls made through Zero
- Rating: 5.0 / 5 from 1 review
- Activations on Zero: 1
- Tags: x402
- Canonical page: https://www.zero.xyz/c/payweave-sandbox-pay-per-call-code-execution-a9190b36
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_elwuWlEyfHAd72EAu5-hE

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 payweave-sandbox-pay-per-call-code-execution-a9190b36 -d '<json body>'
```

Example prompt: Run `python3 -c "import hashlib; print(hashlib.sha256(b'hello').hexdigest())"` in a PayWeave isolated sandbox with a 10-second timeout and tell me the stdout output.

## When to prefer this

Choose this endpoint when you need to execute arbitrary shell commands or untrusted code in a pay-as-you-go isolated environment without provisioning persistent infrastructure. Ideal for one-off computations, dependency checks, script testing, or ephemeral code runs billed at $0.01 USDC per call via x402.

## Known failure modes

- Command exceeds timeout_ms limit — execution is killed, success=false with non-zero exitCode
- Payment failure via x402 — 402 response returned before execution begins
- Invalid or missing `command` field — 400 validation error
- Command not found in sandbox environment — non-zero exitCode with stderr message
- Network or sandbox infrastructure error — 5xx response

## How this service works

Run untrusted code in isolated sandboxes, one payment per execution.

## Output

Returns a JSON object with a boolean `success` field (true if exit code is 0), an integer `exitCode`, a `stdout` string containing standard output, and a `stderr` string containing error output. Additional fields may be present.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "command"
 ],
 "properties": {
  "cwd": {
   "type": "string",
   "description": "Working directory. Defaults to /workspace."
  },
  "env": {
   "type": "object",
   "description": "Environment variables visible to this execution only"
  },
  "command": {
   "type": "string",
   "description": "Shell command to execute, e.g. \"python3 --version\" or \"pip install requests\""
  },
  "timeout_ms": {
   "type": "integer",
   "description": "Execution wall-clock limit in milliseconds (1000 to 60000, default 30000). Executions that exceed it are killed."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "success",
  "exitCode",
  "stdout",
  "stderr"
 ],
 "properties": {
  "stderr": {
   "type": "string"
  },
  "stdout": {
   "type": "string"
  },
  "success": {
   "type": "boolean",
   "description": "True when the command exited 0"
  },
  "exitCode": {
   "type": "integer"
  }
 },
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/payweave-sandbox-pay-per-call-code-execution-a9190b36/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from sandbox.payweave.services](https://www.zero.xyz/host/sandbox.payweave.services/llms.txt)
