# execbox /execute/heavy

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

Runs arbitrary source code in an isolated Judge0 sandbox, paid per execution via USDC micropayment on Base.

## Facts

- Endpoint: POST https://execbox.xyz/execute/heavy?utm_source=zero.xyz
- Price: $0.01/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-heavy-1f7d1edb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rNNfEY0IaipIoav05PAR_

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-heavy-1f7d1edb -d '<json body>'
```

Example prompt: Can you run this Python 3 code (language ID 71) in a sandbox for me and show me what it prints? The code is: `print(sum(range(1, 101)))`

## When to prefer this

Use this endpoint when you need to execute arbitrary code in a secure, isolated sandbox without setting up local infrastructure, and you are comfortable paying $0.01 USDC per execution via the x402 protocol on Base. The /execute/heavy path is suited for more resource-intensive workloads. Prefer this over hosted REPL services when you need programmatic, pay-per-use access with structured JSON output including timing and memory metrics.

## Known failure modes

- Payment not included or invalid — 402 Payment Required returned before execution
- Invalid language_id — Judge0 rejects unknown language identifiers
- Source code exceeds 100,000 character limit — request rejected
- Code attempts network access (sockets/HTTP) — fails silently or with runtime error since network is disabled
- Time limit exceeded — status returns 'Time Limit Exceeded' with no stdout
- Compilation error — stderr contains compiler output, exit_code non-zero, status is 'Compilation Error'
- Runtime error — exit_code non-zero, stderr populated, status is 'Runtime Error'

## How this service works

Heavy compute for intensive workloads. 30s CPU timeout, 1GB RAM. Use for recursive algorithms, large memory allocations, or long-running computations.

## Output

A JSON object containing: stdout (program output), stderr (error output), exit_code, execution time in seconds, memory used in KB, and a status object with an ID and description (e.g. 'Accepted', 'Runtime Error', 'Time Limit Exceeded') plus the language name and ID.

## 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": "18.542",
  "memory": 1740,
  "status": {
   "id": 3,
   "description": "Accepted"
  },
  "stderr": null,
  "stdout": "102334155",
  "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-heavy-1f7d1edb/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)
