---
title: "One API for OpenAI, Anthropic, Gemini and local models"
description: "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."
url: https://kaeso.app/articles/one-api-for-openai-anthropic-gemini-and-local-models
markdown: https://kaeso.app/articles/one-api-for-openai-anthropic-gemini-and-local-models.md
language: en
alternates:
  de: https://kaeso.app/de/articles/one-api-for-openai-anthropic-gemini-and-local-models.md
  zh-CN: https://kaeso.app/zh-CN/articles/one-api-for-openai-anthropic-gemini-and-local-models.md
published: 2026-11-23
authors:
  - Kaeso Team
tags:
  - guide
  - providers
  - local-models
  - api
  - comparison
image: https://kaeso.app/articles/one-api-for-openai-anthropic-gemini-and-local-models/cover.jpg
index: https://kaeso.app/llms.txt
---

# 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.

> Every page, article and docs page of Kaeso is listed in https://kaeso.app/llms.txt.

- Published: 23 November 2026
- Reading time: 3 min
- Author: Kaeso Team

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

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

See the full feature and benchmark matrix on [/compare](https://kaeso.app/compare) and [/benchmarks](https://kaeso.app/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

```python
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

```ts
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

```python
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](https://kaeso.app/articles/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:

```yaml
services:
  gateway:
    environment:
      KAESO_CUSTOM_PROVIDERS_ALLOWED_NETWORKS: 10.0.0.0/8,192.168.0.0/16
```

2. 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**.
3. 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](https://kaeso.app/articles/alias-routes).
- 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](https://kaeso.app/providers), or follow all eight checks on [/gateway](https://kaeso.app/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

## More articles

- [A self-hosted alternative to OpenRouter](https://kaeso.app/articles/self-hosted-openrouter-alternative.md): When to move from OpenRouter to a self-hosted AI gateway, how Kaeso compares with OpenRouter, LiteLLM, Bifrost and Portkey, and how to keep OpenRouter as a fallback provider.
- [Self-hosted LLM gateways compared: limits, fallbacks and logs](https://kaeso.app/articles/comparing-self-hosted-llm-gateways.md): How Kaeso, LiteLLM, Bifrost, Portkey and Helicone compare on spend limits, model fallbacks, provider key pools and request logging, with the measured throughput cost of logging.

[See all articles](https://kaeso.app/articles.md)

## Own the gateway. Own the record

```bash
curl -fsSL https://kaeso.app/install.sh | sh
```

[Install Kaeso](https://docs.kaeso.app/self-hosting/installation) · [Open the live demo](https://demo.kaeso.app)
