#66th of 6 in AI API backends
genai-api
Hono API on Cloudflare Workers proxying Gemini with bearer auth
- Stars
- 111
- License
- Apache-2.0
- Last commit
- Apr 2026
- Language
- TypeScript
Overview
Hono TypeScript worker exposing POST /completion that forwards OpenAI-style messages (text and data-URL images) to Gemini 2.0 and 2.5 Flash models through Cloudflare AI Gateway, validated with Zod and returned as plain text. Secured by a BEARER_TOKEN secret, with an optional X-API-Key header to pass a provider key per request; deployed with make deploy. Built for Apple Shortcuts; local dev on port 8788.
Who it is for: Developers wanting a small authenticated LLM proxy on Workers
Strengths
- Bearer-token auth and Zod validation on the single endpoint
- Requests route through Cloudflare AI Gateway for caching and logs
- Multimodal input via data-URL images
- Biome lint and Snyk badge
Weaknesses
- Google AI Studio provider only; four Gemini Flash models
- Plain-text responses, no streaming
- No tests mentioned; last commit 2026-04
- Needs a Cloudflare account and AI Gateway id
What it needs
- TypeScript, Gemini 2.5 Flash, 2.5 Flash Lite, 2.0 Flash, 2.0 Flash Lite via Cloudflare AI Gateway, OpenAI SDK client
- Needs Cloudflare account with AI Gateway, Google AI Studio API key
- GitHub template
Also in AI API backends
See all 6| Rank | Project | Score |
|---|---|---|
| 1 | agent-service-toolkitLangGraph agents served by FastAPI with a Streamlit chat client | 70 out of 100 |
| 2 | fastapi-langgraph-agent-production-ready-templateFastAPI service for a LangGraph agent with auth, memory and tracing | 55 out of 100 |
| 3 | full-stack-ai-agent-templateProject generator for FastAPI and Next.js apps with agents and RAG | 55 out of 100 |
| #4 | generative-ai-project-templateuv workspace with FastAPI, NiceGUI, LiteLLM and Promptfoo evals | 51 out of 100 |
| #5 | nodejs-api-boilerplateExpress TypeScript CRUD API template with an LLM module generator | 31 out of 100 |