Thanks to JetBrains for providing free open-source development license for this project
🚀 Quick Start
Using Docker Compose (Recommended)
# Clone the project
git clone https://github.com/QuantumNous/new-api.git
cd new-api
# Edit docker-compose.yml configuration
nano docker-compose.yml
# Start the service
docker-compose up -d
Using Docker Commands
# Pull the latest image
docker pull calciumion/new-api:latest
# Using SQLite (default)
docker run --name new-api -d --restart always \
-p 3000:3000 \
-e TZ=Asia/Shanghai \
-v ./data:/data \
calciumion/new-api:latest
# Using MySQL
docker run --name new-api -d --restart always \
-p 3000:3000 \
-e SQL_DSN="root:123456@tcp(localhost:3306)/oneapi" \
-e TZ=Asia/Shanghai \
-v ./data:/data \
calciumion/new-api:latest
💡 Tip:-v ./data:/data will save data in the data folder of the current directory, you can also change it to an absolute path like -v /your/custom/path:/data
🎉 After deployment is complete, visit http://localhost:3000 to start using!
gemini-2.5-pro-thinking-128 - Enable thinking mode with thinking budget of 128 tokens
You can also append -low, -medium, or -high to any Gemini model name to request the corresponding reasoning effort (no extra thinking-budget suffix needed).
# Clone the project
git clone https://github.com/QuantumNous/new-api.git
cd new-api
# Edit configuration
nano docker-compose.yml
# Start service
docker-compose up -d
This is an open-source project developed based on One API (MIT License).
If your organization’s policies do not permit the use of AGPLv3-licensed software, or if you wish to avoid the open-source obligations of AGPLv3, please contact us at: support@quantumnous.com
🌟 Star History
💖 Thank you for using New API
If this project is helpful to you, welcome to give us a ⭐️ Star!
New API
🍥 Next-Generation LLM Gateway and AI Asset Management System
简体中文 | 繁體中文 | English | Français | 日本語
Quick Start • Key Features • Deployment • Documentation • Help
📝 Project Description
🤝 Trusted Partners
No particular order
🙏 Special Thanks
Thanks to JetBrains for providing free open-source development license for this project
🚀 Quick Start
Using Docker Compose (Recommended)
Using Docker Commands
🎉 After deployment is complete, visit
http://localhost:3000to start using!📖 For more deployment methods, please refer to Deployment Guide
📚 Documentation
📖 Official Documentation |
Quick Navigation:
✨ Key Features
🎨 Core Functions
💰 Payment and Billing
🔐 Authorization and Security
🚀 Advanced Features
API Format Support:
Intelligent Routing:
Format Conversion:
Reasoning Effort Support:
View detailed configuration
OpenAI series models:
o3-mini-high- High reasoning efforto3-mini-medium- Medium reasoning efforto3-mini-low- Low reasoning effortgpt-5-high- High reasoning effortgpt-5-medium- Medium reasoning effortgpt-5-low- Low reasoning effortClaude thinking models:
claude-3-7-sonnet-20250219-thinking- Enable thinking modeGoogle Gemini series models:
gemini-2.5-flash-thinking- Enable thinking modegemini-2.5-flash-nothinking- Disable thinking modegemini-2.5-pro-thinking- Enable thinking modegemini-2.5-pro-thinking-128- Enable thinking mode with thinking budget of 128 tokens-low,-medium, or-highto any Gemini model name to request the corresponding reasoning effort (no extra thinking-budget suffix needed).🤖 Model Support
📡 Supported Interfaces
View complete interface list
🚢 Deployment
📋 Deployment Requirements
/datadirectory)⚙️ Environment Variable Configuration
Common environment variable configuration
SESSION_SECRETCRYPTO_SECRETSQL_DSNREDIS_CONN_STRINGSTREAMING_TIMEOUT300STREAM_SCANNER_MAX_BUFFER_MB64MAX_REQUEST_BODY_MB41332AZURE_DEFAULT_API_VERSION2025-04-01-previewERROR_LOG_ENABLEDfalsePYROSCOPE_URLPYROSCOPE_APP_NAMEnew-apiPYROSCOPE_BASIC_AUTH_USERPYROSCOPE_BASIC_AUTH_PASSWORDPYROSCOPE_MUTEX_RATE5PYROSCOPE_BLOCK_RATE5HOSTNAMEnew-api📖 Complete configuration: Environment Variables Documentation
🔧 Deployment Methods
Method 1: Docker Compose (Recommended)
Method 2: Docker Commands
Using SQLite:
Using MySQL:
Method 3: BaoTa Panel
📖 Tutorial with images
⚠️ Multi-machine Deployment Considerations
🔄 Channel Retry and Cache
Retry configuration:
Settings → Operation Settings → General Settings → Failure Retry CountCache configuration:
REDIS_CONN_STRING: Redis cache (recommended)MEMORY_CACHE_ENABLED: Memory cache🔗 Related Projects
Upstream Projects
Supporting Tools
💬 Help Support
📖 Documentation Resources
🤝 Contribution Guide
Welcome all forms of contribution!
📜 License
This project is licensed under the GNU Affero General Public License v3.0 (AGPLv3).
This is an open-source project developed based on One API (MIT License).
If your organization’s policies do not permit the use of AGPLv3-licensed software, or if you wish to avoid the open-source obligations of AGPLv3, please contact us at: support@quantumnous.com
🌟 Star History
💖 Thank you for using New API
If this project is helpful to you, welcome to give us a ⭐️ Star!
Official Documentation • Issue Feedback • Latest Release
Built with ❤️ by QuantumNous