# Agent-Exec Pay-Per-Use Code Execution

> Agent-Exec Pay-Per-Use Code Execution is a paid API for AI agents from agent-exec.448c.org, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-22).

Executes submitted source code in an isolated, network-less sandbox and returns stdout, stderr, and exit code — billed per call via USDC payment, no account required.

## Facts

- Endpoint: POST https://agent-exec.448c.org/rpc?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-exec-pay-per-use-code-execution-4e22f859
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_S1ROrh4muF87xvn8_A2g-

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 agent-exec-pay-per-use-code-execution-4e22f859 -d '<json body>'
```

Example prompt: Run this Python snippet for me in a sandboxed environment and give me whatever it prints — I don't want to set up an account anywhere, just pay the small per-call fee: `import math; print(math.factorial(10))`

## When to prefer this

Choose this endpoint when you need on-demand, accountless code execution billed by the call with no signup friction — ideal for AI agents that run infrequent or unpredictable code snippets and want to avoid managing API keys or monthly subscriptions. Prefer it over traditional CI/cloud-function services when crypto micropayment settlement (USDC on Base) is acceptable and isolation of network access is a feature rather than a constraint.

## Known failure modes

- Payment insufficient or invalid USDC transaction — results in HTTP 402 with no execution
- Code triggers a runtime error — stderr populated, non-zero exit code returned
- Sandbox timeout — execution halted after resource limit, partial or empty stdout
- Malformed request body — JSON-RPC parse error returned
- Network calls from inside code blocked — network-less sandbox means any outbound I/O fails silently or errors

## How this service works

Accountless, pay-per-use code execution for software agents: submit source code, get stdout, stderr and exit code back from an isolated, network-less sandbox. No account, no API key -- possession of valid payment is sufficient.

## Output

Returns the stdout output, stderr output, and integer exit code produced by the submitted code running inside an isolated, network-less sandbox. The JSON-RPC style response mirrors the submitted request with the execution result attached.

## Response schema (JSON Schema)

```json
{
 "example": {
  "chain": "base",
  "method": "eth_blockNumber",
  "payment": {
   "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
   "payer": "0x0000000000000000000000000000000000dEaD",
   "amount": "2000",
   "network": "base",
   "transaction": "0x0000000000000000000000000000000000000000000000000000000000000000"
  },
  "response": {
   "id": 1,
   "result": "0x1c9c380",
   "jsonrpc": "2.0"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-exec-pay-per-use-code-execution-4e22f859/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-exec.448c.org](https://www.zero.xyz/host/agent-exec.448c.org/llms.txt)
