All Templates / AI/ML
one-api
Access all LLM through the standard OpenAI API format, easy to deploy & use
one-api
chinpeerapat/one-api
Just deployed
The initial account username is root and password is 123456.
✨ Access all LLM through the standard OpenAI API format, easy to deploy & use ✨
Deployment Tutorial · Usage · Feedback · Screenshots · Live Demo · FAQ · Related Projects · Donate
> Warning: This README is translated by ChatGPT. Please feel free to submit a PR if you find any translation errors.
> Note: The latest image pulled from Docker may be an alpha
release. Specify the version manually if you require stability.
REDIS_CONN_STRING
: When set, Redis will be used as the storage for request rate limiting instead of memory.
REDIS_CONN_STRING=redis://default:redispw@localhost:49153
SESSION_SECRET
: When set, a fixed session key will be used to ensure that cookies of logged-in users are still valid after the system restarts.
SESSION_SECRET=random_string
SQL_DSN
: When set, the specified database will be used instead of SQLite. Please use MySQL version 8.0.
SQL_DSN=root:123456@tcp(localhost:3306)/oneapi
LOG_SQL_DSN
: When set, a separate database will be used for the logs
table; please use MySQL or PostgreSQL.
LOG_SQL_DSN=root:123456@tcp(localhost:3306)/oneapi-logs
FRONTEND_BASE_URL
: When set, the specified frontend address will be used instead of the backend address.
FRONTEND_BASE_URL=https://openai.justsong.cn
SYNC_FREQUENCY
: When set, the system will periodically sync configurations from the database, with the unit in seconds. If not set, no sync will happen.
SYNC_FREQUENCY=60
NODE_TYPE
: When set, specifies the node type. Valid values are master
and slave
. If not set, it defaults to master
.
NODE_TYPE=slave
CHANNEL_UPDATE_FREQUENCY
: When set, it periodically updates the channel balances, with the unit in minutes. If not set, no update will happen.
CHANNEL_UPDATE_FREQUENCY=1440
CHANNEL_TEST_FREQUENCY
: When set, it periodically tests the channels, with the unit in minutes. If not set, no test will happen.
CHANNEL_TEST_FREQUENCY=1440
POLLING_INTERVAL
: The time interval (in seconds) between requests when updating channel balances and testing channel availability. Default is no interval.
POLLING_INTERVAL=5
BATCH_UPDATE_ENABLED
: Enabling batch database update aggregation can cause a certain delay in updating user quotas. The optional values are 'true' and 'false', but if not set, it defaults to 'false'.
+Example: BATCH_UPDATE_ENABLED=true
+If you encounter an issue with too many database connections, you can try enabling this option.BATCH_UPDATE_INTERVAL=5
: The time interval for batch updating aggregates, measured in seconds, defaults to '5'.
+Example: BATCH_UPDATE_INTERVAL=5
GLOBAL_API_RATE_LIMIT
: Global API rate limit (excluding relay requests), the maximum number of requests within three minutes per IP, default to 180.GLOBAL_WEL_RATE_LIMIT
: Global web speed limit, the maximum number of requests within three minutes per IP, default to 60.TIKTOKEN_CACHE_DIR
: By default, when the program starts, it will download the encoding of some common word elements online, such as' gpt-3.5 turbo '. In some unstable network environments or offline situations, it may cause startup problems. This directory can be configured to cache data and can be migrated to an offline environment.
+DATA_GYM_CACHE_DIR
: Currently, this configuration has the same function as' TIKTOKEN-CACHE-DIR ', but its priority is not as high as it.RELAY_TIMEOUT
: Relay timeout setting, measured in seconds, with no default timeout time set.RELAY_PROXY
: After setting up, use this proxy to request APIs.USER_CONTENT_REQUEST_TIMEOUT
: The timeout period for users to upload and download content, measured in seconds.USER_CONTENT_REQUEST_PROXY
: After setting up, use this agent to request content uploaded by users, such as images.SQLITE_BUSY_TIMEOUT
: SQLite lock wait timeout setting, measured in milliseconds, default to '3000'.GEMINI_SAFETY_SETTING
: Gemini's security settings are set to 'BLOCK-NONE' by default.GEMINI_VERSION
: The Gemini version used by the One API, which defaults to 'v1'.THE
: The system's theme setting, default to 'default', specific optional values refer to [here] (./web/README. md).ENABLE_METRIC
: Whether to disable channels based on request success rate, default not enabled, optional values are 'true' and 'false'.METRIC_QUEUE_SIZE
: Request success rate statistics queue size, default to '10'.METRIC_SUCCESS_RATE_THRESHOLD
: Request success rate threshold, default to '0.8'.INITIAL_ROOT_TOKEN
: If this value is set, a root user token with the value of the environment variable will be automatically created when the system starts for the first time.INITIAL_ROOT_ACCESS_TOKEN
: If this value is set, a system management token will be automatically created for the root user with a value of the environment variable when the system starts for the first time.Template Content
one-api
chinpeerapat/one-apiDetails
chin's Projects
Created on May 7, 2025
0 total projects
JavaScript, Go, SCSS, CSS, HTML, Shell, Dockerfile
AI/ML
More templates in this category
openui
Deploy OpenUI: AI-powered UI generation with GitHub OAuth and OpenAI API.
zexd's Projects