Skip to main content
This guide explains how to connect Codex CLI to Kimi Open Platform through CC Switch and use the kimi-k3 model.
Codex CLI currently supports text and image input, but does not provide a native video input channel — you cannot submit a video file directly as multimodal input to the model. To analyze video using only Codex CLI’s existing input methods, you can first extract key frames with ffmpeg and optionally combine them with audio transcription before handing them to the model. Note that this is a limitation of Codex CLI’s input layer, not of the Kimi K3 model — the Kimi K3 API natively supports video input. Call kimi-k3 directly as described in Vision Input for full video understanding, with no manual frame extraction required.

Prerequisites

Complete the following preparations first. Follow the corresponding official instructions for installation and account-related operations; this guide does not repeat those procedures.

Install Codex CLI

Follow the official Codex documentation and start Codex CLI at least once.

Create an API key

Create and save an API key in Kimi Open Platform.

Install CC Switch

Follow the official CC Switch instructions to install the version for your operating system.
CC Switch is a third-party open-source tool and is not part of Kimi Open Platform. Before using it, evaluate it according to your organization’s security and compliance requirements; your API key and Codex requests and responses will be processed by its local router.
After installation, open CC Switch and follow the steps below.

Step 1: Enable Codex Routing

In CC Switch, open Settings > Routing, then:
  1. Turn on Routing Master Switch to start the local routing service.
  2. Under Routing Enabled, turn on Codex.
Enable CC Switch Local Routing and Codex routing
Codex CLI uses the Responses API, while Kimi Open Platform provides an OpenAI-compatible Chat Completions API. CC Switch Local Routing converts requests and streaming responses between the two protocols. Keep CC Switch and Codex routing running while using the Kimi provider.

Step 2: Add the Kimi Provider

  1. Return to the CC Switch home screen and select the Codex tab at the top.
  2. Click + in the upper-right corner to add a provider.
Open the Codex tab and add a provider
  1. Confirm that you are on the Codex Provider page. Search for Kimi if needed, then select Kimi from the preset provider list.
Select the Kimi provider preset
  1. Enter the following settings:
  1. After changing the default model to kimi-k3, click Add to mapping.
Enter the Kimi API key, request URL, and default model
  1. Scroll down and confirm the following advanced settings:
  1. After confirming the settings, click Add in the lower-right corner.
Configure the Kimi upstream format, reasoning capabilities, and model mapping

Step 3: Enable the Kimi Provider

Return to the Codex provider list after adding the provider and click Enable on the Kimi provider you just added. Enable the Kimi provider Confirm that:
  • Kimi is the active provider under the Codex tab;
  • CC Switch Local Routing is running;
  • Codex is enabled under the routing settings.

Step 4: Start Codex CLI

If Codex CLI is already running, exit the current session. Enter the project directory where you want to work and start Codex CLI again:
Restarting allows Codex CLI to load the latest provider and model configuration written by CC Switch. After startup, confirm that Codex CLI shows kimi-k3 as the current model, then send a simple request:
If Codex CLI returns a response and the status bar shows kimi-k3, the configuration is working. Verify kimi-k3 in Codex CLI You can also check the CC Switch routing counter or request logs for a new Codex request.