Use the official LLMWise Python SDK (or REST) to chat with multiple models and run multi-model workflows through one API key.
You only pay credits per request. No monthly subscription. Paid credits never expire.
Replace multiple AI subscriptions with one wallet that includes routing, failover, and optimization.
pip install llmwise
# pip install llmwise
# Repository: https://github.com/LLMWise-AI/llmwise-python-sdk
import os
from llmwise import LLMWise
client = LLMWise(os.environ["LLMWISE_API_KEY"])
# Chat (non-stream)
resp = client.chat(
model="auto",
messages=[{"role": "user", "content": "Explain quantum computing in simple terms."}],
max_tokens=512,
)
print(resp["content"])
# Streaming chat (SSE JSON events)
for ev in client.chat_stream(
model="claude-sonnet-4.5",
messages=[{"role": "user", "content": "Write a Python quicksort implementation."}],
):
if ev.get("delta"):
print(ev["delta"], end="", flush=True)
if ev.get("event") == "done":
print(f"\n\ncharged={ev.get('credits_charged')} remaining={ev.get('credits_remaining')}")
breakEverything you need to integrate LLMWise's multi-model API into your Python project.
Install the official llmwise package. Repo: https://github.com/LLMWise-AI/llmwise-python-sdk
pip install llmwise
Sign up at llmwise.ai to get your API key. Store it as an environment variable so it stays out of your source code.
export LLMWISE_API_KEY="your_api_key_here"
Instantiate the LLMWise client (base URL defaults to https://llmwise.ai/api/v1).
import os from llmwise import LLMWise client = LLMWise(os.environ["LLMWISE_API_KEY"])
Pass a model ID (or model="auto"). Messages are OpenAI-style role/content objects.
resp = client.chat(
model="gemini-3-flash",
messages=[{"role": "user", "content": "Summarize the key ideas of REST API design."}],
)
print(resp["content"])Use chat_stream() to receive SSE JSON events. Render ev.delta and stop on the done event.
for ev in client.chat_stream(
model="deepseek-v3",
messages=[{"role": "user", "content": "Explain gradient descent step by step."}],
):
if ev.get("delta"):
print(ev["delta"], end="", flush=True)
if ev.get("event") == "done":
breakProvide a fallback chain to automatically retry on 429/5xx/timeouts. Route + trace events are emitted when failover triggers.
for ev in client.chat_stream(
model="gpt-5.2",
routing={"strategy": "rate-limit", "fallback": ["claude-sonnet-4.5", "gemini-3-flash"]},
messages=[{"role": "user", "content": "Summarize this support thread."}],
):
if ev.get("event") in {"route", "trace"}:
continue
if ev.get("event") == "done":
break
if ev.get("delta"):
print(ev["delta"], end="", flush=True)You only pay credits per request. No monthly subscription. Paid credits never expire.
Replace multiple AI subscriptions with one wallet that includes routing, failover, and optimization.