Drop-in replacement for the OpenAI Node SDK that routes API calls through Stormfire — pay AI APIs in USDT, no Stripe, no KYC.
npm install stormfire
# or
pnpm add stormfire
# or
yarn add stormfireimport { Stormfire } from 'stormfire';
const client = new Stormfire({ apiKey: 'sk-...' });
const response = await client.chat.completions.create({
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Hello' }],
});
console.log(response.choices[0].message.content);That's it. Same interface as openai from the official SDK, paid in USDT.
The constructor reads keys in this order:
apiKeyoptionSTORMFIRE_API_KEYenv varOPENAI_API_KEYenv var (handy for migration)
export STORMFIRE_API_KEY=sk-...
node my-script.js// before
import OpenAI from 'openai';
const client = new OpenAI();
// after
import { Stormfire } from 'stormfire';
const client = new Stormfire(); // picks up STORMFIRE_API_KEY or OPENAI_API_KEYOr, without this package, just override the base URL:
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'sk-...',
baseURL: 'https://api.stormfire.io/v1',
});Both work. This package is a 30-line wrapper that saves you the baseURL line.
const stream = await client.chat.completions.create({
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Count to 10' }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || '');
}const response = await client.chat.completions.create({
model: 'gpt-4o',
messages: [
{
role: 'user',
content: [
{ type: 'text', text: "What's in this image?" },
{ type: 'image_url', image_url: { url: 'https://example.com/img.jpg' } },
],
},
],
});Stormfire supports 30+ models. Full list: https://stormfire.io/pricing.
| Provider | Models |
|---|---|
| OpenAI | gpt-4o, gpt-5, gpt-4o-mini |
| Anthropic | claude-3-5-sonnet, claude-3-7-sonnet, claude-3-5-haiku |
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 |
- LangChain.js (
ChatOpenAIwithconfiguration.baseURL) - Vercel AI SDK (
createOpenAIwithbaseURL) - Anthropic SDK (set
baseURLtohttps://api.stormfire.io/v1) - Any framework that accepts OpenAI-compatible endpoints
MIT — see LICENSE.