# 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.02/call, status unknown (last checked 2026-10-11).

Executes arbitrary source code in an isolated, network-less sandbox and returns stdout, stderr, and exit code — no account or API key required, payment via x402.

## Facts

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

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-4a935983 -d '<json body>'
```

Example prompt: Run this Python snippet for me in a sandboxed environment and return what it prints: `import math; print(math.factorial(10))` — pay per use, no account needed.

## When to prefer this

Choose this endpoint when an AI agent needs to execute arbitrary code dynamically without going through an account registration or API key provisioning flow. It is ideal for ephemeral, one-off computations where a subscription model is wasteful, and for agent workflows that need safe, network-isolated sandboxing with micropayment access via x402. Prefer it over self-hosted sandboxes when you want zero infrastructure overhead and over full cloud IDEs when you only need stdout/stderr/exit-code output.

## Known failure modes

- Invalid or missing x402 authorization causes payment rejection and HTTP 402 response
- Code that times out in the sandbox may return a non-zero exit code or an error message in stderr
- Network calls from within the sandbox are blocked, so code requiring internet access will fail
- Malformed request body or missing required fields returns an error before execution begins
- Unsupported language or runtime may produce an empty stdout with a non-zero exit code

## 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

The agent receives the stdout (standard output), stderr (standard error), and integer exit code produced by the executed code inside the isolated sandbox. No persistent state is retained between calls.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "method",
  "sellerUrl",
  "authorization"
 ],
 "properties": {
  "body": {
   "type": "string",
   "description": "Optional request body for the seller."
  },
  "method": {
   "type": "string",
   "description": "GET, POST, PUT, PATCH or DELETE."
  },
  "headers": {
   "type": "object",
   "description": "Optional request headers for the seller, at most 20."
  },
  "sellerUrl": {
   "type": "string",
   "description": "The seller endpoint to deliver the authorization to: an absolute http:// or https:// URL."
  },
  "authorization": {
   "type": "object",
   "description": "The x402 authorization YOU already signed for the seller. This is NOT the payment that pays us -- that one rides in the X-PAYMENT header."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-exec-pay-per-use-code-execution-4a935983/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)
