Skip to main content

bridgenode-llm

PyPI version Downloads License: MIT-0 Python versions CI BridgeNode on x402-list GitHub Stars

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 routingmode: auto / eco / premium (model selection per prompt complexity)
  • MCP support — BridgeNode is also available as an MCP server

BridgeNode vs traditional APIs

BridgeNode Traditional AI APIs
Sign-up None Account + verification
API key Not needed Required (leak risk)
Billing Pay-per-request (USDC) Subscription / prepaid credits
Setup Wallet only SDK + key + quotas
Fees Gas sponsored Network fees on you
Spending control Fail-closed caps Account-level limits
Identity Wallet signature (SIWX) API key

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_CAP are 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)

FAQ

Do agents need SOL? No — fees are sponsored. The agent pays only the USDC request amount.

Is there an API key? No. Your wallet signature is the identity (SIWX); payment is the access.

What happens if the spending cap is exceeded? The request is blocked before signing — fail-closed, no payment is made.

Which models are available? See https://bridgenode.cc/v1/models (live list with prices).

How is the payment receipt verified? Every response includes a receipt; the SDK verifies its signature, network, payer and amount — invalid receipts raise BridgenodeError.

Can I use this in CI / headless agents? Yes — no browser, no keys, just a wallet private key in env.

Related packages

The BridgeNode toolkit on PyPI:

Links

Community

Star this repo — it helps AI agents discover BridgeNode.

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.18.tar.gz (22.3 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.18-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bridgenode_llm-0.2.18.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for bridgenode_llm-0.2.18.tar.gz
Algorithm Hash digest
SHA256 02b985e419f03e5e9e17c8d041149fb9a14a90082afc2a011c00f0a2a7481326
MD5 50a5d3bc118ba0e57a4e0c6bca26a77e
BLAKE2b-256 70b2da177cc11742a871285dda551a95f23631474e69f2098eaec729532c47d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for bridgenode_llm-0.2.18.tar.gz:

Publisher: publish.yml on bridgenode-ai/bridgenode-llm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: bridgenode_llm-0.2.18-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for bridgenode_llm-0.2.18-py3-none-any.whl
Algorithm Hash digest
SHA256 c0e8263a41015b756c8362da9cf519e2ef960864dde176d4d014f49813017044
MD5 08de7037b41649394e789bbce835c189
BLAKE2b-256 e10df6497a989710bab81709f6c1af8968192a982e4266fdc9a391c5eb03b60d

See more details on using hashes here.

Provenance

The following attestation bundles were made for bridgenode_llm-0.2.18-py3-none-any.whl:

Publisher: publish.yml on bridgenode-ai/bridgenode-llm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.20

2 files

0.2.19

2 files

This release

0.2.18 This release

2 files

0.2.17

2 files

0.2.16

2 files

0.2.15

2 files

0.2.14

2 files

0.2.13

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page