# E2B Cloud Python Sandbox Executor

> E2B Cloud Python Sandbox Executor is a paid API for AI agents from sovereign-x402-zeta.vercel.app, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Executes arbitrary Python code in a real, isolated E2B cloud sandbox and returns stdout, stderr, and results.

## Facts

- Endpoint: POST https://sovereign-x402-zeta.vercel.app/api/v1/code/exec
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/e2b-cloud-python-sandbox-executor-e40611ab
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_G_IN_e8caWTol-kWTxi6A

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 e2b-cloud-python-sandbox-executor-e40611ab -d '<json body>'
```

Example prompt: Can you run this Python code in a cloud sandbox and show me the output: `import math; print([math.factorial(n) for n in range(10)])`?

## When to prefer this

Choose this endpoint when you need real, isolated cloud-based Python execution (not a subprocess or mock) via E2B, especially for untrusted or dynamic code, data transformations, or when you need full stdout/stderr capture in a pay-per-call serverless model.

## Known failure modes

- Syntax errors in the submitted Python code return stderr with traceback
- Timeout if code runs too long
- Runtime exceptions (e.g. ZeroDivisionError, ImportError) captured in stderr
- Network-restricted sandbox may block external HTTP calls from within code
- Malformed request body returns validation error

## How this service works

Execute Python code in a real, isolated E2B cloud sandbox (not a subprocess) and return stdout/stderr/results.

## Output

Returns the stdout output, stderr output, and any computed results from the Python code executed inside an E2B isolated cloud sandbox, including any print statements and return values.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {},
     "additionalProperties": true
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/e2b-cloud-python-sandbox-executor-e40611ab/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from sovereign-x402-zeta.vercel.app](https://www.zero.xyz/host/sovereign-x402-zeta.vercel.app/llms.txt)
