Skip to main content

bridgenode-cli

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

BridgeNode CLI — 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 — no SOL needed.

Installation

pip install bridgenode-cli

Or install the full toolkit (SDK + CLI):

pip install bridgenode

Usage

# Free models need no wallet — and the first 2 calls to a PAID model are free
bridgenode chat "Hello!" --model gpt-oss-120b

# Single chat completion (payment handshake fully automatic)
bridgenode chat "Hello!" --model deepseek-flash

# Smart routing: auto / eco / premium
bridgenode chat "Analyze this code" --mode auto

# Model list + prices (no payment)
bridgenode models

Tool calling

Pass your tool definitions (OpenAI format) as inline JSON or a .json file. When the model calls a tool, the assistant message is printed as JSON (content: null + tool_calls) instead of text — ready for your agent loop:

# Inline JSON
bridgenode chat "What is the weather in Vilnius?" --model gpt-oss-120b \
  --tools '[{"type":"function","function":{"name":"get_weather","parameters":{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}}}]'

# …or from a file (with a selection policy)
bridgenode chat "What is the weather in Vilnius?" --model gpt-oss-120b \
  --tools tools.json --tool-choice auto

One command = one request = one payment; run the tool yourself and call again with the result for the next round. The tool schema counts as input tokens (it raises the price), and only models marked "tools": true in bridgenode models support it.

Options

Option Description
--model Explicit model id (see bridgenode models)
--mode auto / eco / premium (smart routing)
--max-tokens Max output tokens (billed upfront)
--tools Tool definitions: inline JSON array or a path to a .json file
--tool-choice auto / none / required, or inline JSON object / file
--base-url Base URL (default: BRIDGENODE_BASE_URL / https://bridgenode.cc/v1)
--max-per-call / --daily-cap Spending policy (fail-closed)

Configuration (.env)

# Optional — your Solana wallet private key (base58).
# Needed only for PAID requests: free models and the 2 free trials work without it.
BRIDGENODE_WALLET_KEY=...
# Optional: BRIDGENODE_BASE_URL, BRIDGENODE_MAX_PER_CALL, BRIDGENODE_DAILY_CAP

Security

  • Receipt verification: every response receipt is verified — invalid receipt → error.
  • Spending policy (fail-closed): max USD per call / per day — checked BEFORE signing.

Why BridgeNode (vs API keys)

BridgeNode CLI Traditional AI APIs
Sign-up None Account + verification
API key Not needed Required
Billing Pay-per-request (USDC) Subscription / credits
Fees Gas sponsored On you
Spending caps Fail-closed per call/day Account-level

FAQ

Do I need SOL? No — fees are sponsored; only the USDC request amount is paid.

Is there an API key? No — your wallet signature (SIWX) is the identity.

Can I cap spending? Yes — --max-per-call / --daily-cap (fail-closed, checked before signing).

Which models? See bridgenode models or https://bridgenode.cc/v1/models.

Requirements

  • Python ≥ 3.11
  • A Solana wallet with a USDC token account (ATA)

Metadata

Release files for bridgenode-cli 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bridgenode-cli 0.2.0
File Size Uploaded
bridgenode_cli-0.2.0.tar.gz 13.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bridgenode-cli 0.2.0
File Interpreter ABI Platform
bridgenode_cli-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.7 kB

Release files / bridgenode_cli-0.2.0.tar.gz

Download URL bridgenode_cli-0.2.0.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1f6190079e8178d956725b143609afb214888709f75c2fc35b9f8d698ae704c5
BLAKE2b-256 checksum
How to use checksums
0c4500abe2e035953c39e55a9b5bfcf3ff08575cbeb273ca45af254f9419b97a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / bridgenode_cli-0.2.0-py3-none-any.whl

Download URL bridgenode_cli-0.2.0-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e54df34ccc01192d7b50ab40002deb57cd17bddce372b44b86d0dfa19f737d5d
BLAKE2b-256 checksum
How to use checksums
de03dfe6cbf1dd83f7f9cdea8fd1c99f0c313ca47a49dbf6ca358dc8521eabe4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.12

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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