Status: [UNTESTED] Endpoints found: http://127.0.0.1:8080/v1/chat/completions http://127.0.0.1:8080/v1/chat/completions` Source: https://github.com/SiqYin/google-translate-bridge
English · 简体中文 · 繁體中文 · 日本語
# Google Translate Bridge [![Python](https://img.shields.io/badge/Python-3.8%2B-blue)](https://www.python.org/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow)](LICENSE) A zero-dependency local proxy that wraps **Google Cloud Translation API** into **OpenAI-compatible and Anthropic-compatible endpoints**. Point Immersive Translate — or any AI translation app that only speaks OpenAI / Anthropic format — at this bridge to use your own Google CloudTranslation API and your $300 free-trial credit. > This bridge calls the official Google Cloud Translation API (v2). Usage is billed to your Google Cloud account. The free trial includes a 500,000-character monthly free tier. ## Why a bridge? Google Cloud Translation API is a proprietary REST API (`{q, target}` → `{data:{translations:[...]}}`), not an OpenAI chat format. Apps like Immersive Translate only accept `/v1/chat/completions` or `/v1/messages`. This bridge converts between them. ## Features - **Zero dependencies** — Python standard library only - **OpenAI-compatible** — `GET /v1/models`, `POST /v1/chat/completions` (SSE streaming simulated) - **Anthropic-compatible** — `POST /v1/messages` - **Auto language detection** from the prompt (e.g. "Translate to Japanese") - **HTML tag preservation** via `mimeType: text/html` - **Multi-paragraph `%%` handling** for Immersive Translate - **Usage stats** at `GET /health` (characters translated, estimated cost) ## How it works ``` [Immersive Translate / AI app] → [local bridge] → Google Cloud Translation API v2 →