Metadata-Version: 2.4
Name: basedrouter
Version: 0.1.0
Summary: Official Python SDK for basedrouter (api.basedrouter.com) — one OpenAI-compatible endpoint across 45 models from 14 providers, with USDC payments and signed receipts.
Project-URL: Homepage, https://basedrouter.com
Project-URL: Documentation, https://basedrouter.com/docs
Project-URL: Repository, https://github.com/TRADEBETTERAPP/better
Author: basedrouter
License: Proprietary
Keywords: ai,anthropic,basedrouter,claude,llm,openai,router,usdc
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# basedrouter

Python SDK for the basedrouter API.

```python
from basedrouter import BasedRouterClient

client = BasedRouterClient(api_key="basedrouter_live_...")
response = client.create_chat_completion(
    model="auto",
    messages=[{"role": "user", "content": "route this"}],
    stream=True,
)

for event in client.iter_sse(response.data):
    print(event.event, event.data)
```

The client defaults to `https://api.basedrouter.com/v1` and sends basedrouter bearer API keys when
`api_key` is provided. Accountless x402 challenge creation can be called without a key.

Operations helpers are included for accounts, API-key limits, usage, logs,
receipts, provider health/configuration, monitoring summaries, and payment
intent lifecycle calls.
