# execbox Execute

> execbox Execute is a paid API for AI agents from execbox.xyz, paid per call via x402, $0.002/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 stats — billed at $0.002 USDC per execution via the x402 protocol.

## Facts

- Endpoint: POST https://execbox.xyz/execute?utm_source=zero.xyz
- Price: $0.002/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-16c03ca7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pTEdQ4DsoCFmVaHmkT1_7

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-16c03ca7 -d '<json body>'
```

Example prompt: Run this Python 3 (language ID 71) script for me in an isolated sandbox and tell me what it prints: `print(sum(range(1, 101)))`

## When to prefer this

Choose execbox when you need to execute arbitrary code in a secure, ephemeral sandbox without managing infrastructure, and are comfortable with micro-USDC payments per execution. Ideal for AI agents that need to run untrusted or generated code, evaluate algorithm outputs, or verify computation results. Prefer this over cloud function services when you want pay-per-use pricing with no setup, and over local execution when isolation/security matters.

## Known failure modes

- Network access disabled — code that opens sockets or makes HTTP requests will fail with a runtime error
- Source code exceeding 100,000 characters will be rejected
- Invalid language_id returns an error or unexpected behavior — call GET /languages first to validate
- Compilation errors are returned in stderr with a non-zero exit_code and status 'Compilation Error'
- Payment failure via x402 protocol results in a 402 response before execution begins
- Time limit exceeded returns status 'Time Limit Exceeded' with no stdout

## How this service works

Execute code in any supported language. 5s CPU timeout, 128MB RAM. Supports 40+ languages including Python, JavaScript, C, C++, Java, Go, Rust.

## Output

A JSON object containing: stdout (the program's printed output), stderr (any error messages), exit_code (0 = success), status (Judge0 status id and description, e.g. 'Accepted'), execution time in seconds, memory used in kilobytes, and the language name/version 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": "0.023",
  "memory": 3456,
  "status": {
   "id": 3,
   "description": "Accepted"
  },
  "stderr": null,
  "stdout": "hello\n",
  "language": {
   "id": 71,
   "name": "Python (3.8.1)"
  },
  "exit_code": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/execbox-execute-16c03ca7/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)
