321AI Model MarketplaceLive marketplace →

Connect CC Switch to 321AI

Coding CLI · configuration guide + live pricing · sign up for trial credit

CC Switch is an open-source provider switcher (desktop app, 10 coding tools including Claude Code and Codex) that stores each provider setup as a card and flips between them in one click — handy when you mix official and relay access. 321AI is not in its built-in preset list; add it as a custom configuration and the switching works exactly the same.

CC Switch in one line: One-click provider switching for Claude Code / Codex — add 321AI via custom config. Recommended models and their market floor prices are in the table below; the full catalog is at https://321ai.cc/en/models/.

Sign up & get trial creditSee live pricing

Configuration

SettingValueNotes
Add entrypick the app in the sidebar → + (Add Provider)search finds no 321AI preset → choose Custom Configuration
ANTHROPIC_BASE_URLhttps://321ai.ccClaude Code; prefix mode, no /v1
ANTHROPIC_AUTH_TOKENAPI key from the consoleor ANTHROPIC_API_KEY — either one
base_urlhttps://321ai.cc/v1Codex; model_providers section of config.toml, include /v1
experimental_bearer_tokenAPI key from the consolehow Codex stores third-party keys (not auth.json)
model_provider / modelyour name for the provider / a model name on salerequired in Codex config.toml

Steps

1. Download and install CC Switch from its GitHub releases (Windows / macOS / Linux)

2. Pick Claude Code (or Codex) in the sidebar, click the + in the page header; the preset list has no 321AI, so choose Custom Configuration

3. Claude Code: fill env with ANTHROPIC_BASE_URL=https://321ai.cc (no /v1) + ANTHROPIC_AUTH_TOKEN=<console key>; Codex: fill config.toml with base_url=https://321ai.cc/v1 + key + model name

4. Click the provider card to switch (v4 changes only the address / key / model fields), then restart claude / codex in your terminal

Recommended models (live market floor)

WhatWhereNotes
Live market floor pricinghttps://321ai.cc/en/models/input per 1M tokens, per-supplier quotes on the marketplace

Prices are the multi-supplier market floor and move in realtime; see all model prices →

FAQ

Why can't I find 321AI in the preset list?

Built-in presets only cover some vendors — relay services are added to the list only through CC Switch's sponsorship program. Adding it via Custom Configuration works identically.

claude / codex didn't pick up the switch?

Restart the terminal so the CLI re-reads its config, or check the current base_url inside claude with /status. CC Switch v4 switching changes only the key fields and keeps the rest.

Why does Codex take /v1 but Claude doesn't?

CC Switch treats the Claude base_url as a prefix and appends paths itself (no /v1); Codex follows the official config.toml format with a complete endpoint URL (with /v1).

How many provider setups can I keep?

Unlimited — one card per setup, click to switch; good for mixing official and relay accounts or splitting budgets per project.

Other setup guides

Claude Code Cursor Cherry Studio Cline Dify Immersive Translate LobeChat NextChat Open WebUI Codex CLI Python OpenAI SDK LangChain
All model pricesFeatured · 321AI communityFeatured · Open-source toolsFeatured · Advertise with usFeatured