hyperd-ai 0.2.0
pip install hyperd-ai
Released:
Python SDK for hyperD โ pay-per-call DeFi APIs for AI agents over x402. 20 paid endpoints on Base USDC, no API key, no signup.
Navigation
Verified details
These details have been verified by PyPIMaintainers
๐ Avatar for 0xdespot from gravatar.com0xdespot ๐ Avatar for hyperd-ai from gravatar.com
hyperd-ai
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Thomas Potter
- Tags agent-tools , ai-agents , base , defi , eip-3009 , hyperd , langchain , usdc , x402
- Requires: Python >=3.10
-
Provides-Extra:
dev,langchain
Classifiers
- Development Status
- Intended Audience
- License
- Programming Language
- Topic
Project description
hyperd-ai โ Python SDK
Pay-per-call DeFi APIs for AI agents on Base. 20 paid x402 endpoints, USDC settlement in ~2s, no API key, no signup. The signed EIP-3009 payment is the auth.
๐ PyPI
๐ Python
๐ License
Try it free
First 5 calls per IP per 24h are free โ no wallet, no signup, no API key. Just curl:
curl"https://api.hyperd.ai/api/balance?address=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
Lifetime cap: 25 calls per IP. After that (or when daily quota is exhausted), the endpoint returns HTTP 402 โ sign a small EIP-3009 USDC payment on Base via the Python SDK or TypeScript MCP server.
/api/wallet/pnl has a tighter free-tier cap of 1 call/IP/day (heavy upstream).
Install
pipinstallhyperd-ai
For LangChain Tool wrappers:
pipinstall'hyperd-ai[langchain]'
Quick start
fromhyperdimport HyperD # private_key can be passed explicitly or read from HYPERD_WALLET_PRIVATE_KEY env client = HyperD(private_key="0x...") # Cost: $0.10 USDC โ auto-signed and settled risk = client.wallet_risk("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045") print(risk["sanctioned"], risk["risk_tier"], risk["categories"]) # Cost: $0.05 pnl = client.wallet_pnl("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", chain="base") print(f"Total P&L: ${pnl['total_pnl_usd']:.2f}")
Fund the wallet
The wallet at private_key must hold USDC on Base. Typical agent runs cost a few cents โ ~$5 of USDC is enough for hundreds of decision cycles.
- Buy USDC directly on Base via Coinbase / Coinbase Wallet
- Bridge from Ethereum via Across or Hop
- Get a test wallet at any Ethereum wallet generator (don't use your primary)
Endpoints
Marquee (the agent decision loop โ $0.32 total)
| Method | Cost | What it answers |
|---|---|---|
client.wallet_risk(address) |
$0.10 | Is this address OFAC-sanctioned or otherwise risky? |
client.token_security(contract, chain) |
$0.05 | Is this token a scam? (GoPlus 0-100 score) |
client.liquidation_risk(address, chain) |
$0.10 | Cross-protocol health across Aave V3 / Compound v3 / Spark / Morpho |
client.wallet_pnl(address, chain) |
$0.05 | Realized + unrealized P&L, per-token breakdown |
client.dex_quote(from_token, to_token, amount, chain) |
$0.02 | Best swap route (Paraswap + 0x) |
Secondary
| Method | Cost |
|---|---|
client.balance(address, chain) |
$0.01 |
client.token_info(query) |
$0.01 |
client.yield_recommend(amount, risk) |
$0.05 |
client.protocol_tvl(slug) |
$0.01 |
client.gas_estimate(chain) |
$0.005 |
client.wallet_persona(address) |
$0.10 |
client.contract_audit(contract, chain) |
$0.10 |
client.governance_summarize(proposal_url) |
$0.10 |
client.sentiment_token(token, window) |
$0.05 |
client.wallet_anomaly(address, chain, window) |
$0.10 |
client.budget_guardian(address) |
$0.01 |
client.bundle(calls) |
$0.20 fixed (up to 10 calls bundled) |
Synthesis Tier (LLM-composed verdicts)
These endpoints compose multiple raw signals into a single plain-language verdict envelope. Each returns a verdict dict with at minimum summary, band, and confidence. Raise max_usdc_per_call if you call the $1+ endpoints:
fromhyperdimport HyperD c = HyperD(private_key="0x...", max_usdc_per_call=2.0) # Full cross-signal risk audit โ composes wallet_risk + liquidation_risk + anomaly verdict = c.risk_full_audit("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045") print(verdict["verdict"]["summary"]) # plain-language risk verdict print(verdict["verdict"]["band"]) # safe / elevated / high / critical # Token behavioural archetype archetype = c.token_archetype("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913") print(archetype["verdict"]["archetype"]) # blue_chip / established / speculative / scam / ... # Narrative wallet thesis (where did this wallet make its money?) thesis = c.wallet_thesis("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045") print(thesis["verdict"]["thesis"]) # yield farmer / accumulator / degen / ... # Structured threat brief (deepest synthesis, $1.50) brief = c.wallet_threat_brief("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045") print(brief["verdict"]["threat_level"]) # low / medium / high / critical # Translate a governance proposal โ jargon-free summary, 1-year cache gov = c.gov_translate("https://snapshot.org/#/aave.eth/proposal/0xabc") print(gov["verdict"]["band"]) # economic_param / treasury / code_upgrade / governance_meta # Optimal yield allocation for a given amount + duration alloc = c.yield_allocation(10_000, duration=90, chain="base") print(alloc["verdict"]["recommended_protocol"], alloc["verdict"]["expected_apy"])
| Method | Cost | What it composes |
|---|---|---|
client.risk_full_audit(address, chain) |
$0.35 | wallet_risk + liquidation_risk + anomaly + contract_audit |
client.token_archetype(contract, chain) |
$0.30 | token_security + token_info + sentiment |
client.wallet_thesis(address, chain) |
$0.50 | wallet_persona + wallet_pnl + anomaly |
client.wallet_threat_brief(address, chain) |
$1.50 | All risk signals โ deepest synthesis |
client.gov_translate(proposal_url) |
$1.00 | Snapshot/Tally proposal โ plain-English verdict |
client.yield_allocation(amount, duration, chain) |
$1.00 | yield_recommend filtered by TVL + lock-up constraints |
Free (no payment)
| Method | What |
|---|---|
client.health() |
Liveness + version |
client.catalog() |
Full machine-readable catalog of every endpoint + price |
LangChain
fromhyperd.langchainimport get_tools fromlangchain.agentsimport create_react_agent fromlangchain_openaiimport ChatOpenAI tools = get_tools(private_key="0x...") # 5 marquee endpoints as StructuredTools llm = ChatOpenAI(model="gpt-4o-mini") agent = create_react_agent(llm, tools) result = agent.invoke({ "messages": [{ "role": "user", "content": "Is 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 safe to send funds to?", }], })
The agent will pick hyperd_wallet_risk from the tool list, sign + settle the payment, and return the result to the LLM for synthesis.
Safety: the per-call USDC cap
Every paid method respects max_usdc_per_call (default $0.25). If the server's 402 challenge requests more than that, the SDK throws HyperdPaymentRefused BEFORE signing โ your wallet can't be drained even by a misbehaving or compromised server.
To raise the cap (e.g. for the $3 watch.create endpoint):
client = HyperD(private_key="0x...", max_usdc_per_call=5.0)
How the x402 payment works
- The SDK makes a normal HTTP GET to the paid endpoint.
- The server responds with HTTP 402 Payment Required and a machine-readable payment-required header.
- The SDK decodes the header, signs an EIP-3009 USDC transfer authorization on Base, and retries with the signed payment in the
X-Paymentheader. - Coinbase's x402 facilitator verifies the signature, submits the transfer on-chain, and unblocks the response. ~2 seconds end-to-end.
There's no key store to rotate, no rate-limit form to fill out, no signup. The signature is the auth.
Errors
| Exception | When |
|---|---|
HyperdPaymentRefused |
Server requested more USDC than max_usdc_per_call |
HyperdHttpError |
Server returned a non-2xx after the payment retry |
HyperdError |
Malformed 402 challenge, missing EIP-712 domain fields, or signing error |
All three inherit from HyperdError so you can catch the umbrella class.
Remote MCP-over-HTTPS (for non-Python agents)
hyperD's tool catalog is also exposed as a remote MCP server at https://api.hyperd.ai/mcp. The Python SDK is the right choice for Python agents; the remote MCP is the right choice for:
- Agents in other languages that already speak MCP (TypeScript, Go via mcp-go, etc.)
- Hosted agent platforms that pull tools from MCP URLs (Smithery, Cursor's remote MCP roadmap)
- Quick API discovery without installing anything
Same 17 tools, same per-IP free-tier quota, same x402 payment auth.
POST https://api.hyperd.ai/mcp
{"jsonrpc":"2.0","id":1,"method":"tools/list"}
Production integrators
Other x402 merchants whose integrator docs reference this SDK's _buyer.py (~210 LOC, requests + eth-account only) as a canonical non-TypeScript buyer implementation:
- AgentOracle (@TKCollective) โ pay-per-call oracle aggregation on x402
- x402-market (@AsaiShota) โ x402 marketplace + merchant tooling
Coordination context: x402-foundation/x402#2207 (the canonical-buyer / Bazaar resource-keying thread).
If you're shipping an x402 service in Go, Rust, JVM, .NET, or any non-TS environment and want a working reference, _buyer.py is the smallest faithful implementation of the v2 wire format โ copy-adapt freely (MIT).
Links
- Production API: https://api.hyperd.ai
- Endpoint catalog: https://api.hyperd.ai/api/catalog
- ElizaOS plugin:
@hyperd-ai/plugin-hyperd(TypeScript) - MCP server:
hyperd-mcp(stdio for Claude Desktop / Cursor / Cline / Zed) - Glama listing: https://glama.ai/mcp/servers/hyperd-ai/hyperd-mcp
- x402 protocol: https://x402.org
License
MIT. Built for agents that pay their own way.
Project details
Verified details
These details have been verified by PyPIMaintainers
๐ Avatar for 0xdespot from gravatar.com0xdespot ๐ Avatar for hyperd-ai from gravatar.com
hyperd-ai
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Thomas Potter
- Tags agent-tools , ai-agents , base , defi , eip-3009 , hyperd , langchain , usdc , x402
- Requires: Python >=3.10
-
Provides-Extra:
dev,langchain
Classifiers
- Development Status
- Intended Audience
- License
- Programming Language
- Topic
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hyperd_ai-0.2.0.tar.gz.
File metadata
- Download URL: hyperd_ai-0.2.0.tar.gz
- Upload date:
- Size: 168.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
516f770aef307fe1c7b3099fbe1759a77a19be46ae3ef3641532fbeefcf8e3ef
|
|
| MD5 |
e64dd478b8f8870162ff751e82adf74e
|
|
| BLAKE2b-256 |
f8221bcaadf31b1effab2ad7f24cbe0a9c3b76bc85ac2b1a5f99c789b72008aa
|
File details
Details for the file hyperd_ai-0.2.0-py3-none-any.whl.
File metadata
- Download URL: hyperd_ai-0.2.0-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cf7421af3f07d7c5046219ae8dd6579f6ebf27535c65f3eeceeeedb979e300d
|
|
| MD5 |
f7102ff484c6937d0bb9658144fa09e8
|
|
| BLAKE2b-256 |
7fef6b3c21ab0b9da6387e360178573a2b06a0b47376cd11a30d458605fc1605
|
