Metadata-Version: 2.5
Name: uplinkswitch
Version: 0.1.0
Summary: One API key for Claude, GPT, Gemini, DeepSeek and 80+ models, through the OpenAI and Anthropic SDKs.
Project-URL: Homepage, https://uplinkswitch.com
Project-URL: Documentation, https://uplinkswitch.com/guides/sdks
Project-URL: Models, https://uplinkswitch.com/models
Project-URL: Pricing, https://uplinkswitch.com/pricing-index
Author-email: Uplink Switch LLC <hello@uplinkswitch.com>
License-Expression: MIT
License-File: LICENSE
Keywords: ai gateway,anthropic,claude api,gemini api,gpt api,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

# uplinkswitch

Python client for [UplinkSwitch](https://uplinkswitch.com): one API key for Claude, GPT, Gemini, DeepSeek, Qwen, Kimi, GLM, Grok and more, priced under each developer's list. The API speaks the OpenAI and Anthropic formats, so you keep the official SDKs.

```bash
pip install "uplinkswitch[openai]"      # or [anthropic], or [all]
export UPLINKSWITCH_API_KEY="sk-uplink-live-..."
```

Get a key at [uplinkswitch.com/console](https://uplinkswitch.com/console). New accounts get $1 of free credit.

## OpenAI SDK

```python
import uplinkswitch

client = uplinkswitch.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 uplinkswitch

client = uplinkswitch.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 uplinkswitch

for m in uplinkswitch.models():
    lp, p = m.get("list_pricing"), m["pricing"]
    if lp:
        print(f'{m["id"]:<28} ${p["input"]}/${p["output"]} per 1M (list ${lp["input"]}/${lp["output"]})')
```

`uplinkswitch.media_models()` returns the image, video and speech models.

## Without this package

Set `OPENAI_BASE_URL` or `ANTHROPIC_BASE_URL` to `https://api.uplinkswitch.com/v1` and use your key. Setup for Claude Code, Cursor, Cline, Roo and OpenCode: [uplinkswitch.com/guides](https://uplinkswitch.com/guides).

- Models and prices: [uplinkswitch.com/models](https://uplinkswitch.com/models)
- Daily real-model check: [uplinkswitch.com/proof](https://uplinkswitch.com/proof)
- Contact: hello@uplinkswitch.com
