Run a self-hosted proxy that lets OpenAI or Anthropic-style tools talk to Grok instead.
Pool multiple Grok accounts and automatically rotate between them as quota runs out.
Give Claude Code or similar coding agents access to Grok through a familiar API shape.
Track usage, response speed, and account health from a web admin panel.
| hm2899/grokcli-2api | mitchellh/panicwrap | netflix/go-expect | |
|---|---|---|---|
| Stars | 463 | 453 | 473 |
| Language | Go | Go | Go |
| Last pushed | — | 2024-04-05 | 2024-06-15 |
| Maintenance | — | Dormant | Dormant |
| Setup difficulty | hard | easy | moderate |
| Complexity | 4/5 | 2/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Needs Docker Compose with Postgres and Redis running together, plus a Grok account login.
grokcli-2api is a Go program that takes the login session from Grok, the AI chatbot service, and turns it into an API that behaves like the OpenAI API and the Anthropic API. That means tools built to talk to OpenAI or Anthropic, like Claude Code or other coding agents, can talk to Grok instead without changing how they call the API. It ships as a Docker container and comes with a web admin panel for managing everything. The system is built to run on its own, without needing a local Grok command line tool or a browser to log in. It stores its data using PostgreSQL for permanent records and Redis for fast, short lived state, and it can run several worker processes at once. It supports pooling many Grok accounts together and rotating between them using strategies like round robin, least used, or random, and it immediately cools down and removes any account that runs out of quota. It also tries to keep the same conversation sticking to the same account so that prompt caching stays effective, and that stickiness time can be changed while the program is running. The project includes its own registration flow for creating new Grok accounts through email services and automated verification, and it can optionally push newly registered accounts on to other similar proxy tools. It exposes OpenAI style endpoints such as chat completions and responses, and Anthropic style endpoints such as messages, including support for tools and token counting. The admin panel lets an operator manage accounts, API keys, registration, health checks, renewals, task logs, and usage statistics, including how long it takes before the first reply token appears. To get started, a user clones the repository, copies the example environment file, sets an admin password, and runs docker compose. Only the main application port is exposed to the host machine, while the database and cache stay reachable only inside the Docker network. A prebuilt image is also available from GitHub's container registry, though the image name must be typed in all lowercase letters even if the account name uses capital letters. The full README is longer than what was shown.
A Go proxy that turns a Grok login session into an OpenAI and Anthropic compatible API, with multi-account pooling and a web admin panel.
Mainly Go. The stack also includes Go, Docker, PostgreSQL.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.