Skip to main content

bridgenode-llm

BridgeNode Python SDK — AI inference without API keys. Payment: Solana USDC via x402 (automatic handshake, fee sponsorship — no SOL needed for the agent).

Installation

pip install bridgenode-llm

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: 402 → partial TX → PAYMENT-SIGNATURE → 200 (§4.1). No API key required.

.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 (Free-Riding protection): after 200, PAYMENT-RESPONSE is verified — success, network, payer, fee payer signature over our TX message, amount. Invalid receipt → BridgenodeError.
  • Spending policy (fail-closed): BRIDGENODE_MAX_PER_CALL + BRIDGENODE_DAILY_CAP — checked BEFORE signing; exceeded → blocked, no payment.
  • SIWX: automatic known-agent identification (§5.7) — falls back to payment if auth fails.

Commands

client.chat(model, messages, max_tokens=..., mode="auto")  # mode: auto/eco/premium

Requirements

  • Python ≥ 3.11
  • Solana wallet with USDC ATA (rent — agent's responsibility, §3.3)

Links

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bridgenode_llm-0.2.7.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bridgenode_llm-0.2.7-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file bridgenode_llm-0.2.7.tar.gz.

File metadata

  • Download URL: bridgenode_llm-0.2.7.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for bridgenode_llm-0.2.7.tar.gz
Algorithm Hash digest
SHA256 ec238d0b9fd0a5568d1b2f628bff0bc660ce2e4861166df6edc017173411c7dd
MD5 6faa63f35ddeff2ea55b215665ce5275
BLAKE2b-256 a1f5de621817de85a47916001b0b0b8014a13663534d713f1b2402e077a8c9be

See more details on using hashes here.

File details

Details for the file bridgenode_llm-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: bridgenode_llm-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for bridgenode_llm-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 760363a6bb1649c8298dac46b0f6d13353cb751f956e950b65ca2cea4ab3bb5e
MD5 7943f8f4e27e4d4d1758ec6036786828
BLAKE2b-256 65080901a8003e075e4420f2dcafa608093160579812926ffeba5ed6e2bf603f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page