Drop-in replacement for the OpenAI Python SDK that routes your API calls through Stormfire — pay AI APIs in USDT, no Stripe, no KYC.
pip install stormfirefrom stormfire import Stormfire
client = Stormfire(api_key="sk-...") # get yours at https://stormfire.io
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)That's it. Same interface as openai.OpenAI, paid in USDT.
Stormfire is an AI API gateway. You pay us in USDT, we pay OpenAI / Anthropic / Google / DeepSeek on your behalf. No Stripe in the loop, no KYC, works in 30+ countries that traditional billing rejects.
This package is a 30-line wrapper around the official openai SDK that:
- Sets the base URL to
https://api.stormfire.io/v1 - Reads
STORMFIRE_API_KEY(falls back toOPENAI_API_KEY) - Exports both sync (
Stormfire) and async (AsyncStormfire) clients
Everything else is identical. All openai features work — streaming, function calling, vision, structured outputs, the whole surface area.
If you already have OpenAI SDK code, you have two options:
# before
from openai import OpenAI
client = OpenAI()
# after
from stormfire import Stormfire
client = Stormfire() # picks up STORMFIRE_API_KEY or OPENAI_API_KEYfrom openai import OpenAI
client = OpenAI(
api_key="sk-...",
base_url="https://api.stormfire.io/v1",
)Both work. Option 1 is shorter and survives upstream renames better.
import asyncio
from stormfire import AsyncStormfire
async def main():
client = AsyncStormfire()
response = await client.chat.completions.create(
model="claude-3-5-sonnet",
messages=[{"role": "user", "content": "Write a haiku"}],
)
print(response.choices[0].message.content)
asyncio.run(main())stream = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Count to 10"}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")Stormfire supports 30+ models including:
- OpenAI:
gpt-4o,gpt-5,gpt-4o-mini - Anthropic:
claude-3-5-sonnet,claude-3-7-sonnet,claude-3-5-haiku - Google:
gemini-2.0-pro,gemini-2.0-flash - DeepSeek:
deepseek-v3,deepseek-v4 - Mistral:
mistral-large,mistral-small - Open source:
llama-3.1-405b,qwen-2.5-72b
Full list and current pricing: https://stormfire.io/pricing.
Anything that accepts a base_url works. Example with LangChain:
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
api_key="sk-stormfire-key",
base_url="https://api.stormfire.io/v1",
model="gpt-4o",
)git clone https://github.com/stormfire-io/stormfire-python
cd stormfire-python
pip install -e ".[dev]"
pytestMIT — see LICENSE.