Skip to content

One API for OpenAI, Anthropic, Gemini and local models

Which open-source AI gateways unify OpenAI, Anthropic, Google Gemini and local servers like Ollama and vLLM under one API, and how Kaeso translates five formats without dropping parameters.

Published
Reading time
3 min
Author
Kaeso Team
A bright gradient of coral and pink, folding diagonally upward, with a warm light in one corner

Several open-source AI gateways let applications call OpenAI, Anthropic, Google Gemini and local model servers such as Ollama, vLLM and LM Studio through a single endpoint: Kaeso, LiteLLM, Bifrost and Portkey Gateway.

The main difference between them is not whether they can proxy an OpenAI Chat Completions call. All four can. What differs is which inbound SDKs they translate natively, how they handle unsupported fields across providers, and whether local models share the same auth, budgets and routing as cloud providers.

How open-source gateways unify cloud and local models

  • Kaeso 0.7.0 (Rust, MIT)
    Inbound API formats
    OpenAI Chat & Responses, Anthropic Messages, Gemini API (/v1beta), ElevenLabs
    Cloud providers
    50 built-in (OpenAI, Anthropic, Google AI Studio, Vertex/GEAP, Bedrock, Azure, Mistral, DeepSeek, Groq and more)
    Local servers (Ollama, vLLM, LM Studio)
    Custom providers with Detect settings and explicit private-network allowlist
    Translation approach
    Strict KPP codec: refuses unsupported fields instead of silently dropping them
  • LiteLLM (Python)
    Inbound API formats
    OpenAI, Anthropic, Gemini, Bedrock pass-through
    Cloud providers
    100+ providers
    Local servers (Ollama, vLLM, LM Studio)
    Via api_base in config.yaml
    Translation approach
    Permissive mapping (drop_params optional)
  • Bifrost (Go)
    Inbound API formats
    OpenAI, Anthropic, GenAI
    Cloud providers
    25+ providers
    Local servers (Ollama, vLLM, LM Studio)
    Via custom OpenAI-compatible endpoints
    Translation approach
    Native Go adapters
  • Portkey Gateway (TypeScript)
    Inbound API formats
    OpenAI-compatible + provider headers
    Cloud providers
    Broad cloud catalogue
    Local servers (Ollama, vLLM, LM Studio)
    Via custom host config
    Translation approach
    Config-driven adapter plugins

See the full feature and benchmark matrix on /compare and /benchmarks.

Keep the SDK your app already uses

In Kaeso, every inbound chat format reaches every chat model in a project's catalogue, cloud or local. Your team does not have to rewrite Anthropic apps to OpenAI or rewrite Google Gen AI apps to match vLLM.

OpenAI Python SDK calling Anthropic, Gemini or local vLLM

from openai import OpenAI client = OpenAI(    base_url="https://kaeso.example.com/v1",    api_key="sk-kso-…",) # Any model in your project catalogue works through the same client:# "gpt-6-sol", "claude-sonnet-5-5", a Gemini model, or "ollama/qwen3".reply = client.responses.create(    model="claude-sonnet-5-5",    input="Summarize the architecture trade-offs of a stateless gateway.",)

Anthropic TypeScript SDK calling OpenAI or Ollama

import Anthropic from "@anthropic-ai/sdk"; const client = new Anthropic({  baseURL: "https://kaeso.example.com",  apiKey: process.env.KAESO_API_KEY,}); const message = await client.messages.create({  model: "gpt-5.4-mini",  max_tokens: 512,  messages: [{ role: "user", content: "List three checks for a local vLLM rollout." }],});

Google Gen AI SDK calling Claude or local models

from google import genai client = genai.Client(    api_key="sk-kso-…",    http_options={"base_url": "https://kaeso.example.com"},) response = client.models.generate_content(    model="claude-sonnet-5-5",    contents="Explain why strict API translation prevents silent prompt bugs.",)

Coding agents work the same way: point Claude Code at https://kaeso.example.com (Anthropic Messages) and Codex at https://kaeso.example.com/v1 (wire_api = "responses"). See Gemini apps through Kaeso for full /v1beta details.

Connecting Ollama, vLLM, LM Studio and llama.cpp

Local and self-hosted inference servers sit inside Kaeso as custom providers right beside your cloud keys:

  1. Allow your private subnet in compose.override.yaml so the gateway cannot be tricked into SSRF against unintended internal hosts:
services:  gateway:    environment:      KAESO_CUSTOM_PROVIDERS_ALLOWED_NETWORKS: 10.0.0.0/8,192.168.0.0/16
  1. In the Kaeso console under Providers › Custom providers, click Add custom provider, choose the server software (Ollama, vLLM, LM Studio, llama.cpp, TGI or generic OpenAI-compatible), enter its base URL (such as http://10.0.1.20:11434/v1) and run Detect settings.
  2. Add the detected models to your project catalogue and set prices to 0 if you do not pay per token on your own GPU hardware.

Once added, local models behave identically to OpenAI, Anthropic and Google models:

  • You can route sensitive or short prompts to a local vLLM model and overflow long prompts to Claude or GPT using an alias route.
  • You can apply token rate limits, project permissions, guardrails and ClickHouse request logs uniformly across local and cloud calls.
  • Media endpoints (OpenAI Images, Audio and Videos APIs) can also be enabled on custom providers that expose them.

Why strict translation matters across providers

Cross-provider translation fails quietly when a gateway accepts a request field, such as a tool-choice mode, a structured output constraint or a reasoning option, and silently strips it before calling the upstream provider. Your app gets HTTP 200 back, but the model did not follow the constraint you thought you sent.

Kaeso decodes every inbound request into KPP (the Kaeso Provider Protocol, open-sourced as kaeso-kpp and kaeso-codecs on crates.io) and validates it against the target model's capabilities before calling the provider. When a target provider cannot honour a required parameter, Kaeso refuses the request with a clear error naming the field. When a minor adaptation is safe and documented, Kaeso marks the response with kaeso-adapted or kaeso-left-out headers so nothing happens silently.

For reasoning models used inside stateless tool loops across formats, Kaeso encrypts the model's reasoning state under your master key in Valkey and restores it automatically on the next turn.

Browse all 50 built-in providers and their wire formats on /providers, or follow all eight checks on /gateway.

Product names in this article belong to their owners and are used only to name the software and services involved. Kaeso is not affiliated with or endorsed by them.

By Kaeso Team

On this page

Own the gateway.Own the record.

curl -fsSLhttps://kaeso.app/install.sh | sh