What this step is
Your server already runs CLIProxyAPI: it turns your own AI accounts (such as ChatGPT or Claude) into a standard API for all kinds of AI tools. It starts empty; this step adds your accounts.
This step is optional. If you only want the line, skip ahead to step 7.
1. Log in to the management center
Open the login-info file and find the “CLIProxyAPI” section:
| Item in the file | Used for |
|---|---|
| Management center | The admin page to open in a browser |
| Management center login key | Logging in to the admin page |
| API address (Base URL) | The API address you give AI tools |
| API Key | The key you give AI tools |
- Open the “management center” address in a browser.
- Paste the “management center login key” into the management key field and connect.
Details: Log in to the CLIProxyAPI management center.
2. Add your AI account
Two ways, depending on what you have:
- Log in with your account (OAuth): you have a subscription such as ChatGPT (Codex) or Claude. Go to the OAuth login section, choose the service, and log in and authorize in the browser as prompted. A new entry then appears under auth files.
- Enter an API key: you have an API key from an AI service. Go to AI providers, add the service and paste the key.
3. Check the API works
Run this in the terminal (with your own API address and API key):
curl -s https://your-IP:8318/v1/models -H "Authorization: Bearer your-API-Key"4. Connect AI tools
Most AI tools support an “OpenAI-compatible API” and need just two things:
- API address / Base URL: the “API address (Base URL)” from the login-info file, like
https://your-IP:8318/v1; - API Key: the “API Key” from the login-info file.
Exact settings for Cherry Studio, Claude Code, Codex and more: Connect your AI API to tools.
It updates itself
CLIProxyAPI checks for new versions every 30 minutes and only switches at an idle moment — about one second, without interrupting a response in progress. If an update fails it rolls back automatically. Nothing for you to do.
Stuck?
The management center won't open?
Check the address starts with https:// and uses port 8318, and that your network can reach the server (see step 5’s exit IP check first).
The API returns 401?
The API key is wrong, or you used the management center login key as the API key. They’re two different keys.
It connects, but no models are listed, or calls fail?
No account added yet, or the account’s authorization has expired. Check its status under auth files and log in again if needed.
Before moving on, check
✓ All ticked — on to the next step.