SoxAI — Unified AI API Gateway client. Access 200+ AI models from 40+ providers through one OpenAI-compatible API.
Project description
SoxAI Python SDK
The official Python client for SoxAI — a unified AI API gateway that gives you access to 200+ AI models from 40+ providers through a single OpenAI-compatible API.
Installation
pip install soxai
Quick Start
from soxai import SoxAI
client = SoxAI(api_key="sox-your-key")
# Use any model from any provider — same SDK
response = client.chat.completions.create(
model="claude-sonnet-4-6", # or gpt-4o, gemini-2.5-flash, deepseek-chat, ...
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
Why SoxAI?
- One API key for OpenAI, Anthropic, Google, DeepSeek, Meta, and 35+ more providers
- Automatic failover — if one provider goes down, requests route to another
- Team management — per-developer API keys with spending limits
- Compatible with Claude Code, Codex CLI, Gemini CLI — just set
ANTHROPIC_BASE_URL - Free $5 credit to start, no credit card required
Examples
Streaming
from soxai import SoxAI
client = SoxAI(api_key="sox-your-key")
stream = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Write a haiku about APIs."}],
stream=True,
)
for chunk in stream:
content = chunk.choices[0].delta.content
if content:
print(content, end="", flush=True)
Multi-Model Comparison
from soxai import SoxAI
client = SoxAI(api_key="sox-your-key")
models = ["gpt-4o-mini", "claude-sonnet-4-6", "gemini-2.5-flash", "deepseek-chat"]
prompt = "Explain the CAP theorem in one sentence."
for model in models:
r = client.chat.completions.create(
model=model,
messages=[{"role": "user", "content": prompt}],
)
print(f"{model}: {r.choices[0].message.content}")
Image Generation
from soxai import SoxAI
client = SoxAI(api_key="sox-your-key")
response = client.images.generate(
model="dall-e-3",
prompt="A futuristic API gateway, digital art",
size="1024x1024",
)
print(response.data[0].url)
Environment Variable
export SOXAI_API_KEY="sox-your-key"
from soxai import SoxAI
client = SoxAI() # reads from SOXAI_API_KEY
Using with Existing OpenAI Code
Already using the OpenAI SDK? You can also just change base_url:
from openai import OpenAI
client = OpenAI(
api_key="sox-your-key",
base_url="https://api.soxai.io/v1",
)
# Everything else stays the same
Links
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file soxai-0.1.0.tar.gz.
File metadata
- Download URL: soxai-0.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
324394495bfc28069f22107311817aa85310be28008263b93f6af0c620d04d31
|
|
| MD5 |
0c4ed09676a4815e008a4d251d6860b6
|
|
| BLAKE2b-256 |
be088391abdc11c4b6944455602f20a2a0e6bcfe78b112df821cebf9078849d9
|
File details
Details for the file soxai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: soxai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8eb23c5fa0eb4207002d657f997a4df942793b9b2d858eb42ba000b5a4d6b4de
|
|
| MD5 |
6e613ab0a57709815e8d23965b895a59
|
|
| BLAKE2b-256 |
a539717d550ee4e5bcacbaf7eef3ff6869566dff859c5c3c51f47baa31efe068
|