DEV Community

AgentHub
AgentHub

Posted on

I Built an Open-Source API Gateway for 100+ AI Models at $0.14/M Tokens

TL;DR

AgentHub is a unified, OpenAI-compatible API gateway for 100+ models at $0.14/M tokens — about 99% cheaper than GPT-4.

Why I Built This

One key, one endpoint, 100+ models. No more juggling API accounts.

Price Comparison

Provider Price / M tokens
GPT-4o ~$15.00
Claude 3.5 ~$15.00
AgentHub $0.14

Quick Start

from openai import OpenAI
client = OpenAI(api_key="YOUR_KEY", base_url="https://api.agenthub-wu.cn/v1")
print(client.chat.completions.create(model="deepseek-chat", messages=[{"role":"user","content":"hi"}]).choices[0].message.content)
Enter fullscreen mode Exit fullscreen mode

Links

Feedback welcome in comments!

Top comments (0)