Connect Grok models to Codex and Claude Code via a multi-account gateway
You can call Grok's chat, image, and video features without changing the settings of your existing AI coding tools. This Go-based gateway manages authentication and quotas for multiple Grok accounts in one place and converts them into OpenAI and Anthropic API standards. This allows you to use Grok models directly in your current tools without building a separate client.
Isolated account management for three distinct services
Grok Build, Grok Web, and Grok Console have different authentication methods and supported models, but this tool manages each account as an independent pool. Build discovers different models for each account via OAuth, while Web and Console use SSO authentication and a built-in model catalog. It tracks the quota, health status, and concurrent connections for each account individually to ensure that a failure in one account does not affect others. Requests are routed based on the account's status and allocation, and usage and billing records are logged after the request is completed.
Compatibility with existing AI tools
It supports both OpenAI and Anthropic API standards, allowing you to connect Codex, Claude Code, and related SDKs as-is. It supports complex features such as chat, tool calls, reasoning processes, multi-turn sessions, and prompt caching, specifically converting requests to maintain the compatibility required by Codex and Claude Code. It handles image generation and editing, asynchronous video tasks, and speech synthesis and recognition through a single API endpoint. You can set a model allowlist, requests per minute, concurrent connections, spending limits, and expiration dates for client keys.
Output path control and Cloudflare handling
You can finely control which path each account's requests take. It supports various proxy protocols such as HTTP, SOCKS, Trojan, and VLESS, allowing you to assign different proxy pools per account or set fallback strategies. It also supports FlareSolverr integration to bypass Cloudflare blocks, and features a mechanism to detect proxy node status in real time and automatically recover from failures. This is particularly important for reducing the risk of IP blocks when using multiple accounts simultaneously. Hysteria and TUIC are not yet supported, and FlareSolverr only accepts HTTP/SOCKS proxy URLs.
Things to check before use
This project is provided solely for technical research and learning purposes, and you must comply with Grok's official terms of service and local laws. You are responsible for any violations. For Build accounts, if the refresh token is shared with other clients when it is updated, the token may be consumed, so you should authenticate each client independently or transfer credentials only after the previous client has completely terminated. Additionally, you must never change the credential encryption key if stored credentials exist, and you should immediately change the initial administrator password after the first login and remove the bootstrap administrator from the configuration file.