Discover and explore top open-source AI tools and projects—updated daily.
OpenAI-compatible API proxy for diverse AI providers
Top 83.6% on SourcePulse
Summary
This project offers a high-performance, OpenAI-compatible API proxy service built on FastAPI, designed to aggregate multiple AI providers like Z.AI, K2Think, and LongCat. It targets developers and power users seeking a unified interface to access diverse AI models, simplifying integration and management for applications requiring flexible, scalable AI backend solutions.
How It Works
The service functions as an API gateway, routing incoming requests to various upstream AI providers through a multi-provider architecture. It emulates the OpenAI API, enabling seamless integration with existing tools and SDKs. Key technical choices include FastAPI for asynchronous handling, Server-Sent Events (SSE) for efficient streaming responses, and an advanced token pool management system for load balancing, fault tolerance, and dynamic token updates across different AI services.
Quick Start & Requirements
uv sync
or pip install -r requirements.txt
. Run the server via uv run python main.py
or python main.py
.zyphrzero/z-ai2api-python:latest
). Deployment is supported via docker run
or docker-compose
.http://localhost:8080/docs
post-startup.AUTH_TOKEN
, LISTEN_PORT
).Highlighted Details
Maintenance & Community
The project is community-driven, welcoming contributions. Specific community channels (e.g., Discord, Slack) or active maintainer information are not detailed in the README.
Licensing & Compatibility
Limitations & Caveats
The project is strictly limited to learning and research; commercial use is prohibited by the project's disclaimer. It relies on manual extraction of provider-specific tokens via browser developer tools, which can be unstable and require frequent updates. Multi-modal support necessitates specific, non-anonymous Z.AI API tokens. The monitoring API is noted as having only basic functionality and not yet perfected.
5 days ago
Inactive