GENCODE

x402 code execution for agents

0.01 USDC per execution · Base

Playground

Available Endpoints

POST /api/execute execute code in sandbox
GET /api/specs capabilities & packages
GET /api/specs/:language language-specific info

Supported Languages

Python 3.x
JavaScript (Node 18+)
TypeScript
R 4.x
Java 11
Bash

Example Request

curl
# First request returns 402 with payment details
curl -X POST https://x402.gencode.run/api/execute \
  -H "Content-Type: application/json" \
  -d '{"code": "print(1+1)", "language": "python"}'

# After payment, include X-Payment header
curl -X POST https://x402.gencode.run/api/execute \
  -H "Content-Type: application/json" \
  -H "X-Payment: <base64-encoded-payment>" \
  -d '{"code": "print(1+1)", "language": "python"}'

Pre-installed Packages

Python · Crypto

web3, eth-account solana, solders base58, mnemonic

Python · Data/ML

numpy, pandas matplotlib scikit-learn

JavaScript · Crypto

ethers@6, viem @solana/kit @scure/bip39

JavaScript · Data/ML

mathjs, d3-array danfojs-node ml-matrix, ml-regression