Skip to main content

API Profiles

Configure custom AI providers with your own API keys. Full control over model selection and cost optimization.

Available Providers

ProviderModelContextBest For
GLMGLM 4.6StandardCost-optimized bulk tasks
KimiKimi K1.51M tokensLong document analysis
CustomAnyVariesOpenAI-compatible endpoints

Quick Start

1. Open Dashboard

ccs config

2. Add API Profile

Navigate to “API Profiles” tab and add your provider:
API Profiles Configuration

3. Use Profile

ccs glm "your prompt"
ccs kimi "analyze this large codebase"

Manual Configuration

GLM Profile

Create ~/.ccs/glm.settings.json:
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
    "ANTHROPIC_AUTH_TOKEN": "your_glm_api_key",
    "ANTHROPIC_MODEL": "glm-4.6"
  }
}

Kimi Profile

Create ~/.ccs/kimi.settings.json:
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.kimi.ai/anthropic",
    "ANTHROPIC_AUTH_TOKEN": "your_kimi_api_key",
    "ANTHROPIC_MODEL": "kimi-k1.5"
  }
}

Register in Config

Add to ~/.ccs/config.json:
{
  "profiles": {
    "glm": "~/.ccs/glm.settings.json",
    "kimi": "~/.ccs/kimi.settings.json",
    "default": "~/.claude/settings.json"
  }
}

Custom OpenAI-Compatible Endpoints

Any OpenAI-compatible API can be configured:
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://your-endpoint.com/v1",
    "ANTHROPIC_AUTH_TOKEN": "your-api-key",
    "ANTHROPIC_MODEL": "your-model-name"
  }
}

Use Cases

Budget Conscious

Use GLM for routine tasks at ~$0.50/1M tokens

Long Documents

Kimi for analyzing large codebases (1M context)

Cost Optimization

Mix Claude (quality) + GLM (volume)

Enterprise

Custom endpoints with your own API keys

Settings Format

All env values MUST be strings (not booleans/objects) to prevent PowerShell crashes.
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://...",      // String
    "ANTHROPIC_AUTH_TOKEN": "your-key",       // String
    "ANTHROPIC_MODEL": "model-name"           // String
  }
}

Hybrid Workflow

Most power users combine subscription + API:
# Terminal 1: Strategic planning with Claude
ccs "Design the authentication architecture"

# Terminal 2: Bulk implementation with GLM
ccs glm "Implement user service based on the design"

# Terminal 3: Code review with Gemini (free)
ccs gemini "Review the implementation for security issues"