Discover and explore top open-source AI tools and projects—updated daily.
HM2899Grok API proxy for OpenAI and Anthropic compatibility
New!
Top 65.9% on SourcePulse
This project provides a proxy service that translates Grok AI's OIDC authentication into OpenAI and Anthropic compatible API endpoints. It targets developers and power users needing to integrate Grok AI into existing applications or workflows that expect standard API formats, offering benefits like simplified multi-account management and enhanced usability.
How It Works
The system employs a FastAPI backend with a multi-worker architecture, utilizing PostgreSQL for persistent storage of accounts, keys, and settings, and Redis for managing hot states like session stickiness and caching. It intercepts Grok OIDC sessions, converts them into compatible API calls, and manages multiple accounts through various polling strategies (round-robin, least-used, random) with intelligent cooling and load balancing for in-flight requests. Key features include session stickiness, prompt caching, and a web management console for administration.
Quick Start & Requirements
The recommended installation method is via Docker Compose. Clone the repository, copy the .env.example to .env, configure essential environment variables (e.g., GROK2API_ADMIN_PASSWORD, PostgreSQL credentials), and run docker compose up -d --build. Prerequisites include Docker, Docker Compose, and a Grok account. The system requires PostgreSQL and Redis, which are managed internally by Docker Compose.
Highlighted Details
/v1/chat/completions, /v1/models, SSE) and Anthropic (/v1/messages, tools/tool_use) API specifications.Maintenance & Community
The project is maintained by HM2899. Specific details regarding community channels (like Discord/Slack), notable contributors, or sponsorships are not provided in the README snippet.
Licensing & Compatibility
The README indicates a LICENSE file exists within the repository, but the specific license type and its terms are not detailed in the provided text. Compatibility for commercial use is implied, but users must adhere to xAI's service terms for automated registration and account usage.
Limitations & Caveats
The specific license is not detailed, which may pose an adoption risk. Protocol registration relies on external CAPTCHA services or an inline solver, adding complexity. Sensitive credentials can be exported, requiring careful handling. The project's utility is dependent on the availability and terms of Grok AI. Configuration requires understanding Docker Compose networking and environment variables.
6 days ago
Inactive