# execbox Execute

> execbox Execute is a paid API for AI agents from execbox.xyz, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-10).

Runs arbitrary source code in an isolated Judge0 sandbox and returns stdout, stderr, exit code, and runtime metrics, billed at $0.005 USDC per execution via x402.

## Facts

- Endpoint: POST https://execbox.xyz/execute/compute?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/execbox-execute-65eb596c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zsig2iAC93veP45SYfV_W

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 execbox-execute-65eb596c -d '<json body>'
```

Example prompt: Run this Python 3 code (language ID 71) for me in a sandbox and return its output: `print(sum(range(1, 101)))`

## When to prefer this

Choose execbox when you need a pay-per-use, zero-setup code execution sandbox billed in micro-USDC — ideal for agents that occasionally need to run untrusted or dynamic code without provisioning persistent compute infrastructure. Prefer it over hosted notebooks or full cloud functions when latency is acceptable, cost per call is the priority, and network isolation is acceptable or desired.

## Known failure modes

- Network access disabled — code that opens sockets or makes HTTP requests will receive a runtime error or timeout
- Source code exceeding 100,000 characters will be rejected
- Invalid language_id returns an error or unexpected behavior — use GET /languages to verify valid IDs
- Compilation errors result in a non-zero exit_code and stderr output with compiler messages
- Payment failure via x402 protocol blocks execution — insufficient USDC balance causes a 402 response
- Infinite loops or excessive memory use may be killed by the sandbox with a time-limit or memory-limit exceeded status

## How this service works

Extended execution for moderate workloads. 15s CPU timeout, 512MB RAM. Use for sorting large datasets, matrix operations, or Monte Carlo simulations.

## Output

A JSON object containing: stdout (program output), stderr (error output), exit_code (integer exit status), time (execution duration in seconds), memory (memory used in KB), status (object with id and description such as 'Accepted'), and language (id and name of the runtime used).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "stdin": {
   "type": "string",
   "description": "Standard input passed to the program (optional)"
  },
  "language_id": {
   "type": "number",
   "description": "Judge0 language ID. GET /languages for valid IDs (e.g. 71=Python 3, 63=JavaScript, 50=C, 62=Java)"
  },
  "source_code": {
   "type": "string",
   "description": "Source code to execute (max 100,000 characters). Network access is disabled — code that opens sockets or makes HTTP requests will fail."
  },
  "compiler_options": {
   "type": "string",
   "description": "Compiler flags passed to the compiler (e.g. \"-O2 -Wall\", \"-std=c17\"). Must start with \"-\". Leave empty or omit if unsure. Do NOT put natural language here."
  },
  "command_line_arguments": {
   "type": "string",
   "description": "Arguments passed to the compiled binary at runtime (e.g. \"--input file.txt\"). Leave empty or omit for most use cases. Do NOT put natural language here."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "time": "1.204",
  "memory": 12800,
  "status": {
   "id": 3,
   "description": "Accepted"
  },
  "stderr": null,
  "stdout": "hi",
  "language": {
   "id": 50,
   "name": "C (GCC 9.2.0)"
  },
  "exit_code": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/execbox-execute-65eb596c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from execbox.xyz](https://www.zero.xyz/host/execbox.xyz/llms.txt)
