Downloads · 30 days
0
xujfcn/Crazyrouter-Getting-Started
Crazyrouter-Getting-Started is a machine learning model from xujfcn. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
One API key. 624+ AI models. OpenAI-compatible. Get started in 60 seconds.
Downloads · 30 days
0
Access
Public
Updated Feb 25, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md5.2 KB · 78%
From the Hugging Face model README
One API key. 624+ AI models. OpenAI-compatible. Get started in 60 seconds.
Crazyrouter is an AI API gateway. Instead of managing separate API keys for OpenAI, Anthropic, Google, DeepSeek, and dozens of other providers, you use one key to access them all.
It's fully OpenAI SDK compatible — just change the base_url and you're done.
sk-...)pip install openai
That's it. No special SDK needed.
from openai import OpenAI
client = OpenAI(
base_url="https://crazyrouter.com/v1",
api_key="sk-your-crazyrouter-key"
)
# Use any model — GPT-4o, Claude, Gemini, DeepSeek...
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[
{"role": "user", "content": "What is an API gateway?"}
]
)
print(response.choices[0].message.content)
curl https://crazyrouter.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-crazyrouter-key" \
-d '{
"model": "gpt-4o-mini",
"messages": [{"role": "user", "content": "Hello!"}]
}'
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://crazyrouter.com/v1",
apiKey: "sk-your-crazyrouter-key",
});
const response = await client.chat.completions.create({
model: "gpt-4o-mini",
messages: [{ role: "user", content: "Hello from Node.js!" }],
});
console.log(response.choices[0].message.content);
The magic of Crazyrouter — switch between any model by changing one string:
# OpenAI
response = client.chat.completions.create(model="gpt-4o", messages=messages)
# Anthropic Claude
response = client.chat.completions.create(model="claude-sonnet-4-20250514", messages=messages)
# Google Gemini
response = client.chat.completions.create(model="gemini-2.0-flash", messages=messages)
# DeepSeek
response = client.chat.completions.create(model="deepseek-chat", messages=messages)
# DeepSeek R1 (reasoning)
response = client.chat.completions.create(model="deepseek-reasoner", messages=messages)
No SDK changes. No config changes. Just the model name.
stream = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Write a short poem about coding"}],
stream=True
)
for chunk in stream:
content = chunk.choices[0].delta.content
if content:
print(content, end="", flush=True)
models = client.models.list()
for model in models.data:
print(model.id)
Or via cURL:
curl https://crazyrouter.com/v1/models \
-H "Authorization: Bearer sk-your-crazyrouter-key"
| Model | Provider | Best For |
|---|---|---|
gpt-4o | OpenAI | General purpose, vision |
gpt-4o-mini | OpenAI | Fast, cheap, good enough |
claude-sonnet-4-20250514 | Anthropic | Coding, analysis |
claude-haiku-3.5 | Anthropic | Fast, affordable |
gemini-2.0-flash | Speed, long context | |
deepseek-chat | DeepSeek | Cheap, strong coding |
deepseek-reasoner | DeepSeek | Complex reasoning (R1) |
o3-mini | OpenAI | Reasoning tasks |
export OPENAI_API_KEY="sk-your-crazyrouter-key"
export OPENAI_BASE_URL="https://crazyrouter.com/v1"
Then your code simplifies to:
from openai import OpenAI
client = OpenAI() # Reads from env vars automatically
Q: Is it really OpenAI-compatible? A: Yes. Any tool that works with the OpenAI API works with Crazyrouter. Just change the base URL.
Q: Is there a free tier? A: Yes. Sign up at crazyrouter.com to get started.
Q: How many models are available? A: 624+ models from 20+ providers, and growing.
Q: Can I use it with LangChain / LlamaIndex / AutoGen? A: Absolutely. See our LangChain guide.