PixMind Docs
Agent Integrations

Use PixMind in Codex CLI through CC Switch

Route Codex Responses through CC Switch and convert them to PixMind Chat Completions.

Codex CLI cannot natively connect to PixMind Chat Completions, but it can use PixMind through CC Switch 3.17.0+ local routing.

Why the same Base URL does not work

The protocols use different request shapes, tool-call events, and streaming formats:

  • Current PixMind endpoint: POST /api-platform/v1/chat/completions
  • Codex CLI custom provider requirement: a Responses-compatible endpoint

Changing only the URL or setting wire_api to responses does not convert the protocol. It usually results in a 404, an invalid request shape, or tool events that the client cannot parse.

1. Add PixMind as a provider

In the CC Switch Codex panel, add a custom provider:

  • Provider Name: PixMind
  • API Endpoint: https://aihub-admin.aimix.pro/api-platform/v1
  • API Key: your PixMind API key
  • API Format: OpenAI Chat Completions (Requires routing)
  • Model: start with gpt-5.6-terra

2. Enable local routing

Open Settings → Routing → Local Routing:

  1. Enable the Local Routing master switch.
  2. Enable Codex under Routing Enabled.
  3. Switch to the PixMind provider.
  4. Restart Codex so it reloads config.toml and the model catalog.

CC Switch performs the full round trip:

Codex Responses
  → CC Switch Local Route
  → PixMind Chat Completions
  → CC Switch Local Route
  → Codex Responses

3. Map models

You can map Codex to any LLM available through PixMind, including:

  • gpt-5.6-sol for difficult engineering and flagship reasoning
  • gpt-5.6-terra as the balanced daily default
  • gpt-5.6-luna for quick edits and lightweight work
  • claude-sonnet-5 for balanced coding and tool use
  • gemini-3.5-flash for fast multimodal work

If requests return 404 or streaming cannot be parsed, verify that API Format is Chat Completions and that both Local Routing and Codex takeover are enabled.

On this page