Skip to main content

Documentation Index

Fetch the complete documentation index at: https://concentrate.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

We guarantee full support with the Anthropic provider but have high support for many others.
  1. Model Fallbacks — Auto-retries across providers if a model is rate-limited or down.
  2. Save up to 90% — Mix cheap open-source models with frontier when you need it.
  3. Swap Models Mid-Session — Switch with /model on the fly, no restart needed.
  4. Spend Controls — Set a monthly budget cap so you never get a surprise bill.
  5. Usage Analytics — See every request, model, token count, and cost in your dashboard.
  6. Zero Data Retention (ZDR) — You can choose to opt out of upstream provider data processing.

Quick Start

1

Create a Concentrate AI account with an active API key

Log in at concentrate.ai and create an API key. Your key should start with sk-cn.
2

Install Claude Code

If you haven’t installed Claude Code yet, follow the official installation instructions. On most systems:Verify it’s installed by running:
claude --version
3

Log out of existing Anthropic session (if applicable)

If you were previously logged in to Claude Code directly with Anthropic, you need to log out first. Open Claude Code and run:
/logout
This clears the existing Anthropic credentials so Claude Code will use your Concentrate environment variables instead.
curl -fsSL https://concentrate.ai/scripts/setup-claude.sh | bash
To use a specific model, you can configure it by running this command within Claude Code:
/model <model>
Example Models: minimax-m2-7-highspeed, kimi-k2-6, gpt-5.4, claude-opus-4-7

Verify Installation

After running the setup script:
  1. Restart your terminal or source your shell profile:
    # For bash (Linux)
    source ~/.bashrc
    # For bash (macOS)
    source ~/.bash_profile
    # For zsh
    source ~/.zshrc
    
  2. Launch Claude Code
    claude
    
  3. Verify the connection: Once inside Claude Code, run:
    /status
    
    You should see output confirming the Concentrate endpoint and your API key:
    API endpoint: https://api.concentrate.ai
    Auth: API key (sk-cn...)
    Model: claude-sonnet-4-20250514
    
    If the endpoint shows api.anthropic.com instead, your environment variables are not being picked up — see Troubleshooting.

Manual Setup

If you prefer to configure Claude Code manually or the automated script doesn’t work for your environment:
1

Set environment variables in your shell profile

Add the following to your shell profile (~/.bashrc, ~/.zshrc, etc.):
export CONCENTRATE_API_KEY="your_api_key_here"
export ANTHROPIC_BASE_URL="https://api.concentrate.ai"
export ANTHROPIC_AUTH_TOKEN="$CONCENTRATE_API_KEY"
export ANTHROPIC_API_KEY="" # Leave Empty.
These variables must be set in your shell profile (e.g. ~/.bashrc or ~/.zshrc). Do not put them in a project-level .env file — Claude Code does not read .env files.
Then reload your shell:
source ~/.bashrc # or ~/.zshrc
2

Verify the connection

Launch Claude Code and run /status:
claude
/status
Confirm the output shows https://api.concentrate.ai as the API endpoint. If it still shows api.anthropic.com, make sure you have logged out of any existing Anthropic session and that your shell profile has been reloaded.

Remove Concentrate AI

curl -fsSL https://concentrate.ai/scripts/uninstall-claude.sh | bash

Use Different Models

Claude Code works with most models on Concentrate. To use a specific model, you can configure it by running this command within Claude Code:
/model <model>
Example Models:
  • minimax-m2-7-highspeed
  • kimi-k2-6
  • gpt-5.4
  • claude-opus-4-7
For non-Anthropic options like MiniMax, GLM, Kimi, OpenAI, Gemini, etc. and compatibility guidance, see our Model Fortress and filter integrations for Claude Code and filter by “High” compatibility.
Concentrate makes it easy to use most models in Claude Code. Similar to how you might choose models in Cursor or VS Code, you can switch between options based on quality, speed, reasoning, or cost to find the best fit for your workflow.

Resiliency

In addition to accessing models by other authors, Concentrate improves resiliency by giving you multiple ways to access Anthropic models. If Anthropic direct is down, you can use fallback options to route requests to Anthropic through another provider such as AWS Bedrock, Azure, or Google Vertex AI.

How It Works

Claude Code natively communicates with the Anthropic Messages API. Concentrate AI exposes an Anthropic-compatible API layer at https://api.concentrate.ai, allowing Claude Code to connect to Concentrate the same way it connects to Anthropic directly. By setting ANTHROPIC_BASE_URL to the Concentrate endpoint and providing your Concentrate API key, all Claude Code requests are routed through Concentrate for centralized billing, observability, token savings, and access controls, with no changes to the Claude Code experience. Billing and usage are managed through your Concentrate AI credits. All usage, including reasoning tokens, appears in your Concentrate dashboard.

Troubleshooting

If you see an error about missing API key:
  1. Verify the environment variable is set:
    echo $CONCENTRATE_API_KEY
    
  2. Make sure you’ve sourced your shell profile:
    source ~/.bashrc # or appropriate file
    
  3. Confirm the variables are in your shell profile (~/.bashrc, ~/.zshrc), not a .env file — Claude Code does not read .env files.
  4. If you were previously logged in to Anthropic directly, run /logout inside Claude Code first.
If your API key is rejected:
  1. Verify the key in your dashboard.
  2. Ensure there are no extra spaces or quotes in the environment variable.
  3. Check that the key starts with sk-cn.
If you cannot connect to the API:
  1. Verify ANTHROPIC_BASE_URL is set correctly:
    echo $ANTHROPIC_BASE_URL
    # Should output: https://api.concentrate.ai
    
  2. Test the connection manually:
    curl https://api.concentrate.ai/v1/responses/health
    
  3. Check your internet connection and firewall settings.
If you’re still connected to api.anthropic.com:
  • Run /logout in Claude Code.
  • Confirm ANTHROPIC_API_KEY="".

Next Steps

API Reference

Explore the full API capabilities

Available Models

Browse all supported models

Auto Routing

Optimize model selection automatically

Get Support

Contact our support team

Feedback

If you encounter issues or have suggestions, email support@concentrate.ai.
  • Report bugs
  • Feature requests
  • Documentation improvements
We appreciate your patience as we continue to enhance the Claude Code integration.