Skip to main content

API Profiles

API profiles let you use any Anthropic-compatible endpoint by configuring a base URL, API key, and model. No OAuth required.

Available Presets

PresetCommandDefault ModelContextCategory
anthropicccs anthropicclaude-sonnet-4-5-20250929200KRecommended
alibaba-coding-planccs albbqwen3-coder-plus1MRecommended
llamacppccs llamacppllama3-8bVariesRecommended
ollamaccs ollamaqwen3-coder32K+Recommended
openrouterccs openrouter300+ modelsVariesAlternative
novitaccs novitadeepseek/deepseek-v3.2VariesAlternative
minimaxccs mmMiniMax-M2.11MAlternative
glm (built-in)ccs glmglm-5StandardBuilt-in
km (built-in)ccs kmkimi-k2-thinking-turboVariesBuilt-in

Creating Profiles

Via Preset

# Interactive wizard — prompts for name and API key
ccs api create --preset anthropic
ccs api create --preset alibaba-coding-plan
ccs api create --preset ollama
ccs api create --preset llamacpp
ccs api create --preset novita
ccs api create --preset openrouter

Via Dashboard

ccs config
# Navigate to: API Profiles → Create Profile → select preset

Manual Settings File

Create ~/.ccs/<name>.settings.json:
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://your-endpoint.com/v1",
    "ANTHROPIC_AUTH_TOKEN": "your-api-key",
    "ANTHROPIC_MODEL": "model-name",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "model-name",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "model-name",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "model-name"
  }
}
Register in ~/.ccs/config.yaml:
profiles:
  myprofile:
    settings_file: ~/.ccs/myprofile.settings.json
All env values must be strings. Booleans or objects cause crashes on Windows PowerShell.

CLIProxy Bridge

Use OAuth providers as API profiles via the CLIProxy bridge:
ccs api create --cliproxy-provider gemini
ccs api create --cliproxy-provider codex
This creates an API profile that routes through the local CLIProxy instance, giving you API-key-style access to OAuth providers.

Profile Lifecycle

# List all API profiles
ccs api list

# Copy a profile with new name
ccs api copy glm glm-backup

# Export (without secrets by default)
ccs api export glm --out glm-export.json
ccs api export glm --out glm-export.json --include-secrets

# Import from file
ccs api import glm-export.json
ccs api import glm-export.json --name glm-restored

# Find unregistered settings files
ccs api discover
ccs api discover --register

# Remove profile
ccs api remove myprofile

Extended Context (--1m flag)

Some profiles support a 1M token context window:
# Enable 1M context for this session
ccs albb --1m "analyze entire codebase"
ccs km --1m "read all these files"

# Disable if auto-enabled
ccs albb --no-1m "quick task"
Profiles with 1M support: alibaba-coding-plan, km, kimi, minimax.

Settings File Format

Full settings file with all optional fields:
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.example.com",
    "ANTHROPIC_AUTH_TOKEN": "sk-your-key",
    "ANTHROPIC_MODEL": "model-id",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "model-id",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "model-id",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "model-id",
    "ANTHROPIC_MAX_TOKENS": "8192",
    "ANTHROPIC_THINKING_BUDGET": "8192"
  }
}

Common Profiles

Z.AI GLM (ccs glm)

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
    "ANTHROPIC_AUTH_TOKEN": "your_glm_api_key",
    "ANTHROPIC_MODEL": "glm-5"
  }
}

Kimi for Coding (ccs km)

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.kimi.com/coding/",
    "ANTHROPIC_AUTH_TOKEN": "your_kimi_api_key",
    "ANTHROPIC_MODEL": "kimi-k2-thinking-turbo"
  }
}

Hybrid Workflow

Combine Claude subscriptions with API profiles for cost-optimized workflows:
# Terminal 1: Strategic design with Claude (subscription)
ccs "design the authentication architecture"

# Terminal 2: Bulk implementation with GLM (API key, low cost)
ccs glm "implement all the services per the design"

# Terminal 3: Review with Codex (OAuth, no API key)
ccs codex "security review of the implementation"

Next Steps

Anthropic Direct

Direct API access with your Anthropic key

Alibaba Coding Plan

Qwen3 Coder with 1M context

Ollama (Local)

Zero-cost local model inference

llama.cpp (Local)

GGUF models with GPU acceleration