Greenhead Labs Public pay-per-call XRPL data and Grok AI. No accounts, JWT, or sessions. Pay XRP or RLUSD on XRPL mainnet (xrpl:0), then retry with X-Payment-Txid set to the validated Payment hash. Base: https://x402.greenhead.io Network: xrpl:0 (header X-x402-Network: xrpl) Pay with XRP or 0.01 RLUSD (issuer rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De) to catalog payTo, then retry with header X-Payment-Txid. Also accepts USDC on Base mainnet (eip155:8453, asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) via official PAYMENT-SIGNATURE (facilitator verify+settle). catalog priceXrp maps 1:1 to USDC face value (0.002 XRP SKU → 0.002 USDC = 2000 atomic). Not a live XRP/USD FX feed. Prove: GET /v1/base/ping. Base 402s include extensions.bazaar for CDP discovery. Read payTo from GET /.well-known/x402 or response header X-x402-PayTo. Do not guess the address. JS client: npm i @greenhead/x402-fetch — wraps fetch; 402 → pay hook or paymentTxid → retry X-Payment-Txid. Source: https://github.com/GreenheadLabs/x402/tree/main/packages/x402-fetch OpenAPI: https://x402.greenhead.io/openapi.json Sitemap: https://x402.greenhead.io/sitemap.xml Robots: https://x402.greenhead.io/robots.txt === GET / === Name: home Description: Plain HTML index with SEO tags and endpoint list. Free. Method: GET Price: 0 drops (free) Example request: curl https://x402.greenhead.io/ Example response: HTML document listing endpoints === GET /.well-known/x402 === Name: catalog Description: x402 discovery JSON: all paid endpoints, prices in drops, payTo, network xrpl:0. Method: GET Price: 0 drops (free) Example request: curl https://x402.greenhead.io/.well-known/x402 Example response: {"x402Version":1,"protocol":"x402","network":"xrpl:0","endpoints":[...]} === GET /openapi.json === Name: openapi Description: OpenAPI 3.0 spec for every free and paid route. Method: GET Price: 0 drops (free) Example request: curl https://x402.greenhead.io/openapi.json Example response: {"openapi":"3.0.3","info":{"title":"Greenhead x402 XRPL API"}} === GET /llms.txt === Name: llms Description: This file: plain-text agent catalog. Method: GET Price: 0 drops (free) Example request: curl https://x402.greenhead.io/llms.txt Example response: plain text === GET /health === Name: health Description: Liveness. Method: GET Price: 0 drops (free) Example request: curl https://x402.greenhead.io/health Example response: {"status":"ok","network":"xrpl"} === GET /status === Name: status Description: Readiness: network, XRPL RPC reachability, uptime, recent settle counters, version. Method: GET Price: 0 drops (free) Example request: curl https://x402.greenhead.io/status Example response: {"ok":true,"network":"xrpl:0","rpcReachable":true,"uptimeSeconds":12,"recentSettle":{"ok":0,"fail":0},"version":"1.0.0"} === GET /v1/receipts/{txid} === Name: receipt Description: Public receipt-by-txid lookup. No X-Payment-Txid required. 200 if this server settled the Payment; otherwise a minimal XRPL attestation if the Payment went to payTo; else 404. Method: GET Price: 0 drops (free) Example request: curl https://x402.greenhead.io/v1/receipts/<64-hex-txid> Example response: {"txid":"...","redeemed":true,"endpoint":"GET /v1/xrpl/listings","payer":"r...","pay_to":"r...","amount_drops":2000,"internal":false,"redeemed_at":"...","status":"settled"} === GET /api/metrics === Name: metrics Description: Paid-call meters for CFO: paid_calls (h24/d7/d30), revenue, unique_payers, by_endpoint, receipt_redeem_success_rate. Free. Method: GET Price: 0 drops (free) Example request: curl https://x402.greenhead.io/api/metrics Example response: {"as_of":"...","paid_calls":{"h24":0,"d7":0,"d30":0},"revenue":{"drops":0,"xrp":0,"usd_mark":0,"mark_xrp_usd":0},"unique_payers":{"external":0,"internal":0},"by_endpoint":[],"receipt_redeem_success_rate":0} === GET /v1/xrpl/settlement === Name: settlement Description: Paid XRPL Payment attestation by query txid. Distinct from free GET /v1/receipts/:txid. Fail-closed: invalid, missing, unvalidated, or non-Payment hashes return 4xx without redeeming X-Payment-Txid. 75,000 drops (0.075 XRP). Method: GET Price: 75000 drops (0.075 XRP) or 0.01 RLUSD Example request: curl -H "X-Payment-Txid: " "https://x402.greenhead.io/v1/xrpl/settlement?txid=example" Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.075","priceDrops":"75000"} Example 200 response: {"txid":"...","network":"xrpl:0","validated":true,"ledger_index":0,"success":true,"transaction_type":"Payment","from":"r...","to":"r...","destination_tag":null,"amount":{"asset":"XRP","drops":"75000","xrp":"0.075"},"memos":[],"attested_at":"...","attestation_version":1} === GET /v1/xrpl/token === Name: token Description: Token info for an XRPL issued currency: issuer details, DEX/AMM price in XRP, holder metrics, and liquidity. Method: GET Price: 10000 drops (0.01 XRP) or 0.01 RLUSD Example request: curl -H "X-Payment-Txid: " "https://x402.greenhead.io/v1/xrpl/token?issuer=rIssuerClassicAddress¤cy=USD" Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.01","priceDrops":"10000"} Example 200 response: {"network":"xrpl","token":{"issuer":"...","currency":"..."},"price":{"xrp":null}} === GET /v1/xrpl/listings === Name: listings Description: Recent XRPL token launches from GeckoTerminal / First Ledger, sorted by launch date descending. Method: GET Price: 2000 drops (0.002 XRP) or 0.01 RLUSD Example request: curl -H "X-Payment-Txid: " "https://x402.greenhead.io/v1/xrpl/listings?limit=50" Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.002","priceDrops":"2000"} Example 200 response: {"source":"geckoterminal","count":50,"listings":[]} === GET /v1/xrpl/orderbook === Name: orderbook Description: XRPL DEX order book for a currency pair (bids and asks, plus mid price). Method: GET Price: 10000 drops (0.01 XRP) or 0.01 RLUSD Example request: curl -H "X-Payment-Txid: " "https://x402.greenhead.io/v1/xrpl/orderbook?base=XRP"e=USD:rIssuerClassicAddress" Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.01","priceDrops":"10000"} Example 200 response: {"ok":true,"receipt":{"txid":"...","endpoint":{"method":"GET","path":"/v1/xrpl/..."},"amount":"0.01","asset":"XRP","network":"xrpl:0"}} === GET /v1/xrpl/portfolio === Name: portfolio Description: Wallet token holdings on XRPL, including XRP balance and estimated XRP values. Method: GET Price: 20000 drops (0.02 XRP) or 0.01 RLUSD Example request: curl -H "X-Payment-Txid: " "https://x402.greenhead.io/v1/xrpl/portfolio?address=rExampleClassicAddress" Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.02","priceDrops":"20000"} Example 200 response: {"ok":true,"receipt":{"txid":"...","endpoint":{"method":"GET","path":"/v1/xrpl/..."},"amount":"0.01","asset":"XRP","network":"xrpl:0"}} === POST /v1/ai/chat === Name: ai-chat Description: Grok chat completions (model grok-3-mini) via https://api.x.ai/v1/chat/completions. Requires GROK_API_KEY. Method: POST Price: 50000 drops (0.05 XRP) or 0.01 RLUSD Example request: curl -X POST -H "Content-Type: application/json" -H "X-Payment-Txid: " -d '{"messages":"example","prompt":"example"}' https://x402.greenhead.io/v1/ai/chat Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.05","priceDrops":"50000"} Example 200 response: {"ok":true,"receipt":{"txid":"...","endpoint":{"method":"GET","path":"/v1/xrpl/..."},"amount":"0.01","asset":"XRP","network":"xrpl:0"}} === POST /v1/xrpl/amm-score === Name: amm-score Description: Fetch AMM pool data, then score pool quality 0-100 via Grok (grok-3-mini) for a sniper bot. Method: POST Price: 50000 drops (0.05 XRP) or 0.01 RLUSD Example request: curl -X POST -H "Content-Type: application/json" -H "X-Payment-Txid: " -d '{"issuer":"rIssuerClassicAddress","currency":"USD","poolXrp":"example"}' https://x402.greenhead.io/v1/xrpl/amm-score Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.05","priceDrops":"50000"} Example 200 response: {"ok":true,"receipt":{"txid":"...","endpoint":{"method":"GET","path":"/v1/xrpl/..."},"amount":"0.01","asset":"XRP","network":"xrpl:0"}} === GET /v1/xrpl/trending === Name: trending Description: Top 10 XRPL tokens by 24h volume from xrpl.to. Method: GET Price: 50000 drops (0.05 XRP) or 0.01 RLUSD Example request: curl -H "X-Payment-Txid: " "https://x402.greenhead.io/v1/xrpl/trending" Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.05","priceDrops":"50000"} Example 200 response: {"ok":true,"receipt":{"txid":"...","endpoint":{"method":"GET","path":"/v1/xrpl/..."},"amount":"0.01","asset":"XRP","network":"xrpl:0"}} === POST /v1/ai/trade-advice === Name: trade-advice Description: XRPL buy/skip/watch advice via Grok chat completions (grok-3-mini). Method: POST Price: 50000 drops (0.05 XRP) or 0.01 RLUSD Example request: curl -X POST -H "Content-Type: application/json" -H "X-Payment-Txid: " -d '{"messages":"example","prompt":"example"}' https://x402.greenhead.io/v1/ai/trade-advice Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.05","priceDrops":"50000"} Example 200 response: {"ok":true,"receipt":{"txid":"...","endpoint":{"method":"GET","path":"/v1/xrpl/..."},"amount":"0.01","asset":"XRP","network":"xrpl:0"}} === POST /v1/ai/risk-score === Name: risk-score Description: Fetch XRPL token data, then score risk 0-100 via Grok (grok-3-mini). Method: POST Price: 50000 drops (0.05 XRP) or 0.01 RLUSD Example request: curl -X POST -H "Content-Type: application/json" -H "X-Payment-Txid: " -d '{"issuer":"rIssuerClassicAddress","currency":"USD","poolXrp":"example","poolTokens":"example"}' https://x402.greenhead.io/v1/ai/risk-score Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.05","priceDrops":"50000"} Example 200 response: {"ok":true,"receipt":{"txid":"...","endpoint":{"method":"GET","path":"/v1/xrpl/..."},"amount":"0.01","asset":"XRP","network":"xrpl:0"}} === POST /v1/ai/sentiment === Name: sentiment Description: Sentiment as positive/neutral/negative with a 0-100 confidence score via Grok (grok-3-mini). Method: POST Price: 50000 drops (0.05 XRP) or 0.01 RLUSD Example request: curl -X POST -H "Content-Type: application/json" -H "X-Payment-Txid: " -d '{"text":"example"}' https://x402.greenhead.io/v1/ai/sentiment Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.05","priceDrops":"50000"} Example 200 response: {"ok":true,"receipt":{"txid":"...","endpoint":{"method":"GET","path":"/v1/xrpl/..."},"amount":"0.01","asset":"XRP","network":"xrpl:0"}} === POST /v1/ai/grok === Name: grok Description: Grok text via the xAI Responses API (default model grok-4.6). Requires GROK_API_KEY. Method: POST Price: 50000 drops (0.05 XRP) or 0.01 RLUSD Example request: curl -X POST -H "Content-Type: application/json" -H "X-Payment-Txid: " -d '{"input":"example","prompt":"example","messages":"example","model":"example"}' https://x402.greenhead.io/v1/ai/grok Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.05","priceDrops":"50000"} Example 200 response: {"ok":true,"receipt":{"txid":"...","endpoint":{"method":"GET","path":"/v1/xrpl/..."},"amount":"0.01","asset":"XRP","network":"xrpl:0"}} === POST /v1/ai/image === Name: image Description: Generate an image with Grok Imagine. Requires GROK_API_KEY. Method: POST Price: 50000 drops (0.05 XRP) or 0.01 RLUSD Example request: curl -X POST -H "Content-Type: application/json" -H "X-Payment-Txid: " -d '{"prompt":"example","model":"example"}' https://x402.greenhead.io/v1/ai/image Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.05","priceDrops":"50000"} Example 200 response: {"ok":true,"receipt":{"txid":"...","endpoint":{"method":"GET","path":"/v1/xrpl/..."},"amount":"0.01","asset":"XRP","network":"xrpl:0"}} === POST /v1/ai/video === Name: video Description: Start a Grok Imagine video generation. Requires GROK_API_KEY. Method: POST Price: 50000 drops (0.05 XRP) or 0.01 RLUSD Example request: curl -X POST -H "Content-Type: application/json" -H "X-Payment-Txid: " -d '{"prompt":"example","model":"example"}' https://x402.greenhead.io/v1/ai/video Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.05","priceDrops":"50000"} Example 200 response: {"ok":true,"receipt":{"txid":"...","endpoint":{"method":"GET","path":"/v1/xrpl/..."},"amount":"0.01","asset":"XRP","network":"xrpl:0"}} === GET /v1/ai/video === Name: video-status Description: Poll a Grok Imagine video job by request_id. Requires GROK_API_KEY. Method: GET Price: 50000 drops (0.05 XRP) or 0.01 RLUSD Example request: curl -H "X-Payment-Txid: " "https://x402.greenhead.io/v1/ai/video?request_id=req_example" Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.05","priceDrops":"50000"} Example 200 response: {"ok":true,"receipt":{"txid":"...","endpoint":{"method":"GET","path":"/v1/xrpl/..."},"amount":"0.01","asset":"XRP","network":"xrpl:0"}} === POST /v1/ai/tts === Name: tts Description: Grok text-to-speech. Returns audio. Requires GROK_API_KEY. Method: POST Price: 50000 drops (0.05 XRP) or 0.01 RLUSD Example request: curl -X POST -H "Content-Type: application/json" -H "X-Payment-Txid: " -d '{"text":"example","voice_id":"example","language":"example"}' https://x402.greenhead.io/v1/ai/tts Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.05","priceDrops":"50000"} Example 200 response: {"ok":true,"receipt":{"txid":"...","endpoint":{"method":"GET","path":"/v1/xrpl/..."},"amount":"0.01","asset":"XRP","network":"xrpl:0"}} === POST /v1/xrpl/wallet-score === Name: wallet-score Description: Wallet trust/risk score 0-100 from XRPL age, tx count, trust lines, and balance via Grok. 2000 drops. Method: POST Price: 2000 drops (0.002 XRP) or 0.01 RLUSD Example request: curl -X POST -H "Content-Type: application/json" -H "X-Payment-Txid: " -d '{"address":"rExampleClassicAddress"}' https://x402.greenhead.io/v1/xrpl/wallet-score Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.002","priceDrops":"2000"} Example 200 response: {"score":72,"risk":"medium","reasoning":"..."} === POST /v1/xrpl/token-risk === Name: token-risk Description: Rug-pull probability from AMM liquidity, holder concentration, and issuer trust lines via Grok. 2000 drops. Method: POST Price: 2000 drops (0.002 XRP) or 0.01 RLUSD Example request: curl -X POST -H "Content-Type: application/json" -H "X-Payment-Txid: " -d '{"currency":"USD","issuer":"rIssuerClassicAddress"}' https://x402.greenhead.io/v1/xrpl/token-risk Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.002","priceDrops":"2000"} Example 200 response: {"rug_probability":0.21,"liquidity_risk":"medium","reasoning":"..."} === POST /v1/grok/market-summary === Name: market-summary Description: Plain-English XRPL daily market digest from the top 10 GeckoTerminal pools via Grok. 3000 drops. Body optional. Method: POST Price: 3000 drops (0.003 XRP) or 0.01 RLUSD Example request: curl -X POST -H "Content-Type: application/json" -H "X-Payment-Txid: " -d '{}' https://x402.greenhead.io/v1/grok/market-summary Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.003","priceDrops":"3000"} Example 200 response: {"summary":"...","top_movers":[],"sentiment":"neutral"} === GET /v1/base/ping === Name: base-ping Description: Prove route for Base mainnet USDC x402 (eip155:8453). HTTP 200 after facilitator verify+settle. Priced as the cheapest SKU (0.002 face → 2000 USDC atomic when Base is enabled). Method: GET Price: 2000 drops (0.002 XRP) or 0.01 RLUSD Example request: curl -H "X-Payment-Txid: " "https://x402.greenhead.io/v1/base/ping" Example 402 response (no X-Payment-Txid): {"error":"payment_required","code":"payment_required","httpStatus":402,"network":"xrpl:0","priceXrp":"0.002","priceDrops":"2000"} Example 200 response: {"ok":true,"pong":true,"network":"eip155:8453","payTo":"0x...","amount":"0.002","asset":"USDC","txid":"0x...","receipt":{"txid":"0x...","network":"eip155:8453","asset":"USDC"}}