Skip to content

Repository files navigation

Auth2API

Auth2API

A CLI with a local browser control panel that turns ChatGPT into an OpenAI-compatible API.
Sign in with your account, get http://127.0.0.1:8787/v1. Tokens come out of the subscription, not an API-key bill.

Download · Docs · 中文

version platform license


Auth2API is one CLI binary with an embedded local control panel. It also runs headlessly on servers and in scripts.

Install

Homebrew (macOS, recommended)

brew install CatVinci-Studio/tap/auth2api

Or tap CatVinci Studio first:

brew tap CatVinci-Studio/tap
brew install auth2api

The formula will be added to CatVinci-Studio/homebrew-tap after the first CLI-only release is published.

GitHub Releases

Download the archive for your platform from Releases:

Platform Archive
macOS Apple Silicon auth2api-macos-arm64.tar.gz
macOS Intel auth2api-macos-x64.tar.gz
Windows x64 auth2api-windows-x64.zip
Linux x64 auth2api-linux-x64.tar.gz

Extract auth2api (auth2api.exe on Windows) into a directory in PATH. A .sha256 checksum is attached beside every archive.

Build from source

cargo install --git https://github.com/CatVinci-Studio/Auth2API auth2api-cli

Use

Run it with no arguments to open the local control panel. Sign-in, server controls, API keys, settings, and usage all live in the browser:

auth2api                 # http://127.0.0.1:8790
auth2api web --no-open   # print the URL without opening a browser

The headless commands remain available for servers and scripts:

auth2api login
auth2api keys new zed
auth2api serve           # http://127.0.0.1:8787/v1

Then point anything OpenAI-compatible at it:

export OPENAI_BASE_URL=http://127.0.0.1:8787/v1
export OPENAI_API_KEY=sk-a2a-...

License

MIT.

About

Sign in with a ChatGPT account and serve it as a local OpenAI-compatible API

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages