Metadata-Version: 2.5
Name: relayswitch
Version: 0.1.0
Summary: One API key for Claude Code, OpenClaw, OpenCode and every chat model, paid by card or crypto, through the OpenAI and Anthropic SDKs.
Project-URL: Homepage, https://relayswitch.io
Project-URL: Models, https://relayswitch.io/models
Author-email: Uplink Switch LLC <hello@relayswitch.io>
License-Expression: MIT
License-File: LICENSE
Keywords: ai gateway,anthropic,claude api,claude code,crypto,llm,llm api,openai compatible
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Provides-Extra: all
Requires-Dist: anthropic>=0.34; extra == 'all'
Requires-Dist: openai>=1.40; extra == 'all'
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.34; extra == 'anthropic'
Provides-Extra: openai
Requires-Dist: openai>=1.40; extra == 'openai'
Description-Content-Type: text/markdown

# relayswitch

Python client for [RelaySwitch](https://relayswitch.io): one API key for Claude, GPT, Gemini, DeepSeek, Qwen, Kimi, GLM and more, built for coding agents and paid by card or crypto. The API speaks the OpenAI and Anthropic formats, so you keep the official SDKs.

```bash
pip install "relayswitch[openai]"      # or [anthropic], or [all]
export RELAYSWITCH_API_KEY="..."
```

Get a key at [app.relayswitch.io/console](https://app.relayswitch.io/console). Credit is prepaid from $10, with no subscription.

## OpenAI SDK

```python
import relayswitch

client = relayswitch.openai_client()
reply = client.chat.completions.create(
    model="claude-opus-5-5",
    messages=[{"role": "user", "content": "Say hi in five words."}],
)
print(reply.choices[0].message.content)
```

## Anthropic SDK

```python
import relayswitch

client = relayswitch.anthropic_client()
msg = client.messages.create(
    model="claude-sonnet-5-5",
    max_tokens=200,
    messages=[{"role": "user", "content": "Say hi in five words."}],
)
print(msg.content[0].text)
```

## Prices, no key needed

```python
import relayswitch

for m in relayswitch.models():
    p = m["pricing"]
    print(f'{m["id"]:<40} ${p["input"]}/${p["output"]} per 1M tokens')
```

## Without this package

Set `OPENAI_BASE_URL` or `ANTHROPIC_BASE_URL` to `https://api.relayswitch.io/v1` and use your key.

- Models and prices: [relayswitch.io/models](https://relayswitch.io/models)
- Daily real-model check: [relayswitch.io/proof](https://relayswitch.io/proof)
- Setup guides: [relayswitch.io/guides](https://relayswitch.io/guides)

Run by Uplink Switch LLC.
