Discover and explore top open-source AI tools and projects—updated daily.
chenymeFastAPI-based API for multimodal AI interactions
Top 72.8% on SourcePulse
This project provides a FastAPI-based API gateway for Grok, enabling advanced features like streaming conversations, image generation and editing, web search, video generation, and deep thinking. It targets developers seeking to integrate Grok's capabilities into their applications, offering a unified interface, efficient concurrency management, and automatic load balancing, thereby simplifying access to Grok's functionalities.
How It Works
The API is built using FastAPI, adhering to the latest web call formats and offering full compatibility with OpenAI's API structure. It supports streaming dialogues, image generation/editing, web search, and video generation. A key design element is its "number pool" system for concurrent calls and automatic load balancing across managed accounts. To circumvent Grok's 403 restrictions on direct media links, the system automatically caches images and videos locally, requiring a correctly configured base_url for proper display.
Quick Start & Requirements
Deployment is primarily handled via Docker Compose using the ghcr.io/chenyme/grok2api:latest image. Key environment variables include STORAGE_MODE (options: file, mysql, redis) and DATABASE_URL (required for MySQL or Redis storage). Users can access a management interface at /login and /manage for configuration and monitoring.
Highlighted Details
/v1/chat/completions and /v1/models, facilitating easy integration with existing tools and libraries.grok-3-fast, grok-4-fast, grok-4-expert, grok-4-heavy, grok-imagine-0.9), each with distinct capabilities and associated costs.Maintenance & Community
The project acknowledges inspiration from LINUX DO, VeroFess/grok2api, and xLmiler/grok2api_python. No specific community channels (like Discord or Slack) or active maintainer information are provided in the README.
Licensing & Compatibility
The project is explicitly stated to be for "learning and research only," implying it may not be suitable for commercial use without further clarification or a formal license agreement. Compatibility is high for OpenAI API clients.
Limitations & Caveats
The project is intended strictly for learning and research purposes. Grok's direct image and video links are prone to 403 errors, necessitating the use of the built-in caching mechanism. A specific x_statsig_id is required for anti-bot measures, with a default value provided for broad compatibility. Quotas for "Super" accounts remain undetermined.
1 week ago
Inactive
open-webui