A secure and efficient API key management system that helps developers and teams easily manage API keys for various AI models.
The API Key Manager aims to provide AI developers and enterprises with a one-stop solution for API key management. In today's diverse AI service environment, managing API keys from multiple providers is both cumbersome and poses security risks. This system helps users efficiently organize and utilize various service keys through secure encrypted storage, status monitoring, and convenient management features, reducing the risk of leakage and improving development efficiency. The system employs local storage technology, ensuring your sensitive key information is not uploaded to the cloud, further enhancing data security and privacy protection. Whether you are an individual developer or an enterprise user, the API Key Manager can meet your API key management needs. Of course, not only can it manage AI-related keys, but other related keys can also be uniformly managed using this manager.
For example, when using the dify project, you need to fill in multiple API keys for large AI models, which can be a headache. This is also one of the starting points of this project.
- 🔑 API Key Management: Securely store and manage API keys from multiple AI service providers
- 🔒 Security Encryption: Protect your API keys with advanced encryption technology
- ⚡ Status Monitoring: Monitor API key connection status in real time
- 🌐 Multi-language Support: Switch between Chinese and English interfaces
- ⚙️ Custom Settings: Customize system settings and preferences according to your needs
- 🔄 Connection Testing: Test API connections directly from the dashboard
- 📊 Usage Monitoring: Monitor API key usage and token consumption (Coming soon)
Visit our demo site to experience the application.
API Key Management Page: Key Overview
Adding Keys: Basic Key + Composite Key
Dashboard: Monitor Connection Status
System Settings: Password Changes and Other Operations
Default login credentials:
- Username:
admin
- Password:
password
After logging in, it is recommended to change the password and remember it for long-term use.
Deploying the NanMeng API Key Manager with Vercel is the simplest method:
- Fork this repository to your GitHub account
- Sign up or log in to Vercel
- Click "New Project" and import your forked repository
- Configure the following environment variables:
ENCRYPTION_KEY
: A secure random string for encrypting API keysALLOW_REGISTRATION
: Set to "true" or "false" to enable/disable user registration (registration feature has been deprecated)
- Click "Deploy"
- Node.js 18.x or higher
- npm or yarn
- Git
- Clone the repository:
git clone https://github.com/randomAndre/api-key-manager.git
cd api-key-manager
- Install Dependencies
npm install
# or
yarn install
- Environment Setup
Create a .env.local
file in the root directory with the following variables:
ENCRYPTION_KEY=your-secure-random-string
- Development Mode
To run the application in development mode:
npm run dev
# or
yarn dev
The application will be available at http://localhost:3000
.
- Production Build
To create a production build:
npm run build
npm start
# or
yarn build
yarn start
You can also deploy using Docker:
# Build the Docker image
docker build -t nanmeng-api-key-manager .
# Run the container
docker run -p 3000:3000 -e ENCRYPTION_KEY=your-secure-key -e ALLOW_REGISTRATION=false nanmeng-api-key-manager
-
Access the application using the default credentials:
- 用户名:
admin
- 密码:
password
- 用户名:
-
After logging in, go to the Settings page and change the default password.
-
Navigate to the "API Keys" section from the dashboard.
-
Click "Add Key" to add a new API key.
-
Fill in the required information:
- Name: Descriptive name for the key
- Provider: Service provider (e.g., OpenAI, Anthropic)
- Key Type: Simple API key or Composite key
- API Key: Your actual API key Additional fields for Composite key (AppID, Secret Key)
- Base URL: API endpoint URL (default values for known providers)
- Billing URL: Link to the provider's billing page (recommended)
-
To test a key's connection, use the "Test" button on the dashboard.
Note: Not only AI keys, but all related keys can be configured and stored.
- Change the default admin password immediately after first login.
- Use a strong, unique
ENCRYPTION_KEY
for production deployments. - If self-hosting, ensure your server has HTTPS enabled.
- Regularly backup your data.
- Regularly rotate your API keys to minimize risk.
- Store sensitive information such as API keys and encryption keys in environment variables.
Variable | Description | Default |
---|---|---|
ENCRYPTION_KEY |
Key used for encrypting API keys | Required |
The application supports English and Chinese. Users can switch languages using the language selector in the interface.
We welcome contributions from the community! To contribute, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit them (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.