{"openapi":"3.1.0","info":{"title":"N9T2 XRPL x402 Gateway","contact":{"email":"boss@n9t2.com"},"version":"1.0.0","x-guidance":"N9T2 provides pay-per-request XRPL JSON-RPC infrastructure for AI agents. Use POST /rpc with a JSON-RPC request body. Paid RPC methods return HTTP 402 with an x402 v2 PAYMENT-REQUIRED challenge when no valid payment is supplied. Read the accepts[0] payment requirement, pay the quoted XRP amount on XRPL Mainnet, then retry the same POST /rpc request with the x402 PAYMENT-SIGNATURE header. The response body contains the XRPL JSON-RPC result. GET /rpc and HEAD /rpc are discovery probes and return the same payment challenge. GET /health, GET /pricing, GET /stats, and GET / are free identity/status endpoints. N9T2 Bridge is available through POST /bridge/execute using x402 v2 exact on Base Mainnet (eip155:8453) with canonical USDC. Bridge requests use the base-xrpl-data and base-xrpl-trading capabilities. A Bridge request without valid payment returns HTTP 402 with the exact Base USDC payment requirement. Read accepts[0], sign the required EIP-3009 authorization, then retry the same request with the PAYMENT-SIGNATURE header. The N9T2 Commercial Bridge (POST /bridge/quote, POST /bridge/payment, GET /bridge/receipt/{quote_id}) moves value both ways between native XRP on the XRP Ledger and Bitcoin BTC, BNB Chain BNB/USDT/USDC, and Base ETH/USDC (12 live routes). Quotes are free; the N9T2 fee is 1.45 XRP equivalent per transfer."},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}},"security":[]}},"/pricing":{"get":{"summary":"Pricing","operationId":"pricing_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Pricing Pricing Get"}}}}},"security":[]}},"/stats":{"get":{"summary":"Stats","operationId":"stats_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Stats Stats Get"}}}}},"security":[]}},"/bridge/receipt/{quote_id}":{"get":{"summary":"N9T2 commercial bridge receipt","operationId":"commercial_receipt_bridge_receipt__quote_id__get","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[],"description":"Return the durable customer-safe receipt for a completed N9T2 commercial bridge transfer."}},"/bridge/payment":{"post":{"summary":"Verify commercial bridge payment","description":"Verify a customer payment against a previously issued commercial bridge quote. Payment verification is isolated from provider execution.","operationId":"bridge_payment_bridge_payment_post","requestBody":{"content":{"application/json":{"schema":{"properties":{"quote_id":{"type":"string"},"transaction_hash":{"type":"string"}},"additionalProperties":false,"type":"object","required":["quote_id","transaction_hash"]}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/bridge/quote":{"post":{"summary":"N9T2 commercial interchain quote","description":"Return a live customer-safe quote for a supported N9T2 interchain route.","operationId":"bridge_quote_bridge_quote_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/bridge/execute":{"post":{"summary":"Paid N9T2 Bridge execution","description":"Execute an authorized N9T2 XRPL data or trading operation. Payment is required in USDC on Base Mainnet via x402.","operationId":"bridge_execute_bridge_execute_post","requestBody":{"content":{"application/json":{"schema":{"properties":{"capability":{"type":"string","enum":["base-xrpl-data","base-xrpl-trading"]},"operation":{"type":"string","enum":["account_info","account_lines","account_tx","ledger_data","book_offers","path_find","tx"]},"params":{"additionalProperties":true,"type":"object"}},"type":"object","required":["capability","operation","params"]},"example":{"capability":"base-xrpl-data","operation":"account_info","params":{"account":"rML2A2XcrVwFUHwfCTdRq8oR4yX1RJHg5n"}}}},"required":true},"responses":{"200":{"description":"Successful paid bridge execution.","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}}},"402":{"description":"Base x402 payment required.","content":{"application/json":{"schema":{"properties":{"x402Version":{"type":"integer","enum":[2]},"error":{"type":"string"},"resource":{"additionalProperties":true,"type":"object"},"accepts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","minItems":1},"extensions":{"additionalProperties":true,"type":"object"}},"additionalProperties":true,"type":"object","required":["x402Version","accepts"]}}}}},"x-payment-info":{"price":{"mode":"dynamic","amount":"0.001000","currency":"USD","min":"0.001000","max":"0.002500"},"protocols":[{"x402":{}}]}}},"/agent/manifest":{"get":{"summary":"Agent Manifest","operationId":"agent_manifest_agent_manifest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Agent Manifest Agent Manifest Get"}}}}},"security":[]}},"/agent/resolve":{"post":{"summary":"Agent Resolve","operationId":"agent_resolve_agent_resolve_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Agent Resolve Agent Resolve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/gateway/execute":{"post":{"summary":"Gateway Execute","operationId":"gateway_execute_gateway_execute_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/gateway/route":{"post":{"summary":"Gateway Route","operationId":"gateway_route_gateway_route_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Gateway Route Gateway Route Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/gateway/search":{"post":{"summary":"Gateway Search","operationId":"gateway_search_gateway_search_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Gateway Search Gateway Search Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}