DEV Community

ModelHub Dev
ModelHub Dev

Posted on

How We Built a DeepSeek API Proxy - 45x Cheaper Than OpenAI

Why We Built This

As developers, we got tired of managing multiple API keys for different AI providers. GPT-4o from OpenAI. Claude from Anthropic. Gemini from Google. DeepSeek from DeepSeek.

Three different accounts. Three different SDKs. Three different bills.

So we built ModelHub — a single API gateway that gives you access to all major AI models through one OpenAI-compatible endpoint.

The Result

One API key. One bill. Up to 43x cost savings compared to OpenAI direct pricing.

Here's our model lineup:

Model Input Cost (per 1M tokens)
DeepSeek V4 Pro $0.27
DeepSeek V4 Flash $0.15
Qwen 3-32B $0.30
GLM-4-7 $0.30
Kimi K2.6 $0.30

Compare: GPT-4o costs $2.50/M tokens. Claude 3.5 Sonnet costs $3.00/M tokens.

Our DeepSeek V4 Flash at $0.15/M tokens is 1/43rd the cost of GPT-4o.

How It Works

Same OpenAI SDK. Just change your base_url and api_key.

import openai
client = openai.OpenAI(
    base_url="https://modelhub-api.com/v1",
    api_key="mh-sk-your-key-here"
)
response = client.chat.completions.create(
    model="deepseek-v4-flash",
    messages=[{"role": "user", "content": "Hello!"}]
)
Enter fullscreen mode Exit fullscreen mode

That's it. Your existing code works without changes.

Try It Free

Get $5 free credit on signup — no credit card required. Covers roughly 33,000+ API calls.

👉 modelhub-api.com


Built by developers, for developers. Questions? Drop them below.

Top comments (0)