whatisgithub

What is chrome2api?

xszwow/chrome2api — explained in plain English

Analysis updated 2026-06-24

14C++Audience · developerComplexity · 4/5LicenseSetup · hard

In one sentence

Wraps Chrome's built-in Gemini Nano AI model behind an OpenAI-compatible local HTTP API so any OpenAI-ready tool can use on-device AI without an internet connection.

Mindmap

mindmap
  root((chrome2api))
    What it does
      Local AI API server
      OpenAI-compatible endpoint
      No internet needed
    How it works
      HTTP server on localhost
      C++ runner program
      Chrome Gemini Nano runtime
    Supported inputs
      Text prompts
      Multi-turn chat
      Image files
      Audio files
    Limitations
      Windows only
      Experimental
      Requires Chrome install
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Point any OpenAI-compatible tool at a local server to run AI inference entirely on your Windows machine without sending data to the cloud

USE CASE 2

Add offline AI responses to a personal app by swapping the OpenAI API endpoint for this local server

USE CASE 3

Test multi-turn conversations and image prompts against Chrome's on-device Gemini Nano model for free

What is it built with?

C++HTTPOpenAI APIGemini NanoWindows

How does it compare?

xszwow/chrome2api6x-u/enrinanimeali-pahlevani/2d_scan_merger_ros2
Stars141414
LanguageC++C++C++
Setup difficultyhardhardhard
Complexity4/54/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1day+

Windows only, requires compiling C++ source and manually sourcing Chrome runtime libraries and Gemini Nano model files from a local Chrome installation.

MIT license for this project's own code, use freely for any purpose including commercial, keep the copyright notice. Chrome runtime files remain under Google's terms.

So what is it?

Chrome2api is a wrapper that lets you use the AI model built into Google Chrome as if it were a standard AI API. Google Chrome ships with a small on-device language model called Gemini Nano that runs entirely on your local computer, no internet connection required. This project exposes that model through an interface that matches the format used by OpenAI's API, which means any tool or application that already knows how to talk to a standard AI API can be pointed at this local server instead. The way it works: a local HTTP server runs on your machine and listens for requests in the OpenAI format. When a request arrives, it passes the prompt to a small runner program that talks directly to Chrome's internal AI runtime. The AI processes the prompt and sends the response back through the same chain. The whole thing stays on your machine, using Chrome's model weights and GPU drivers that are already installed on your system. An important detail is that the project does not include the actual AI model files or Chrome's proprietary runtime libraries. You must source those yourself from a local Chrome installation. The README explains exactly where to find them on a Windows machine and where to place them in the project folder. The runner program itself is open-source and needs to be compiled from the included C++ source code. The project currently runs on Windows only. It supports text prompts, multi-turn conversations, image inputs (from local file paths), and one audio file at a time. It handles both standard and streaming response formats. The README is clear that this is experimental and does not replicate all the features or permissions handling that Chrome's official browser-based AI API offers. The project is released under the MIT license for its own code. The Chrome runtime files and model weights remain under Google's terms and are not redistributed here.

Copy-paste prompts

Prompt 1
I have chrome2api cloned on Windows. Walk me through compiling the C++ runner, finding the Chrome runtime files, and starting the local server so I can send my first OpenAI-format request.
Prompt 2
How do I send an image to chrome2api for analysis? Show me the exact HTTP request format using curl or Python requests.
Prompt 3
I want to use chrome2api as the backend for a Python script that currently calls the OpenAI API. How do I change the base URL and API key settings so it hits my local chrome2api server instead?
Prompt 4
Does chrome2api support streaming responses in the OpenAI format? Show me how to make a streaming chat request to it.

Frequently asked questions

What is chrome2api?

Wraps Chrome's built-in Gemini Nano AI model behind an OpenAI-compatible local HTTP API so any OpenAI-ready tool can use on-device AI without an internet connection.

What language is chrome2api written in?

Mainly C++. The stack also includes C++, HTTP, OpenAI API.

What license does chrome2api use?

MIT license for this project's own code, use freely for any purpose including commercial, keep the copyright notice. Chrome runtime files remain under Google's terms.

How hard is chrome2api to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is chrome2api for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.