OpenScale / Agent setup

Your agent. OpenScale models.

One tested paste per agent. Your existing setup stays yours.

Connect your agent

One paste
  1. Choose your agent

    Tested live with Claude Code 2.1.295: file edits, shell, subagent models and streaming.

  2. Get your API key

    One key works for every agent. New accounts get free credit to try it.

  3. Paste this into your terminal

    Replace YOUR_OPENSCALE_API_KEY with your key. In the dashboard, API keys shows this with your key already in it.

    terminal
    export ANTHROPIC_BASE_URL='https://api.openscale.so/anthropic'
    export ANTHROPIC_AUTH_TOKEN='YOUR_OPENSCALE_API_KEY'
    export ANTHROPIC_MODEL='deepseek/deepseek-v4.1-flash'
    export CLAUDE_CODE_MAX_CONTEXT_TOKENS='1048568'
    claude
    
    Full Claude Code guide
Keep it in Claude Code's config file

Uses environment variables that every current Claude Code 2.x release reads, from the shell or from the env block of settings.json. Check claude --version first.

  1. Merge the provider configuration

    Default path: ~/.claude/settings.json. Back up your file first. To keep the setup, merge only these keys into the env block of ~/.claude/settings.json (or a project .claude/settings.local.json). Keep permissions, hooks, plugins and every other setting.

    Download config fragment
    ~/.claude/settings.json
    {
      "env": {
        "ANTHROPIC_BASE_URL": "https://api.openscale.so/anthropic",
        "ANTHROPIC_AUTH_TOKEN": "YOUR_OPENSCALE_API_KEY",
        "ANTHROPIC_MODEL": "deepseek/deepseek-v4.1-flash",
        "CLAUDE_CODE_MAX_CONTEXT_TOKENS": "1048568"
      }
    }
    
  2. Enter your key locally

    ANTHROPIC_AUTH_TOKEN holds your OpenScale API key; Claude Code sends it as a Bearer token to the OpenScale base URL only. Unset ANTHROPIC_API_KEY in the same environment so the two do not conflict. Never paste your key into an agent conversation.

  3. Choose the model

    Start a new claude session after changing settings. ANTHROPIC_MODEL selects deepseek/deepseek-v4.1-flash. Requests for Opus, Sonnet, Haiku and subagents are served by the same OpenScale model, so no other model setting is needed. Type /model in a session to confirm.

Troubleshooting and undoOfficial Claude Code documentation

Setup guides by agent

Each guide has the quick start, the config file, verification steps and the price of every model it sets up.

Building your own integration? Read the API reference. Plain Markdown guide · llms.txt