CLIProxyAPI Tutorial - Enable Claude Code to use the GPT model for free
Today I'm sharing some things suitable for GPT 5.6 Sol reverse proxy. Reverse proxy can be understood as converting the client's model into an API for use. I used to think the official team didn't want users to do reverse proxy, but...
Today I'll share some things that are suitable to do. GPT 5.6 Sol Anti-substitutionThings.
Reverse proxy can be understood as converting the client's model into an API for use.
I used to think that the official Codex team didn't want users to do reverse proxying, but recently Codex staff have been teaching everyone how to do it, so what are we waiting for?Claude Code + GPT 5.6 Sol is now in use.
The tool needed is a tool on GitHub called... CLIProxyAPI The project.
CLIProxyAPI It is a self-hosted system. AI API gateway. It can... Codex、Claude Code、GeminiGrok, Kimi, and other OpenAI Compatible with upstream components, converted to common Open technologies.AI、Anthropic、Gemini API interface.
Project address:https://github.com/router-for-me/CLIProxyAPI
CLIProxyAPI A set of compatible interfaces is provided externally. Many clients can bypass the code modification by simply replacing the Base URL and API Key with their local configurations. CLIProxyAPI。
- Traditional OpenAI The SDK continues to use /v1/chat/completions
- New version of OpenAI The client primarily requests /v1/responses
- Claude The code follows the Anthropic protocol, corresponding to /v1/messages.
- Gemini The SDK and compatible clients use /v1beta/models/*
- Image generation calls /v1/images/generations
- Editing images calls /v1/images/edits
Supports Codex,Claude、Antigravity、Kimi、xAI Waiting for the login process.
Multiple accounts can be configured for the same supplier.
Installation can be done directly with Codex or... Claude Code, just put this directly.Prompt wordsJust send it to them.
Prompt words:
Please help me install and configure CLIProxyAPI on Windows.
Official project address:
https://github.com/router-for-me/CLIProxyAPI
Require:
1. Download only from the project's official GitHub Releases.up to dateVersion;
2. Choose the Windows_amd64 or Windows_arm64 installation package based on your computer's architecture;
3. Install to the CLIProxyAPI folder in the current user's directory;
4. Copy config.example.yaml to config.yaml;
5. Bind the service to 127.0.0.1, using port 8317;
6. Disable remote management and generate a random management password and downstream API key;
7. Retain the default auth-dir; do not read, copy, or display OAuth Tokens.
8. When you need to log in to your Codex account, pause the operation, tell me the command to execute, and I will complete the login in the browser;
9. After logging in, start the service and request /healthz and /v1/models to check if it was successful;
10. Finally, tell me the location of the Base URL, API Key in the configuration file, and the list of currently available models.
Please execute the command directly.automaticCompleted steps. When encountering errors, first check the logs and try to fix them; do not just provide operation instructions.
After installation, you still need to manually enter the following in PowerShell to log in:
.\cli-proxy-api.exe --config .\config.yaml --codex-login
After logging in, you can check the model once:
$match = Get-Content .\config.yaml |
Select-String '^\s*-\s*"([^"]+)"\s*$' |
Select-Object -First 1
$key = $match.Matches[0].Groups[1].Value.Trim()
$result = Invoke-RestMethod `
-Uri "http://127.0.0.1:8317/v1/models" `
-Headers @{ Authorization = "Bearer $key" }
$result.data | Select-Object id
Seeing the model name indicates:
- Service started successfully;
- The client key is correct;
- OAuth accounts have been loaded;
- The upstream model is accessible.
Finally, start the service, and do not close the window during the entire process:
.\cli-proxy-api.exe --config .\config.yaml
Then, in the CC switch or access support OpenAI Enter the following in the interface software:
API 地址:http://127.0.0.1:8317/v1
API Key:config.yaml 文件中 api-keys 下的字符串
模型列表里想用的模型
It's configured now, let's open it. Claude The code is ready to use! Even if you ask what model it is, it will still stubbornly insist that it is... Claude It's a certain model, but the core has been replaced. GPT 5.6 Sol.
We respectively Claude Used simultaneously in Code and Codex GPT 5.6 Sol: Run the same case and compare the results.
Prompt words:
Develop a ready-to-use personal task dashboard in the current empty directory.
Require:
1. Use native HTML, CSS, and JavaScript; do not use frames or external CDNs.
2. Includes three columns: "Pending," "In Progress," and "Completed."
3. Supports adding, editing, deleting, dragging and dropping, and keyword search;
4. Data is stored in localStorage;
5. Supports JSON import and export, and validates the data structure before importing;
6. Supports dark mode, mobile layout, and keyboard operation;
7. Provides 8 sets of demo data covering different states;
8. The interface should have a clear visual hierarchy and should not use gradient colors;
9. After completion, check for code errors and provide a method for running the code locally.
Please create the required files directly, do not just provide code snippets.
Claude Code + GPT 5.6 Sol:
Codex + GPT 5.6 Sol:
Claude The Code column is divided into three sections using brown, blue, and green, making the status immediately apparent. Each card provides edit, left/right movement, and delete buttons, requiring no learning curve even for first-time users.
The newly created window is highly complete, featuring word count, status selection, and shortcut key hints. The search function proactively pauses dragging to prevent users from accidentally changing the sorting of results – a well-handled detail.
Codex boasts a more complete information architecture: a clear hierarchy of brand areas, task statistics, a search toolbar, and three-column dashboards. It also provides separate shortcut help windows and deletion confirmation windows, offering a more consistent experience than native browser pop-ups.
However, repeatedly "drag to other columns to change status" for each card takes up space and can easily create visual noise. Dark cards use brighter borders, which makes the overall look too harsh; the border contrast can be reduced.
From the perspective of visual presentation and intuitiveness of mobile tasks,Claude The code does indeed look better.
According to Stack Overflow's 2025 developer survey, 51% of professional developers use it daily; meanwhile, 54% of developers switch between more than 6 software programs while working.
Everyone's AI The demand has begun to flow to areas outside the model: access, management, and monitoring.
CLIProxyAPI packages these requirements into desktop software that ordinary people can use.automaticDownload and updateOne-clickLog in to accountautomaticRecognition model, tray operation, clientfastConfiguration.
We can create a separate product based on the CLIProxyAPI: model evaluation and...intelligentRouting. Submit a batch of real tasks, and the system calls the appropriate methods accordingly. GPT、Claude、Gemini The model records completion time, token usage, error rate, and human scoring.
This evaluation result can be directly used in model selection. When writing front-end code, prioritize models with better visual performance; when processing long documents, switch to models with more stable context; in case of rate limiting or service exceptions, the system...automaticSwitch to the backup model.
The longer the system is used, the more tasks, ratings, and routing records it accumulates.recommendThe results will be closer to our actual work. Public rankings can only answer which model is good, which users care about most, which model is suitable for our task, and how much money can be saved when the quality is sufficient.
CLIProxyAPI already provides underlying capabilities for multi-model access. Adding evaluation, routing, cost management, and team permissions will create a complete, independent system. AI Model-managed products.
Original link:GitHub garners a staggering 42,000 stars, making GPT and Claude Strong alliance