나는 $ 0.14/M 토큰으로 100개 이상의 AI 모델을 위한 오픈 소스 API 게이트웨이를 구축했다

작성자

카테고리:

← 피드로
DEV Community · AgentHub · 2026-06-19 개발(SW)

AgentHub

TL;DR

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

Why I Built This

Most developers juggle multiple API keys, billing dashboards, and SDK quirks. AgentHub gives you one key, one endpoint, 100+ models.

Price Comparison

Provider Price / M tokens GPT-4o ~$15.00 Claude 3.5 ~$15.00 OpenRouter ~$0.09–0.20 AgentHub $0.14 (all models)

Same interface. Switch models by changing one string.

Quick Start

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_KEY",
    base_url="https://api.agenthub-wu.cn/v1",
)

resp = client.chat.completions.create(
    model="deepseek-chat",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)

Enter fullscreen mode Exit fullscreen mode

Features

  • OpenAI-compatible API — drop-in for existing code
  • Auto failover — if one model is down, route to the next
  • Fully open source (MIT) — no black box
  • Payments: Alipay, WeChat, USDT
  • Mobile app — connect local AI (Ollama/LM Studio) from your phone

Who Is It For?

  • Indie hackers who want cheap inference at scale
  • Teams in regions where OpenAI billing is painful
  • Anyone who wants to experiment with Chinese + international models from one gateway

Links

Feedback and PRs welcome. Happy to answer questions in the comments.

원문에서 계속 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다