bridgenode-llm
BridgeNode Python SDK — AI inference for AI agents, no API keys. Pay per request with Solana USDC via x402. The payment handshake is fully automatic, and fees are sponsored — the agent needs no SOL.
Features
- No API keys, no registration — pay per request with USDC
- Automatic x402 handshake — 402 → signed transaction → 200, fully hidden
- Fee sponsorship (gasless) — the agent needs zero SOL
- Fail-closed spending policy — per-call and daily caps checked before signing
- Receipt verification — every response receipt is verified (invalid → error)
- Smart routing —
mode: auto / eco / premium(model selection per prompt complexity) - MCP support — BridgeNode is also available as an MCP server
Installation
pip install bridgenode-llm
Or install the full toolkit (SDK + CLI):
pip install bridgenode
Usage
from bridgenode_llm import LLMClient
client = LLMClient() # key from .env (BRIDGENODE_WALLET_KEY)
resp = client.chat("deepseek-v4-flash", [
{"role": "user", "content": "Hello!"}])
print(resp["choices"][0]["message"]["content"])
Everything is handled automatically: payment, retry, receipt verification. No API key required.
Smart routing
# Let BridgeNode pick the model: auto / eco / premium
resp = client.chat(None, "Explain quantum computing", mode="auto")
Configuration (.env)
# Required — your Solana wallet private key (base58)
BRIDGENODE_WALLET_KEY=...
# Optional
# BRIDGENODE_BASE_URL=https://bridgenode.cc/v1
# BRIDGENODE_MAX_PER_CALL=0.05 # spending policy: max USD per call (fail-closed)
# BRIDGENODE_DAILY_CAP=1.0 # spending policy: max USD per day
Security
- Receipt verification: after each response, the payment receipt is verified (success, network, payer, signature over your transaction, amount). Invalid receipt →
BridgenodeError. - Spending policy (fail-closed):
BRIDGENODE_MAX_PER_CALL+BRIDGENODE_DAILY_CAPare checked BEFORE signing; exceeded → blocked, no payment. - SIWX: automatic known-agent identification — falls back to payment if auth fails.
Requirements
- Python ≥ 3.11
- A Solana wallet with a USDC token account (ATA)
Links
- Website: https://bridgenode.cc
- Models & prices: https://bridgenode.cc/v1/models
- Documentation: https://bridgenode.cc/llms.txt
- Protocol: x402 V2 (https://docs.x402.org)
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 bridgenode_llm-0.2.9.tar.gz.
File metadata
- Download URL: bridgenode_llm-0.2.9.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e06f17ec26f07f1ffa0c4182e26321d3ef8bcef4312b4670d5df135ce8ae2b4
|
|
| MD5 |
bd420b2999ded2c84a505cfbe8258ef8
|
|
| BLAKE2b-256 |
38ff9c06a5efa0f3a93a95a9e5357a7753e75a8192e3ce5f392400be98a934a3
|
File details
Details for the file bridgenode_llm-0.2.9-py3-none-any.whl.
File metadata
- Download URL: bridgenode_llm-0.2.9-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2a747825071669bfd4d4e239de03683f68ae28a20a4397869f903fa8b8591aa
|
|
| MD5 |
061ee290bf67f29a8256c9d9747322dc
|
|
| BLAKE2b-256 |
46ed2d3f686711fe8f37626e8461afb0c8706462600b94c5fd860bbfa5e506b6
|