# the402.ai Code Execution Sandbox (E2B) Purchase

> the402.ai Code Execution Sandbox (E2B) Purchase is a paid API for AI agents from api.the402.ai, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Purchases access to a secure code execution sandbox powered by E2B, enabling dynamic code running within an isolated environment via the the402.ai marketplace.

## Facts

- Endpoint: POST https://api.the402.ai/v1/services/svc_feb40527156f41e3/purchase
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-the402-ai-c8bfed46
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ueh7ZQpY-H1V99CF84ha7

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 api-the402-ai-c8bfed46 -d '<json body>'
```

Example prompt: Can you run this Python snippet for me in a secure sandbox — `print(sum([1,2,3,4,5]))` — and give me the output? Use the E2B code execution service on the402.ai.

## When to prefer this

Choose this endpoint when an AI agent needs to dynamically execute arbitrary or user-provided code in a secure, isolated environment without provisioning its own infrastructure. Ideal for agents built on agentic marketplaces that support x402 micropayment flows and need on-demand compute. Prefer over self-hosted runners when low-cost per-call billing ($0.005 USDC) is acceptable and E2B's sandboxing guarantees are sufficient.

## Known failure modes

- Insufficient USDC balance or payment failure — 402 Payment Required response
- Invalid or malformed code input — execution error returned
- Sandbox timeout — code takes too long to execute
- Service unavailable — E2B backend down
- Invalid service ID or endpoint — 404 Not Found

## How this service works

Purchase: Code Execution Sandbox (E2B) 

## Output

Returns the result of code executed inside an isolated E2B sandbox, including stdout/stderr output, execution status, and a job ID that can be used to check status or verify service delivery and release payment.

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "job_id": {
   "type": "string"
  },
  "status": {
   "type": "string"
  },
  "thread_id": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-the402-ai-c8bfed46/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.the402.ai](https://www.zero.xyz/host/api.the402.ai/llms.txt)
