LangGraph / LangChain
Call BRAINIAC with the Python x402 client inside a LangGraph node, or use HTTP from LangChain tools.
Verification: verified end to end — Verified end to end on 20 Nov 2026 with Python x402 + LangGraph against a paid BRAINIAC route ($0.01 test call).
Install
pip install x402 langgraph, and keep a Base USDC wallet available to the process.
Wallet and budget
Configure the x402 client with your private key, a per-call max equal to the operation price, and a hard budget stop.
Minimal paid call
POST JSON to a catalog path. The client handles 402 → payment-signature → retry.
from x402 import X402Client
client = X402Client(private_key="…", max_value="…")
response = client.post("https://www.brainiac.software/api/v1/license/requirements", json={"…": "…"})Discover
Load /api/v1/catalog or product OpenAPI under /api/v1/{group}/openapi.json. Do not hard-code prices in agents.
Errors
Treat 400/402/5xx as unpaid. Only trust a charge when the response is 2xx and payment-response is present.
Idempotency
Send Idempotency-Key as 64 hex characters when the graph may retry.
Live prices
- license.requirements: $0.01 ·
/api/v1/license/requirements
Catalog sum today: $0.01 USDC.