---
title: "Gemini apps through Kaeso, with Claude and GPT behind them"
description: "Apps written for the Gemini API, with the google-genai SDKs or plain REST calls, now use Kaeso as their base URL under /v1beta and reach any model in the project. How to switch an app, what works, and what Kaeso translates on the way."
url: https://kaeso.app/articles/gemini-apps-through-kaeso
markdown: https://kaeso.app/articles/gemini-apps-through-kaeso.md
language: en
alternates:
  de: https://kaeso.app/de/articles/gemini-apps-through-kaeso.md
  zh-CN: https://kaeso.app/zh-CN/articles/gemini-apps-through-kaeso.md
published: 2026-11-11
authors:
  - Kaeso Team
tags:
  - gateway
  - gemini
  - sdk
  - guide
image: https://kaeso.app/articles/gemini-apps-through-kaeso/cover.jpg
index: https://kaeso.app/llms.txt
---

# Gemini apps through Kaeso, with Claude and GPT behind them

Apps written for the Gemini API, with the google-genai SDKs or plain REST calls, now use Kaeso as their base URL under /v1beta and reach any model in the project. How to switch an app, what works, and what Kaeso translates on the way.

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

- Published: 11 November 2026
- Reading time: 2 min
- Author: Kaeso Team

Kaeso has always spoken the formats apps are written in: OpenAI's Chat Completions and Responses, and Anthropic's Messages. With 0.6.0 it speaks Gemini's too. An app written with Google's `google-genai` SDKs, or with plain Gemini REST calls, uses Kaeso as its base URL and reaches every model in the project, from Gemini to Claude and GPT.

## Switch an app in two lines

Give the client a Kaeso key and Kaeso's address. The SDK adds `/v1beta` on its own:

```python
import os
from google import genai

client = genai.Client(
    api_key=os.environ["KAESO_API_KEY"],
    http_options={"base_url": "https://kaeso.example.com"},
)

response = client.models.generate_content(
    model="claude-haiku-5-5",
    contents="Write a haiku about gateways.",
)
print(response.text)
```

In TypeScript, with `@google/genai`:

```ts
import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({
  apiKey: process.env.KAESO_API_KEY,
  httpOptions: { baseUrl: "https://kaeso.example.com" },
});

const response = await ai.models.generateContent({
  model: "claude-haiku-5-5",
  contents: "Write a haiku about gateways.",
});
console.log(response.text);
```

The model is any model of the project's catalogue, or an alias. The SDK sends the key in `x-goog-api-key`, which Kaeso accepts like `Authorization: Bearer`.

## What works

| Call | Path |
| --- | --- |
| Generate | `POST /v1beta/models/{model}:generateContent` |
| Stream | `POST /v1beta/models/{model}:streamGenerateContent?alt=sse` |
| Count tokens | `POST /v1beta/models/{model}:countTokens` |
| Embed | `POST /v1beta/models/{model}:embedContent`, `:batchEmbedContents` |
| List models | `GET /v1beta/models`, `GET /v1beta/models/{model}` |

Streams, thinking, tool calls, token counts, embeddings and model listings all work. Every error under `/v1beta` comes back in the Gemini format, so the SDK's own error handling keeps working. Other Gemini methods, such as `batchGenerateContent`, files or cached contents, get 404 rather than a half-working answer.

`GET /v1beta/models` lists the models the key may call, named `models/<name>` as the Gemini API names them, followed by the project's aliases that point at them, in pages of 50 with `pageToken`.

## What Kaeso translates on the way

When a Gemini app calls Claude or GPT, Kaeso translates the request into that model's format and the answer back into Gemini's. A few details matter in practice:

- **Reasoning across tool calls.** The Gemini format has no field for another provider's reasoning. Kaeso keeps the model's reasoning before each tool call and adds it back on the app's next turn, so an agent loop doesn't lose its thread.
- **Thought signatures.** When a Gemini app calls a Gemini model, its thought signatures go back and forth unchanged. Kaeso calls Gemini models in their own format, so signatures survive tool loops in every app format, not only Gemini's.
- **Keepalives.** After 15 seconds without output, Kaeso writes a keepalive. In the Gemini format that is a blank line, because `google-genai` reads every other line of a stream as JSON.
- **Media.** Images that Gemini models make reach Gemini apps, and Gemini apps get audio replies from Chat Completions models.
- **What can't be translated is named.** When a model has no equivalent for a field, Kaeso leaves it out and names it in the `kaeso-left-out` header, or adapts it and names it in `kaeso-adapted`. Nothing disappears silently.

## Use it with your own proxy

Installs from the installer and the platform templates route `/v1beta/` already. If Kaeso runs behind a reverse proxy of your own, route `/v1beta/` to the gateway, next to `/v1/`. Kaeso streams Gemini replies only as server-sent events, so a stream without `alt=sse` gets 400; the SDKs always send it.

## Google's own models, too

Two of the thirteen providers 0.6.0 built in are Google's: **Google AI Studio**, with an API key, and **Gemini Enterprise Agent Platform**, with an express mode API key or a service account key, which also reaches its Claude, partner and open models. Add either as a provider, and its models answer apps in every format, OpenAI's and Anthropic's included.

## Next steps

- [The model API](https://docs.kaeso.app/api/model-api) in the docs lists every endpoint and header.
- [Calling models](https://docs.kaeso.app/get-started/calling-models) shows streaming with each SDK.
- [Kaeso 0.6](https://kaeso.app/articles/kaeso-0-6) has everything else the release added.

By Kaeso Team

## More articles

- [Images, speech and video through the same gateway as chat](https://kaeso.app/articles/media-through-one-gateway.md): With Kaeso 0.6.0, apps make images, speech, transcripts, video, music and sound effects through the OpenAI and ElevenLabs SDKs they already use, with Kaeso's keys, limits, logs and costs. What works, on which providers, and how it looks in code.
- [Fallbacks, conditions and splits with alias routes](https://kaeso.app/articles/alias-routes.md): In Kaeso 0.6.0 an alias holds a route. Fall back to another model when one fails, send enterprise traffic or long prompts somewhere else, and A/B test two models by caller, all without changing a line in your app.

[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)
