OpenAI-compatible API Gateway with Anthropic support and token package sales.
- OpenAI Compatible: Fully compatible with OpenAI API format
- Anthropic Support: Native support for Anthropic API
- Multi-Channel Management: Support for multiple AI providers (DeepSeek, Moonshot, MiniMax, Claude, Gemini, etc.)
- Token Package Sales: Built-in shop system for selling token packages
- User Management: Complete user and quota management system
- Usage Logging: Detailed API usage logs and statistics
- OAuth Support: GitHub, Lark, OIDC authentication
pip install x-llmapi# Start the server
llmapi run
# Or with uvicorn directly
uvicorn llmapi.main:app --host 0.0.0.0 --port 3000
# Run with custom port
llmapi run -p 8080Configure via environment variables:
export SESSION_SECRET="your-secret-key"
export SQL_DSN="sqlite:///one-api.db"
export QUOTA_FOR_NEW_USER=1000000See llmapi/config.py for all available options.
# Clone the repository
git clone https://github.com/kandada/llmapi.git
cd llmapi
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytestThis project is inspired by one-api and LiteLLM. Thank you for their excellent work in the open source community.
xiefujin
- Email: 490021684@qq.com
- GitHub: github.com/kandada/llmapi
GNU General Public License v3.0