Sandboxed Code Execution
for AI Agents

Execute Python and Node.js code in isolated sandboxes. Pay per request with USDC on Base — no accounts required.

x402 Protocol v2 Coinbase CDP Facilitator USDC on Base

Available Stacks

Choose the runtime environment for your code execution.

python

Python 3.14 with common libraries (requests, httpx, pydantic, etc.)

node

Node.js 24 LTS with TypeScript support

Pricing

Pay only for what you use. Base price covers the default timeout; custom timeouts are charged per-second.

Stack Size vCPU RAM Default Timeout Max Timeout Base Price Per-Second Rate
python small 2 1GB 30s 5 min $0.002 $0.00005
python med 4 4GB 60s 10 min $0.008 $0.00012
python large 8 16GB 120s 1 hour $0.03 $0.00025
node small 2 1GB 30s 5 min $0.002 $0.00005
node med 4 4GB 60s 10 min $0.008 $0.00012
node large 8 16GB 120s 1 hour $0.03 $0.00025

Quick Start

Get started with the x402 compute API in minutes.

Get payment requirements (returns 402)
curl -X POST https://x402.auteng.ai/api/x402/compute \
  -H "Content-Type: application/json" \
  -d '{"stack": "python", "size": "small", "code": "print(1+1)"}' \
  -i
Full payment flow with x402 SDK
import asyncio
import os
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

async def main():
    # Initialize x402 client with EVM signer
    client = x402Client()
    account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
    register_exact_evm_client(client, EthAccountSigner(account))
    
    # Make request - SDK handles 402 -> payment -> retry automatically
    async with x402HttpxClient(client) as http:
        response = await http.post(
            "https://x402.auteng.ai/api/x402/compute",
            json={
                "stack": "python",
                "size": "small",
                "code": "print('Hello from x402!')"
            }
        )
        result = response.json()
        print(result["stdout"])  # "Hello from x402!\n"

asyncio.run(main())
Full payment flow with x402 SDK
import { x402Client, wrapFetchWithPayment } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Initialize x402 client with EVM signer
const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
const client = new x402Client();
registerExactEvmScheme(client, { signer });

// Wrap fetch to handle x402 payments automatically
const fetchWithPayment = wrapFetchWithPayment(fetch, client);

// Make request - wrapper handles 402 -> payment -> retry
const response = await fetchWithPayment(
  "https://x402.auteng.ai/api/x402/compute",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      stack: "python",
      size: "small",
      code: "print('Hello from x402!')"
    })
  }
);

const result = await response.json();
console.log(result.stdout);  // "Hello from x402!\n"