Rfym21/Qwen2API
让 QwenLM 物尽其用
What it solves
Qwen-Proxy (Qwen2API) provides a bridge that converts the web-based interfaces of chat.qwen.ai and Qwen Code / Qwen Cli into OpenAI-compatible and Anthropic-compatible APIs. This allows users to use Qwen models within any third-party client that supports these standard API formats (such as ChatGPT-Next-Web or LobeChat) without needing a native API key from the provider.
How it works
The project acts as a proxy server that intercepts requests and translates them into the format required by Qwen's web services. It includes several advanced features to ensure stability and compatibility:
- API Translation: Converts OpenAI and Anthropic Messages API requests into Qwen web requests.
- Function Calling: Simulates OpenAI-style
toolsand Anthropictool_usethrough prompt injection and a streaming state machine, allowing the AI to interact with external tools. - Account Management: Supports multi-account rotation to increase availability and avoid IP-based bans via per-account proxy settings.
- Multimodal Support: Handles image recognition, video understanding, and image/video generation.
- Context Management: Automatically offloads large agent contexts to Qwen's file interface to bypass WAF limits.
Who it’s for
- Developers who want to integrate Qwen models into existing AI agents or LLM applications that expect OpenAI/Anthropic API standards.
- Power users who prefer using specialized AI clients (like Claude Code or Cline) with Qwen models.
- Self-hosters looking to deploy a private API gateway for Qwen web services.
Highlights
- Broad Compatibility: Supports both OpenAI and Anthropic Messages API formats.
- Advanced Tooling: Implements full Function Calling support with streaming arguments and strict validation.
- Account Rotation: Prevents bans by allowing different outbound proxies for each account.
- Comprehensive Modality: Supports text, images, and video (generation and understanding).
- Management Interface: Includes a Web UI for easy configuration and monitoring.
- Flexible Deployment: Deployable via Docker, PM2, Vercel, or Hugging Face Spaces.
Related
- Project
- Project
- Project
- Project
- Project