casbin-gateway
apache/casbin-gateway · Public GitHub repository
See what every AI coding agent on your machine is doing, and whether the API behind it is the one you paid for. Claude Code, Codex, Cursor, Gemini CLI and more: one endpoint for 44 model vendors, A–F API authenticity grading, per-agent permissions, usage and prompt records.
Open the project to try its demo, view the repository, or save it to your collection. Repository and demo actions use RepoShelf’s sign-in flow.

About this project
Author-written excerpt from the project README.
The killer feature: is the API behind that key what it was sold as?
A reseller can sell a frontier model and serve a cheaper one, count a cached prefix as fresh input, or answer in an API it only pretends to speak. None of that shows up in the traffic, so Authenticity asks the upstream directly. Every provider is probed on its own — when it is added, when its endpoint, type or key changes, when it has never been probed, and again whenever its report goes stale — and comes back with a score out of 100 and a grade from A to F, on the Authenticity page and above the agents on the home page. No button to press, and nothing to configure.
The score is only a summary of the test cases behind it, and every one of them is on the page. Half of them ask what the upstream is: whether the model that answers is the one that was asked for — worth half credit off a vendor's own endpoint, where that field is whatever the upstream typed there — which vendor the model says trained it, whether anything was injected in front of the request, whether several identical requests come back from the same model at all, and whether a parameter the API documents (logprobs, n, a stop sequence) is honoured, refused, or accepted with a 200 and quietly…
- Is that API key what it was sold as? A reseller can serve a cheaper model, fake a cache hit, or quietly drop a parameter it claims to support. Authenticity probes every provider on its own and grades it A–F, and grades…
- What every agent did, spent and sent. Every prompt and tool call, the spend read from the agents' own transcripts, and, on Windows, where each agent's own processes upload data, including what never passes through any…
- One place for all of them. Point Claude Code, Codex, Cursor, Gemini CLI and the rest at any of 44 model vendors, fall over to another vendor when one runs out or goes down, say what each may do, and install, upgrade or…
- Is the API behind that key what it was sold as? — a reseller can quietly swap in a cheaper model or fake a cache hit, and none of it shows up in the traffic. Authenticity asks the upstream directly and grades it A–F.
- Switch every agent's provider from one place — change an API key or base URL once, and every agent pointed at Gateway picks it up.
Requirements and intended audience
The killer feature: is the API behind that key what it was sold as?
- Account · Required
Either one downloads the build for this machine, unpacks it into /.local/share/casbin-gateway (%LOCALAPPDATA%\casbin-gateway on Windows), puts a casbin-gateway command on your PATH, starts it, and arranges for it to start again when you log in.
- Account · Required
Gateway then opens in its own window — no sign-in: it serves this machine only and signs the local admin in on sight.
- External API key · Required
Codex is the exception: its ChatGPT sign-in talks to an endpoint no provider stands in for, so a Codex CLI still needs a provider with an API key.
- Paid service · Required
On Providers → New Provider, pick Claude subscription, ChatGPT subscription or GitHub Copilot subscription and sign in once in the browser; Copilot shows a code to type on GitHub's page.
- External API key · Required
The sign-in stays in Gateway, which renews it, and the agents use the provider like any other: Claude Code can spend a ChatGPT plan, and Codex runs on a ChatGPT plan through Gateway with no API key.
Not recorded: self-hosting. Missing information does not mean there are no requirements.
Statements extracted from the author’s documentation · Checked 2026-10-28. Source: https://github.com/apache/casbin-gateway/blob/master/README.md
Recorded maintenance information
Last recorded source update: 2026-10-31. A published release has not been recorded. These dates do not guarantee ongoing maintenance.
- Technologies
- Go
- Licence
- Apache-2.0. Generally permits modification and commercial use, subject to the licence’s notices and conditions.
- Demo check
- A public page loaded on 2026-11-16. This does not test every feature.
Browse related categories
More projects to explore
awesome-selfhosted
awesome-selfhosted/awesome-selfhosted
A list of Free Software network services and web applications which can be hosted on your own servers
awesome-go
avelino/awesome-go
A curated list of awesome Go frameworks, libraries and software
NextChat
ChatGPTNextWeb/NextChat
✨ Zero-config AI chat assistant. No API key needed — sign up and instantly chat with GPT-5, Claude 4, Gemini 2.5, DeepSeek & 100+ top models. Pay-as-you-go saves you more. Available on Web, iOS, macOS, Android, Linux, Windows.
vue-element-admin
PanJiaChen/vue-element-admin
A magical vue admin https://panjiachen.github.io/vue-element-admin