DEV Community

rf ui
rf ui

Posted on

One base_url, 100+ Models: Unify Your LLM Calls with an OpenAI-Compatible Gateway

One base_url, 100+ Models: Unify Your LLM Calls with an OpenAI-Compatible Gateway

The most annoying part of building agents or running batch inference is wiring a different SDK, key, and rate-limit logic for every provider.

Good news: most major models now speak the OpenAI protocol. Change one base_url and your existing OpenAI SDK code works with zero changes — just swap the model name.

Why use a compatible gateway

  • Zero code change: keep from openai import OpenAI, only swap base_url and api_key
  • One key for 100+ models: Claude / GPT / Gemini / DeepSeek in one place
  • Lower cost: off-peak DeepSeek can go as low as 2.5折 (25% off), cheap enough for side-projects
  • Unified rate-limit / retry / routing

30-second example

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_KEY",
    base_url="https://5pcloud.top/v1"
)

r = client.chat.completions.create(
    model="deepseek-chat",
    messages=[{"role": "user", "content": "hello"}]
)
print(r.choices[0].message.content)
Enter fullscreen mode Exit fullscreen mode

Swap base_url to any OpenAI-compatible endpoint. Change models by editing the model field only.

Tips

  • Don't prepay big — start small
  • Check availability and refund policy
  • Light/medium usage: a compatible gateway is the easiest; huge volume: consider self-hosting one-api

A ready-to-use single-file chat UI

I built a zero-dependency, single-file chat UI that defaults to Ara API (5pcloud.top). Clone and deploy, it just works:

OpenAI-compatible, 100+ models with one line, off-peak DeepSeek as low as 2.5折, free tier for new users.

Get a key: https://5pcloud.top/


Originally published on the Ara API blog. Ara API is an OpenAI-compatible multi-model gateway for indie developers and small teams.

Top comments (0)