logo elektroda
logo elektroda
X
logo elektroda

Gemini Nano with Open WebUI, OpenAI-compatible setup, cloud Gemini API

User question

How to use Gemini Nano with Open WebUI?

Artificial Intelligence Response

Direct answer to the question

You cannot use the real, on-device Gemini Nano with Open WebUI as a normal built-in provider. In practice, Open WebUI is designed to connect to either OpenAI-compatible HTTP APIs or custom Functions, while Gemini Nano is exposed through Android AICore / ML Kit GenAI and Chrome’s Prompt API, not as a standard provider REST endpoint. (docs.openwebui.com)

If your goal is simply to use Gemini inside Open WebUI, the supported method is to connect Google’s cloud Gemini API using the OpenAI-compatible base URL below in Admin Settings → Connections → OpenAI: (docs.openwebui.com)

https://generativelanguage.googleapis.com/v1beta/openai

Important: use that URL without a trailing slash, or model discovery can fail. Open WebUI’s current docs state that Gemini model auto-detection works with this endpoint. (docs.openwebui.com)


Detailed problem analysis

The core issue is an interface mismatch:

  • Open WebUI is protocol-oriented. Its normal provider path is an OpenAI-compatible API connection. If a provider does not speak that protocol, Open WebUI expects you to bridge it using a Function. (docs.openwebui.com)
  • Gemini Nano is not distributed like Ollama models or cloud APIs. Google’s Android documentation shows it running through AICore, with access exposed through ML Kit GenAI APIs. Chrome also exposes Gemini Nano through the Prompt API inside the browser. Neither is presented as a drop-in OpenAI-compatible server for Open WebUI. (developer.android.com)

So the engineering answer is:

  1. If you mean actual Gemini Nano
    There is no documented native “add provider” path in Open WebUI for it. You would need a custom bridge that converts Open WebUI requests into Android AICore calls or Chrome Prompt API calls. That is feasible only as a custom integration, not as a standard checkbox configuration. This is an inference from the published interfaces of both systems. (docs.openwebui.com)

  2. If you mean “Gemini in Open WebUI”
    Then the correct and supported route is Google’s Gemini API via the OpenAI-compatible endpoint. Open WebUI explicitly documents this flow. (docs.openwebui.com)

  3. If you meant “Nano Banana”
    Open WebUI’s community Gemini image guide uses labels like “Nano Banana” for certain Gemini image examples, but that is not the same thing as the actual on-device Gemini Nano runtime. (docs.openwebui.com)

Recommended setup: Gemini cloud models in Open WebUI

  1. Get a Gemini API key from Google AI Studio. (docs.openwebui.com)
  2. In Open WebUI, go to:
    Profile avatar → Admin Settings or Admin Panel → Settings, then Connections → OpenAI → Add Connection. (docs.openwebui.com)
  3. Enter:
URL: https://generativelanguage.googleapis.com/v1beta/openai
API Key: <your Gemini API key>
  1. Leave model IDs empty unless you want to filter them. Open WebUI documents that Google Gemini supports /models auto-detection. (docs.openwebui.com)
  2. Save the connection, then pick a Gemini model from the model selector. Open WebUI’s Gemini page says the models should appear there after the connection is added. (docs.openwebui.com)

Sanity test outside Open WebUI

If you want to verify the key first, Google documents OpenAI-compatible chat requests like this: (ai.google.dev)

curl "https://generativelanguage.googleapis.com/v1beta/openai/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GEMINI_API_KEY" \
-d '{
"model": "gemini-3-flash-preview",
"messages": [
{"role": "user", "content": "Hello"}
]
}'

If that works, Open WebUI usually works as well when the same base URL and key are entered correctly. That conclusion is an engineering inference, but it aligns with Open WebUI’s provider model. (ai.google.dev)

If you insist on actual Gemini Nano

Your only realistic path is a custom adapter:

  • For Android: build an app/service that calls AICore / ML Kit GenAI and exposes an internal API. (developer.android.com)
  • For Chrome: build a browser-side or extension-side bridge around the Prompt API. (developer.chrome.com)
  • For Open WebUI: expose that bridge as either:
    • an OpenAI-compatible endpoint, or
    • an Open WebUI Pipe Function. Open WebUI’s docs explicitly say Functions can integrate proprietary APIs or arbitrary Python logic. (docs.openwebui.com)

That path is custom engineering work, not a standard Open WebUI configuration. (docs.openwebui.com)


Current information and trends

As of May 2026, Open WebUI’s official documentation recommends using Gemini via the Google AI API, specifically through the OpenAI-compatible endpoint. It also states that Gemini model auto-detection works and warns that the URL must be entered without a trailing slash. (docs.openwebui.com)

Open WebUI also has a community-contributed Gemini image-generation guide. That guide is explicitly marked as not supported by the Open WebUI team, so treat it as experimental rather than canonical product behavior. (docs.openwebui.com)

Google’s current official docs continue to position Gemini Nano as an on-device runtime for Android and Chrome integrations, while Open WebUI continues to be centered on provider protocols such as OpenAI-compatible APIs and Functions. (developer.android.com)


Supporting explanations and details

A good way to separate the options is this table:

What you want Works with Open WebUI directly? Best method
Real Gemini Nano on-device No, not as a native provider Build a custom bridge / Function
Gemini chat models in Open WebUI Yes Google AI API via OpenAI-compatible endpoint
Gemini image workflows / “Nano Banana” tutorials Partly, but community/experimental Follow the Gemini image guide carefully
Local private Google-family model Yes Use Gemma through Ollama

This table is synthesized from the official Open WebUI and Google documentation. (docs.openwebui.com)

If your real requirement is local/private inference, the practical substitute is usually Gemma via Ollama, not Gemini Nano. Open WebUI has first-class Ollama support, and Google documents Gemma as an open model family. (docs.openwebui.com)


Ethical and legal aspects

There is an important privacy distinction:

  • Gemini Nano on-device processes data locally, which improves privacy and can support offline operation. Google’s Android docs emphasize those properties. (developer.android.com)
  • Gemini via Google AI API sends requests to Google’s cloud. Open WebUI can be self-hosted, but the model inference is still remote when you use the Gemini API. Open WebUI explicitly says you cannot self-host Gemini itself through Open WebUI; you are self-hosting the interface, not the model backend. (docs.openwebui.com)

If you use Functions, Open WebUI warns that they execute arbitrary Python on your server, so you should review code before enabling it. (docs.openwebui.com)

If you use Direct Connections so users can bring their own Gemini API keys, note that this feature is marked experimental, the keys are stored in the browser’s local storage, and the provider must permit browser CORS access. (docs.openwebui.com)


Practical guidelines

My recommendation depends on your objective:

  1. Fastest working solution
    Use Gemini cloud in Open WebUI via:
Admin Settings → Connections → OpenAI → Add Connection
URL: https://generativelanguage.googleapis.com/v1beta/openai

Do not add a trailing slash. (docs.openwebui.com)

  1. Per-user API keys, no server-side key storage
    Enable Direct Connections and let each user add the Gemini endpoint personally. This is experimental and depends on CORS behavior. (docs.openwebui.com)

  2. True local/offline deployment
    Use Ollama + Gemma, because Open WebUI natively supports Ollama and Gemma is available as an open model family. (docs.openwebui.com)

  3. Actual Gemini Nano research/integration project
    Build a custom OpenAI-compatible proxy or Open WebUI Function around Android AICore or Chrome Prompt API access. (docs.openwebui.com)


Possible disclaimers or additional notes

The phrase “Gemini Nano with Open WebUI” is ambiguous. In many community discussions it really means Gemini cloud models or image-model setups with labels like “Nano Banana,” not the true on-device Gemini Nano runtime. (docs.openwebui.com)

Also, Open WebUI’s official Gemini path is for the Google AI API, not for a local Gemini Nano daemon. So if someone tells you “just add Gemini Nano as a provider,” they are almost certainly referring to a cloud Gemini endpoint or a custom proxy, not a native Open WebUI feature. That conclusion is an inference from the documented connection methods. (docs.openwebui.com)


Suggestions for further research

If you want to go deeper, research these three tracks:

  • Google AI API OpenAI-compatibility for the standard Open WebUI integration path. (ai.google.dev)
  • Android AICore / ML Kit GenAI if you specifically need true Gemini Nano on-device. (developer.android.com)
  • Chrome Prompt API if your target platform is the browser rather than Android. (developer.chrome.com)

For Open WebUI-side extensibility, review Functions and Direct Connections. (docs.openwebui.com)


Brief summary

  • Real Gemini Nano: not a native Open WebUI provider. It uses Android/Chrome local APIs, not an OpenAI-style backend. (developer.android.com)
  • Working solution today: connect Google Gemini cloud to Open WebUI using:
https://generativelanguage.googleapis.com/v1beta/openai

with your Gemini API key, no trailing slash. (docs.openwebui.com)

  • If you want local/private: use Gemma via Ollama instead, or build a custom bridge if you truly need Gemini Nano itself. (docs.openwebui.com)

If you want, I can give you a step-by-step setup for your exact case:

  1. Gemini cloud in Open WebUI
  2. Gemma via Ollama
  3. Custom bridge for real Gemini Nano

Ask additional question

Wait...(2min)
Disclaimer: The responses provided by artificial intelligence (language model) may be inaccurate and misleading. Elektroda is not responsible for the accuracy, reliability, or completeness of the presented information. All responses should be verified by the user.