API Credit Checker
Check Balance How to use your key

How to use your API key

You received an API key from your provider. Here's everything you need to start using it — no technical background required.

Step 1

What you'll need

Every AI app needs the same two things. Have these ready before you start.

This was provided to you by your distributor.
Use this instead of the default Anthropic or OpenAI URL.
Every AI app asks for two things: your key + a server URL. You only need these two values for any app below.
Step 2

Pick your app and follow the steps

Tap a tab to see exactly where each value goes.

ℹ️ About models: Your CCCAI key gives access to ALL models on the gateway (Claude Sonnet, Claude Opus, Haiku, GPT, etc.). The examples below use claude-sonnet-4-6 as a balanced default — you can swap in any other model name (like claude-opus-4-7 for maximum capability) in the same config. Check the full available list on the Balance page after pasting your key. No need to specify a model per-message — most apps use one default and let you change it anytime.

OpenClaw (terminal + config file)

OpenClaw is an open-source AI agent tool you run from your terminal. With your CCCAI key, you get access to ALL models on the gateway — Claude Sonnet, Claude Opus, GPT, etc. You set ONE default model in the config, and OpenClaw uses it for all tasks (you can change it anytime).

  1. Install OpenClaw if you haven't:
    npm install -g openclaw
  2. Initialize OpenClaw config (creates ~/.openclaw/config.json):
    openclaw init
  3. Open the config file in any editor:
    nano ~/.openclaw/config.json
  4. Replace the "llm" section with this (paste your API key on the apiKey line):
    {
      "llm": {
        "provider": "openai-compatible",
        "baseUrl": "https://cccai.cfd/v1",
        "apiKey": "sk-your-key-here",
        "model": "claude-sonnet-4-6",
        "stream": false,
        "maxTokens": 4096
      }
    }
  5. Save (in nano: Ctrl+O, Enter, Ctrl+X) and run OpenClaw:
    openclaw
Config Preview
Base URLhttps://cccai.cfd/v1
API Keysk-your-key-here
Modelclaude-sonnet-4-6
💡 Want to use a different model? Your key has access to all of these — just swap the model name in config:
  • claude-opus-4-7 — most capable, latest
  • claude-opus-4-6 — high capability
  • claude-sonnet-4-6 — balanced, fast ← default shown above
  • claude-haiku-4-5-20251001 — fastest, cheapest
  • gpt-5.4 — OpenAI's latest
Check the full list on the Balance page after pasting your key.

ChatBox

ChatBox is a desktop app for chatting with AI models. Works on Mac, Windows, and Linux.

  1. Open ChatBox → SettingsAI Provider
  2. Select OpenAI API or Custom Provider
  3. Set API Host to: https://cccai.cfd/v1
  4. Paste your API Key
  5. Set Model Name to e.g. claude-sonnet-4-6
Config Preview
API Keyyour sk-... key
API Hosthttps://cccai.cfd/v1
Modelclaude-sonnet-4-6

LobeChat

LobeChat is a web-based AI chat interface. You can self-host it or use the online version at lobechat.com.

  1. Go to SettingsLanguage Model
  2. Select OpenAI from the provider list
  3. Set API Key to your sk-... key
  4. Set API Proxy URL to: https://cccai.cfd/v1
  5. Set model to e.g. claude-sonnet-4-6
Config Preview
API Keyyour sk-... key
Proxy URLhttps://cccai.cfd/v1
Modelclaude-sonnet-4-6

Cursor

Cursor is an AI-powered code editor. Use CCCAI keys to power its AI features with Claude models.

  1. Open Cursor → Settings (⌘, or Ctrl+,) → Models
  2. Toggle OpenAI API Key on
  3. Paste your API Key
  4. Set Base URL to: https://cccai.cfd/v1
  5. Add model name: claude-sonnet-4-6
Config Preview
API Keyyour sk-... key
Base URLhttps://cccai.cfd/v1
Modelclaude-sonnet-4-6

Cline

Cline is a VS Code extension for AI-assisted coding. It works inside Visual Studio Code.

  1. Install Cline extension in VS Code
  2. Click the Cline icon in the sidebar → Settings
  3. Set API Provider to OpenAI Compatible
  4. Set Base URL: https://cccai.cfd/v1
  5. Set API Key to your sk-... key
  6. Set Model ID to e.g. claude-sonnet-4-6
Config Preview
API Keyyour sk-... key
Base URLhttps://cccai.cfd/v1
Model IDclaude-sonnet-4-6

Claude Code (terminal CLI)

Claude Code is Anthropic's official command-line coding assistant. Normally it requires a Claude Max subscription ($100+/mo) — but you can run it on your CCCAI credits instead and pay per token. Your key has access to all Claude models (Sonnet, Opus, Haiku).

  1. Install Claude Code via npm:
    npm install -g @anthropic-ai/claude-code
  2. Set environment variables pointing Claude Code to the CCCAI gateway. Run these once in your terminal:
    export ANTHROPIC_BASE_URL="https://cccai.cfd"
    export ANTHROPIC_AUTH_TOKEN="sk-your-key-here"
    export ANTHROPIC_MODEL="claude-sonnet-4-6"
  3. To make these permanent (so they survive terminal restarts), add them to your shell config file:
    echo 'export ANTHROPIC_BASE_URL="https://cccai.cfd"' >> ~/.zshrc
    echo 'export ANTHROPIC_AUTH_TOKEN="sk-your-key-here"' >> ~/.zshrc
    echo 'export ANTHROPIC_MODEL="claude-sonnet-4-6"' >> ~/.zshrc
    source ~/.zshrc
    (If you use bash instead of zsh, replace ~/.zshrc with ~/.bashrc.)
  4. Launch Claude Code — it will use your default model automatically:
    claude
  5. To use a DIFFERENT model for a single session, override with the --model flag:
    claude --model claude-opus-4-7
Config Preview
BASE URLhttps://cccai.cfd
AUTH TOKENsk-your-key-here
MODELclaude-sonnet-4-6
💡 You don't have to pick a model for every message. ANTHROPIC_MODEL is your default — Claude Code uses it for every session automatically. Switch defaults anytime by changing the env var, or override per-session with --model.
Available models on your key:
  • claude-opus-4-7 — most capable
  • claude-opus-4-6
  • claude-sonnet-4-6 ← default shown above, great balance
  • claude-haiku-4-5-20251001 — fastest, cheapest
💰 This is the cheapest legal way to run Claude Code at scale — no monthly $100 Max subscription, pay only for tokens used via CCCAI.

Code

Using Python or Node.js? Drop this snippet into your project.

Python
from openai import OpenAI

client = OpenAI(
    api_key="your-sk-key-here",
    base_url="https://cccai.cfd/v1"
)

response = client.chat.completions.create(
    model="claude-sonnet-4-6",
    messages=[{"role": "user", "content": "Hello!"}],
    max_tokens=4096,
    stream=False
)

print(response.choices[0].message.content)
Node.js
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'your-sk-key-here',
  baseURL: 'https://cccai.cfd/v1'
});

const response = await client.chat.completions.create({
  model: 'claude-sonnet-4-6',
  messages: [{ role: 'user', content: 'Hello!' }],
  max_tokens: 4096,
  stream: false
});

console.log(response.choices[0].message.content);
Step 3

Required setup before use

These three values are required for your key to work. Instructions below match the app you selected above.

Step 4

Verify your key is working

Before setting up any app, confirm your key is active and has remaining balance. Paste it into our balance checker.

Check your balance →