CLIProxyAPI Integration and One-Click Import
Import relay station accounts to the local CLIProxyAPI management interface with one click, automatically generating OpenAI-compatible provider configurations and avoiding manual configuration file maintenance.
Feature Overview
- Management Interface Docking
- Reads and writes configurations via CLIProxyAPI's Management API (
/openai-compatibility). - Supports appending/updating API Keys on existing providers, or automatically creating new providers.
- Reads and writes configurations via CLIProxyAPI's Management API (
- One-Click Key Import
- Click "Import to CLIProxyAPI" in the key list to write the current site's Base URL and key to CLIProxyAPI.
- Avoid Duplicate Configurations
- Automatically reuses site names and
Base URL. If the same provider is detected, only the key list is updated, and no duplicate entries are created.
- Automatically reuses site names and
Prerequisites
- CLIProxyAPI is deployed or running and compatible, with the management interface enabled:
- Example address:
http://localhost:8317/v0/management - Supports
GET/PUT/PATCH /openai-compatibilityand other interfaces.
- Example address:
- Possess the Management Key for the management interface (for authentication).
- In All API Hub, the following has been completed:
- At least one relay station account added and available keys obtained.
Setup Entry
- Open the plugin → Go to the Settings page.
- Switch to the "CLIProxyAPI" group (
Basic Settings → CLIProxyAPItab). - Fill in the following fields:
- Management Interface Base URL: For example,
http://localhost:8317/v0/management - Management Key: The key used to access the management interface.
- Management Interface Base URL: For example,
- After saving, the configuration will be stored in local preferences for subsequent import operations.
One-Click Import from Key List
- Open the plugin → Go to the Key Management page.
- Find the site key card you want to import to CLIProxyAPI.
- Click the CLIProxyAPI icon button to the right of the key (usually next to the CherryStudio / CC Switch / New API button).
- The plugin will:
- Read CLIProxyAPI configuration (Base URL and management key).
- Generate an OpenAI-compatible address using the site's
Base URL(automatically appends/v1). - Use the site name or Base URL as the provider name.
- Call CLIProxyAPI:
- If a provider with the same name or
base-urlalready exists:- Append the current key to
api-key-entriesafter deduplication.
- Append the current key to
- If it does not exist:
- Create a new provider entry, containing only the current key and basic information.
- If a provider with the same name or
- After the operation is complete, you will see an import result prompt in the upper right corner (success/failure and error reason).
Effect After Importing to CLIProxyAPI
- In CLIProxyAPI's configuration, a new or updated structure similar to this will be added:
name: Derived from the site name (or Base URL).base-url: Uniformly points to the corresponding relay station's/v1OpenAI-compatible interface.api-key-entries: Contains one or moreapi-keyrecords, which can continue to be manually edited in CLIProxyAPI.
- This means:
- Multiple upstream relay station keys can be centrally managed at the CLIProxyAPI layer.
- All API Hub is responsible for synchronizing basic configuration information, and subsequent details can be customized within CLIProxyAPI.
Frequently Asked Questions
- Prompt: CLIProxyAPI is not configured
- Check if the Base URL and management key have been filled in Settings → CLIProxyAPI.
- Ensure that
/openai-compatibilityis not redundantly included; it should be the management interface prefix, e.g.,.../v0/management.
- Returns 401/403 or other HTTP errors
- Confirm that the management key is correct and that the current account has permission to access the management interface.
- Check the CLIProxyAPI backend logs to confirm whether the route and method (GET/PUT/PATCH) are enabled.
- Will repeated imports generate many records?
- No. The plugin will search for existing providers based on
base-urlor name:- If it exists, only
api-key-entrieswill be updated, with deduplication for the same key. - If it does not exist, a new provider will be created.
- If it exists, only
- No. The plugin will search for existing providers based on
Usage Recommendations
- It is recommended to verify the import effect on a small number of test accounts before using it in a production environment.
- It can be used in conjunction with All API Hub's Quick Export feature to synchronize the same batch of upstream sites to various downstream systems such as New API / CLIProxyAPI.