SuperAPI AI Directory

How do I connect Codex's model to Claude Code? With a complete tutorial

Author: AI小集 · Original source: AI工具集

Recently Claude started banning accounts on a large scale again, and my main account ultimately didn't escape it either.

Getting the account banned is a small matter, but in Claude Code there are a lot of memories and scheduled tasks, and it can't be disabled...

I came across a tip shared by OpenAI's core product lead Tibo, and I followed along, and within a few minutes I successfully converted Codex's gpt-5.6-sol into an API and connected it to Claude Code.

Now the unused quota from Codex can be connected to Claude Code and continue to be used, and there's no need to worry about account bans—it's really great.

In today's article, I'll organize the specific steps for everyone, so even complete beginners can get started directly.

 

01. Connect gpt-5.6-sol to Claude Code

 

Claude Code cannot directly call Codex's OAuth interface. We can use CLIProxyAPI to complete authentication and protocol conversion locally, then use CC Switch to write the connection configuration, and then we can call the model in Codex from Claude Code.

Install CLIProxyAPI

There's no need to manually go to GitHub to download and configure it—just open Codex and send the following prompt to Codex:

Prompt: Please help me install and configure CLIProxyAPI on Windows.

Official project address:https://github.com/router-for-me/CLIProxyAPI
Requirements:
1. Only download the latest version from the project's official GitHub Releases;
2. Choose the windows_amd64 or windows_arm64 installation package according to the computer architecture;
3. Install to the CLIProxyAPI folder under the current user directory;
4. Copy config.example.yaml as config.yaml;
5. Bind the service to 127.0.0.1 and use port 8317;
6. Disable remote management, generate a random management password and downstream API Key;
7. Keep the default auth-dir; do not read, copy, or display the OAuth Token;
8. When it is necessary to log in to the Codex account, pause the operation and tell me the command I should execute; I will complete the login in the browser;
9. After login is complete, start the service and request /healthz and /v1/models to check whether it succeeded;
10. Finally, tell me the Base URL, the location of the API Key in the configuration file, and the currently available model list.

Please directly execute the steps that can be completed automatically. When encountering an error, first check the logs and try to fix it; do not just give operating instructions.

Codex will automatically help us install CLIProxyAPI and list key information such as the connection information and available models.

Account login

If during installation it prompts that login is required, run the following command in PowerShell to complete the login:

.\cli-proxy-api.exe –config .\config.yaml –codex-login

Start the service and verify whether the API works properly in a new PowerShell:

.\cli-proxy-api.exe –config .\config.yaml

Open a new PowerShell window and run the following script to query the available models:

$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

If the console returns a model list, such as gpt-5.6-sol, it means the local proxy bridge was set up successfully!

Configure CC Switch

We open CC Switch, select Claude Code, and then click the "+" in the upper right corner to add a new provider.

Configure according to the following information:

Provider name → CLIProxyAPI Codex

API Key → Query and copy from the information given by Codex

Base URL→http://127.0.0.1:8317

API format select Anthropic Messages

Do not enable "Local Routing" and "Full URL Mode"

Model mapping can be filled in as needed, or simply fill in gpt-5.6-sol for all of them.

Configuration is complete. We can return to the CC Switch main interface and click Test Connection, which shows the connection is normal.

Now when we open Claude Code in PowerShell, we can directly use gpt-5.6-sol.

 

02. How does it actually perform?

 

After successfully integrating it, I directly set up a few scenarios I use often in daily work, so we can see together how well gpt-5.6-sol from Codex performs after entering Claude Code.

Image generation

We enter the request in Claude Code:

Prompt: /generate-image Create an infographic that shows five basic yoga poses through simple, easy-to-understand illustrations, and provides explanations of body posture and breathing techniques.

Claude Code successfully understood the task and called the backend gpt-image-2 through the /generate-image workflow to generate an infographic:

The layout looks very comfortable, the images and text content are very clear, the Chinese rendering is also correct, and the accuracy of instruction understanding is very high.

Let’s send the same prompt to Codex and try it:

The generated infographic is very close to the one generated by Claude Code in both layout and content, which shows that after proxy conversion, there is no degradation in the image generation capability of tool calls.

Chat video editing

Let’s also try Claude Code’s MCP plugin automation capability.

I chose ChatCut and entered this in Claude Code:

Prompt: Read chatcut.io/claude, help me install the ChatCut plugin and create a new task.

Claude Code will read the installation instructions and configure the plugin.

During the process, a login page will pop up in the browser, and we need to confirm manually once.After installation is complete, create a new Claude Code session, and ChatCut will load automatically.。

We create a new Claude Code conversation, and then we can have the AI help us edit videos through the conversation.

Prompt: Use ChatCut to create a new task. Use D:\00\素材\素材1.mp4 through 素材20.mp4 as the visual materials, and use the audio track from D:\00\素材\别让爱凋落 小提琴.mp4 as the background music, to create a 9:16, 1080×1920, H.264 vertical-screen beat-synced video.

Edit the 20 visual materials into a 9:16 vertical video, selecting only one best continuous segment from each material, and each may appear at most once in the final video. Arrange the order of materials according to the visual content and the rhythm of the music; they do not need to be arranged by file number.

Analyze the beats, accents, melodic turns, and emotional changes of the background music, and perform beat-synced editing. Switch shots on heavy beats, rhythm changes, and melodic turns; appropriately extend shots during the soothing parts of the music, and speed up shot switching during the intensified rhythm and climax sections.

The editing should mainly use clean, sharp beat-synced hard cuts, using only a small number of natural transitions where truly necessary, and avoiding overuse of transitions and effects. The background music should fade in naturally at the beginning and fade out naturally at the end.

On the first execution, the AI successfully created the project and uploaded all the materials, but because the task was too complex, ChatCut only uploaded the materials and did not complete the full editing steps.

I broke the instructions into parts and had ChatCut execute them step by step.

First adjust the canvas to vertical and add the audio track, and add fade-in and fade-out effects to the music.

Prompt: Continue using the official ChatCut MCP to edit the current project; do not create a new project, do not re-upload the materials, and do not export.

Please modify the current Main Timeline:

  1. 1. Change the canvas to 9:16 portrait, resolution 1080×1920, keep 30fps.
  2. Create audio track A1.
  3. Place the entire 27.43-second audio "别让爱凋落 小提琴.mp4" into A1 starting from 0 seconds.
  4. Add a natural fade-in at the beginning of the music and a natural fade-out at the end.
  5. Do not add any visual material in this step.

After completion, check and report the canvas size, audio track, music start time, and total timeline duration. Do not export.

This time it was completed smoothly. ChatCut added the correct audio track to the canvas, added fade-in and fade-out effects, and adjusted the canvas size.

Let's continue arranging editing tasks:

Prompt: Continue editing the current project and current Main Timeline. Do not create a new project or re-upload materials.

Add all materials 素材1.mp4 through 素材20.mp4 to the V1 video track.

Editing requirements:

  1. Each selected material can appear at most once and must not be reused.
  2. Unsuitable materials may be left unused. Do not force-add them just to make up the count.
  3. For each selected material, cut only one best continuous segment.
  4. Use enough high-quality segments to cover the 27.43-second background music. There must be no blank gaps on the timeline.
  5. If the number of selected materials is relatively small, you may appropriately extend the high-quality segments, but do not repeat the visuals.
  6. Mute the original audio of all video materials and keep only the A1 background music.
  7. Use smart cropping to fit the 1080×1920 portrait format, keep the subject intact, and do not stretch, squash, or distort the image.
  8. Arrange the visual order and cut points according to the music's main downbeats, melodic turns, and emotional changes.
  9. Use slightly longer shots for the calm parts of the music, and speed up the cuts for the rhythmically stronger and climax sections.
  10. Mainly use clean, sharp beat-synced hard cuts, with only a small number of necessary natural transitions.
  11. Do not add subtitles, titles, logos, watermarks, or complex effects.

After confirming everything is correct, export in 9:16, 1080×1920, 30fps, H.264 format, and return the project link and video download link.

ChatCut automatically performs audio accent analysis, selects material segments, sorts them, crops them, exports, and even automatically returned the finished video download link!

Let's take a look at the final video together:

Standard 9:16 portrait, no repeated visuals, clean and sharp transitions, and the music fade-in and fade-out are also very natural.

When identifying beat points, ChatCut prioritized matching light drum beats. The sense of rhythm is not as strong as that of a professional editor, but the overall finished video effect is still decent. On a 100-point scale, I think this task can be given 80 points.

Coding

For daily use of Claude Code, there will be quite a lot of coding requirements, so let's test that as well.

Prompt: Please implement an interactive 3D smart city digital twin large screen that runs in the browser in the current empty repository.

Tech stack:

– React + TypeScript + Vite

– Three.js or React Three Fiber

– Post-processing effects may use ready-made libraries

– Do not rely on paid resources or external APIs

Visual effects:

– Dark futuristic city

– A large number of buildings of varying heights

– Roads, glowing traffic flows, streetlights, and dynamic billboards

– Building windows glow randomly

– Ground with grid and slight reflections

– Bloom glow, fog effects, and day-night changes

– Camera opening animation

– Keep it smooth and avoid meaningless model polygon stacking

Interactive features:

  1. Rotate, zoom, and pan the scene with the mouse.
  2. After searching for a building, highlight it and pop up a building information panel.
  3. Search for a building and make the camera automatically fly over to it.
  4. Day/night switching, with the sun, sky, and city lights changing in sync.
  5. Simulate vehicles moving along roads.
  6. Display population, energy consumption, traffic, and air quality indicators on the left side.
  7. Chart data continuously changes dynamically.
  8. Click the traffic, energy consumption, and security buttons to switch between different visualization layers.
  9. The traffic layer displays road heat effects.
  10. The energy consumption layer changes colors based on building energy consumption.
  11. The security layer displays camera scanning cones and alarm points.
  12. Supports pausing the animation and resetting the camera.
  13. Adapts correctly when the page size changes.
  14. Add a performance panel and quality selection.

The city must be procedurally generated and use a fixed random seed to ensure reproducibility. Please directly implement, run, and start the development server. Make sure the complete city and animations are visible on first open, and do not pass off a static screenshot as a 3D scene.

Let's take a look at the final generated result together:

The real-time running 3D city required in the prompt has been completed. Buildings, roads, traffic flow, and streetlights are all rendered, and we can adjust the viewpoint and scene with the mouse.

After switching between day and night, the sky, building lights, and city atmosphere also change in sync, and the overall effect is fairly complete.

Searching for a building highlights it and pops up an information panel. The overall effect is quite good.

Daily workflow

Besides writing code, in our daily work, as long as there is an SOP for something, we can try handing it to AI.

For example, my downloads folder is often piled up with all kinds of files, and I can have AI organize them separately by type and time:

Prompt: Help me organize the folder D:\Browser Downloads, with the following steps:

  1. First scan the files and generate an archiving plan by type and date. Do not process folders.
  2. Write a Python script to organize the files into "type/year/month" directories.
  3. Before executing, first show the files that will be moved and wait for my confirmation.
  4. After confirmation, execute the organization, without deleting or overwriting any files.
  5. After the organization is complete, check the results and generate an operation record to make undo easy.

Please complete it directly, and do not just tell me how to do it.

Let's look at the organization plan provided by Claude Code:

All my files were categorized by file type, year, and month.

We chose confirm, and only then did Claude Code begin executing and categorize all the files:

 

03. Some sharing

 

I switched Claude Code to a GPT model. At first I just wanted a quick fix, but it turned out to run very smoothly. The terminal habits, historical context, and environment configuration I had previously built in Claude Code could all be retained, without having to adapt to a whole new set of tools again.

In the past, when we chose an AI tool, it often meant choosing the model behind it. Now, with Claude Code as the workbench, the model can be chosen freely, and the workflow we have accumulated can continue to be used.

Of course, different models are not exactly the same in their compatibility with complex tool calling and context compression, so before starting any truly important project, it is still advisable to first run a few real tasks to test things out.

Model vendors and Agent clients will also gradually decouple, and in the future what users choose may not be a fixed model, but a system that can truly get different models to finish the work.

Models can be swapped, tools can be swapped, but the workflows you have accumulated yourself do not all need to be torn down and rebuilt.

Original link:After Claude was banned, I connected gpt-5.6-sol into Claude Code in a few minutes