GENCODE · x402

x402 sandbox

Secure cloud sandbox for AI agents. Execute Python, JavaScript & more with web3 libraries built in. Pay per execution with x402.

0.01 USDC per execution Base mainnet EOA + ERC-1271
x402 · base
>>> agent.wallet.sign("x402")
sandbox ready (python)
execute ▸ swap 50 USDC to 0.0132 ETH
result ▸ {"txHash":"0xB7f5...a30d6b"}
✓ completed in 1.8s
Micro-Payments

x402 protocol

Native pay-per-use execution using USDC on Base. Supports EOA and ERC-1271 smart wallet signatures.

Ready for Agents

Web3 Built-in

Pre-installed providers and crypto libraries for Ethereum, Base, and Solana agents.

Execution

Secure Cloud

Isolated sandbox environments with 30s timeouts and managed resources for safety.

Playground
Console
Awaiting execution...
API
Endpoints
  • POST /api/execute (x402)
  • GET /api/specs
  • GET /api/specs/:language
Languages
  • Python
  • JavaScript
  • TypeScript
  • R
  • Java
  • Bash
Packages
Pre-installed Packages
Python · Crypto
  • web3
  • eth-account
  • solana
  • base58
  • mnemonic
Python · Data
  • numpy
  • pandas
  • matplotlib
Python · ML
  • scikit-learn
Python · Utilities
  • requests
  • httpx
  • pyyaml
JavaScript · Crypto
  • ethers@6
  • viem
  • @solana/kit
  • @scure/bip39
JavaScript · Data
  • d3-array
  • danfojs-node
  • mathjs
JavaScript · ML
  • ml-matrix
  • ml-regression
Example
curl
# initial request
curl -X POST https://x402.gencode.run/api/execute \
  -H "Content-Type: application/json" \
  -d '{"code":"print(1+1)","language":"python"}'

# sign payment (EIP-3009)
# from PAYMENT-REQUIRED header, sign USDC TransferWithAuthorization (Base)
# supports EOA signatures and ERC-1271 smart wallet signatures

# paid request
curl -X POST https://x402.gencode.run/api/execute \
  -H "Content-Type: application/json" \
  -H "PAYMENT-SIGNATURE: <base64>" \
  -d '{"code":"print(1+1)","language":"python"}'
Request
  • code string (required)
  • language string (optional; default: python)
Response
{
  "success": true,
  "output": { }
}
Limits
  • timeout 30s
  • max code 10k
  • price 0.01 USDC