General Introduction
simple-one-api is an open source project designed to simplify the integration of multiple big model APIs. It supports models compatible with OpenAI interfaces such as Thousand Sails Big Model Platform, Xunfei Starfire Big Model, Tencent Mixed Element, as well as MiniMax and Deep-Seek. The project only requires an executable file , simple configuration , users can deploy a key , out-of-the-box , very suitable for developers who need to quickly integrate a variety of big model API developers .
Function List
- Supports API integration for multiple large modeling platforms
- Compatible with the OpenAI interface
- Single executable to simplify deployment
- Easy to configure and user friendly
- One-click deployment, quick start
Using Help
Installation process
- interviews simple-one-api GitHub pageThe
- Download the latest executable.
- Place the executable in your working directory.
Procedure for use
- configuration file: Create a configuration file in the working directory (e.g.
config.json
), and fill in the relevant API keys and configuration parameters as needed. A sample configuration file is shown below:{ "openai_api_key": "your_openai_api_key", "qianfan_api_key": "your_qianfan_api_key", "xunfei_api_key": "your_xunfei_api_key", "tencent_api_key": "your_tencent_api_key", "minimax_api_key": "your_minimax_api_key", "deepseek_api_key": "your_deepseek_api_key" }
- running program: Run the executable from the command line:
. /simple-one-api
- invoke an API: Once the program is launched, you can call the integrated major model APIs via HTTP requests. e.g., call the OpenAI interface:
curl -X POST http://localhost:8000/openai -d '{"prompt": "Hello, world!"}'
- View Log: The program outputs a runtime log on the console to help you understand API calls and error messages.
Detailed Operation Procedure
- Configuration file details::
openai_api_key
: Fill in your OpenAI API key.qianfan_api_key
: Fill in your Chifan Big Model Platform API key.xunfei_api_key
: Fill in your CyberLink Starfire Big Model API key.tencent_api_key
: Fill in your Tencent Hybrid API key.minimax_api_key
: Fill in your MiniMax API key.deepseek_api_key
: Fill in your Deep-Seek API key.
- API Call Example::
- OpenAI Interface::
curl -X POST http://localhost:8000/openai -d '{"prompt": "Hello, world!"}'
- Chifan Large Model Interface::
curl -X POST http://localhost:8000/qianfan -d '{"prompt": "Hello, world!"}'
- Cyberdyne Starfire Interface::
curl -X POST http://localhost:8000/xunfei -d '{"prompt": "Hello, world!"}'
- Tencent hybrid interface::
curl -X POST http://localhost:8000/tencent -d '{"prompt": "Hello, world!"}'
- MiniMax Interface::
curl -X POST http://localhost:8000/minimax -d '{"prompt": "Hello, world!"}'
- Deep-Seek Interface::
curl -X POST http://localhost:8000/deepseek -d '{"prompt": "Hello, world!"}'
- OpenAI Interface::
- error handling::
- If you encounter an API call failure, check that the API key in the configuration file is correct.
- Check the console log for detailed error messages.