# execbox Batch Code Execution Sandbox

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

Executes one or more code submissions in parallel inside isolated Judge0 sandboxes, billed per-call in USDC via the x402 micropayment protocol.

## Facts

- Endpoint: POST https://execbox.xyz/batch?utm_source=zero.xyz
- Price: $0.0015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/execbox-batch-code-execution-sandbox-9008c636
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bnTRwSDDE0w--Qg1bla3T

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-batch-code-execution-sandbox-9008c636 -d '<json body>'
```

Example prompt: Run this Python 3 snippet for me in a sandbox and show me what it prints: `print(sum(range(1, 101)))`

## When to prefer this

Choose execbox when you need to execute arbitrary code snippets in an isolated, pay-per-use sandbox without provisioning your own infrastructure. It's ideal for AI agents that need to safely run untrusted or generated code, evaluate programming exercises, or perform computations across multiple languages. The batch endpoint is especially useful when you need to run up to 20 code submissions in parallel in a single paid call.

## Known failure modes

- Payment failure via x402 if USDC balance is insufficient or Base network is unavailable
- Invalid language_id returns an error or empty result for that submission
- Source code exceeding 100,000 characters is rejected
- Runtime errors produce a non-zero exit_code with stderr populated
- Time limit or memory limit exceeded returns a corresponding Judge0 status (e.g. status id 5 = Time Limit Exceeded)
- Batch size exceeding 20 submissions is rejected
- Malformed JSON body returns a 400 error

## How this service works

Pay-per-execution code sandbox. Clients pay micro-amounts of USDC on Base (via the x402 protocol) to run code in isolated Judge0 sandboxes.

## Output

An array of execution results, one per submission, each containing stdout, stderr, exit code, execution time in seconds, memory used in bytes, and a status object (e.g. 'Accepted', 'Runtime Error') along with the language name and ID.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "submissions": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "language_id",
     "source_code"
    ],
    "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)"
     },
     "source_code": {
      "type": "string",
      "description": "Source code to execute (max 100,000 characters)"
     },
     "compiler_options": {
      "type": "string",
      "description": "Compiler flags (optional)"
     },
     "command_line_arguments": {
      "type": "string",
      "description": "Runtime arguments (optional)"
     }
    }
   },
   "description": "Array of code submissions to execute in parallel (1-20 items)"
  }
 }
}
```

## 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-batch-code-execution-sandbox-9008c636/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)
