Metadata-Version: 2.4
Name: bridgenode
Version: 0.1.2
Summary: BridgeNode — AI inference without API keys. Pay per request with Solana USDC via x402. Full toolkit: Python SDK + CLI.
Author-email: BridgeNode <eli.BNx@proton.me>
License-Expression: MIT-0
Project-URL: Homepage, https://bridgenode.cc
Project-URL: Repository, https://github.com/applefanaimail-blip/bridgenode-llm
Project-URL: Documentation, https://bridgenode.cc/llms.txt
Keywords: x402,solana,usdc,ai,llm,cli,agents,payment,bridgenode,openai-compatible,chat,inference,micropayments
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: bridgenode-llm>=0.2.8
Requires-Dist: bridgenode-cli>=0.1.2
Dynamic: license-file

# bridgenode

[![PyPI version](https://img.shields.io/pypi/v/bridgenode.svg)](https://pypi.org/project/bridgenode/)
[![Downloads](https://img.shields.io/pypi/dm/bridgenode.svg)](https://pypi.org/project/bridgenode/)
[![License: MIT-0](https://img.shields.io/badge/License-MIT--0-yellow.svg)](https://opensource.org/license/mit-0/)
[![Python versions](https://img.shields.io/pypi/pyversions/bridgenode.svg)](https://pypi.org/project/bridgenode/)

BridgeNode — AI inference for AI agents, no API keys. Pay per request with **Solana USDC via x402**. No API keys, no registration — the payment handshake is fully automatic, and fees are sponsored (the agent needs no SOL).

This is the full toolkit meta-package: it installs the **Python SDK** (`bridgenode-llm`) and the **CLI** (`bridgenode-cli`) in one step.

## Installation

```bash
pip install bridgenode
```

This installs:

- **`bridgenode-llm`** — the Python SDK (`LLMClient`): `from bridgenode_llm import LLMClient`
- **`bridgenode-cli`** — the command-line tool: `bridgenode chat "Hello!"`

## Quick start (Python)

```python
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"])
```

## Quick start (CLI)

```bash
bridgenode chat "Hello!" --model deepseek-v4-flash
bridgenode models  # list models + prices (no payment)
```

## Configuration (.env)

```bash
# 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
```

## 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`
- **MCP support** — BridgeNode is also available as an MCP server

## 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)
