LLMAPI
OpenAI-compatible API Gateway with Anthropic support and token package sales.
Features
- 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
Installation
pip install x-llmapi
Quick Start
# 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 8080
Configuration
Configure via environment variables:
export SESSION_SECRET="your-secret-key"
export SQL_DSN="sqlite:///one-api.db"
export QUOTA_FOR_NEW_USER=1000000
See llmapi/config.py for all available options.
Development
# Clone the repository
git clone https://github.com/kandada/llmapi.git
cd llmapi
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest
Acknowledgments
This project is inspired by one-api and LiteLLM. Thank you for their excellent work in the open source community.
Author
xiefujin
- Email: 490021684@qq.com
- GitHub: github.com/kandada/llmapi
License
GNU General Public License v3.0
Metadata
Release files for x-llmapi 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| x_llmapi-0.0.2.tar.gz | 769.7 kB | Without provenance | Details for x_llmapi-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| x_llmapi-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for x_llmapi-0.0.2-py3-none-any.whl |
Total release size: 1.5 MB
Release files / x_llmapi-0.0.2.tar.gz
| Download URL | x_llmapi-0.0.2.tar.gz |
|---|---|
| Size | 769.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
635b5897894eeaeb422b635f8b6e66fff3314d31b1b007fff9dff1e1dd441983
|
|
BLAKE2b-256 checksum How to use checksums |
a3af46721899f85668609bee9bddc46151ae6c914d2c1498502803e601469084
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.6
|
Release files / x_llmapi-0.0.2-py3-none-any.whl
| Download URL | x_llmapi-0.0.2-py3-none-any.whl |
|---|---|
| Size | 755.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f6dac9118cf7317442c76a43cdaaefaa7072fcd480afe049381c9e1e5dc65f4
|
|
BLAKE2b-256 checksum How to use checksums |
9bddb57a1aba4135fa6f8b0c84ba5951573331a52972f09f011aea9e60bab67b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.6
|
Security for x-llmapi 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.