Skip to content
Developer API

Coding clients: Claude Code, Cursor, Cline and more

How to connect Claude Code, Cursor, Cline, Roo Code, Continue, Aider, Zed and OpenClaw to AgentHere: API key, base URL, model — step by step for OpenAI- and Anthropic-compatible clients.

6 min readUpdated 2026-07-19

AgentHere speaks two protocols at once: an OpenAI-compatible one (/v1/chat/completions) and an Anthropic-compatible one (/v1/messages). The same API key, the same models and the same balance work for both. That means any popular coding client — Claude Code, Cursor, Cline, Roo Code, Continue, Aider, Zed, OpenClaw, opencode — connects directly.

In particular, Claude Code (which only speaks the Anthropic protocol) works with AgentHere out of the box — no shim and no third-party proxy required.

Models and protocols. DeepSeek models (deepseek-v4-pro, deepseek-v4-flash) are available on both endpoints. GLM models (glm-5.2, glm-4.7-flash) are available on the OpenAI endpoint only; the Anthropic endpoint serves DeepSeek only. So for Claude Code and other Anthropic clients, pick the deepseek-v4-pro model.

Step 1. Create an API key

  1. Sign in and open API keys.
  2. Create a key of type proxy.
  3. Copy the key right away — it is shown only once.

The key starts with ah_ and works for both protocols.

Step 2. Pick a protocol and base URL

ProtocolBase URLHeaderAvailable modelsClients
OpenAIhttps://agenthere.ru/v1Authorization: Bearer ah_...all (DeepSeek + GLM)Cursor, Cline, Roo Code, Continue, Aider, Zed, OpenClaw, opencode
Anthropichttps://agenthere.ru/anthropicx-api-key: ah_...DeepSeek onlyClaude Code, Cline (Anthropic mode), Zed (anthropic_compatible), OpenClaw

For Anthropic clients the base URL is https://agenthere.ru/anthropic (no /v1) — the SDK appends /v1/messages itself. For OpenAI clients it is https://agenthere.ru/v1. Use agenthere.ru for API clients: agenthere.online redirects to it, and a redirect can strip your key on the way.

Models

ModelTierEndpointWhen to pick
deepseek-v4-prostrong (default)OpenAI + AnthropicCoding, reasoning, hard tasks
deepseek-v4-flashlight/fastOpenAI + AnthropicCheap and fast, autocomplete
glm-5.2strong (GLM)OpenAI onlyA GLM alternative to DeepSeek
glm-4.7-flashfree (GLM)OpenAI onlyFree, light tasks

Our models are DeepSeek and GLM, not Claude or GPT. Set one of the ids above in your client's model field. If the client sends claude-* or gpt-*, you get a 404 not_found_error listing the available models. Sending a GLM model to the Anthropic endpoint returns a 400 invalid_request_error telling you to use the OpenAI endpoint.

Claude Code (Anthropic)

bash
npm install -g @anthropic-ai/claude-code

export ANTHROPIC_BASE_URL=https://agenthere.ru/anthropic
export ANTHROPIC_AUTH_TOKEN=ah_YOUR_KEY
export ANTHROPIC_MODEL=deepseek-v4-pro
claude

Windows (PowerShell):

powershell
$env:ANTHROPIC_BASE_URL = "https://agenthere.ru/anthropic"
$env:ANTHROPIC_AUTH_TOKEN = "ah_YOUR_KEY"
$env:ANTHROPIC_MODEL = "deepseek-v4-pro"
claude

ANTHROPIC_BASE_URL alone is not enough: without ANTHROPIC_AUTH_TOKEN, Claude Code keeps using your claude.ai login. Set both. The model must be a DeepSeek one (deepseek-v4-pro or deepseek-v4-flash); GLM is not available on this endpoint.

Cline (VS Code and JetBrains)

  1. Open Cline settings (the ⚙️ icon).
  2. API ProviderOpenAI Compatible (not "OpenAI" — that one has no Base URL field).
  3. Base URLhttps://agenthere.ru/v1, API Key → your ah_ key, Modeldeepseek-v4-pro.

Alternatively, the Anthropic provider with the "Use custom base URL" checkbox set to https://agenthere.ru/anthropic and the model deepseek-v4-pro (GLM does not work in this mode).

Roo Code (VS Code)

A Cline fork, configured the same way: API ProviderOpenAI Compatible, Base URL https://agenthere.ru/v1, key ah_..., model deepseek-v4-pro (or glm-5.2 for GLM).

Continue (VS Code and JetBrains)

Add a model to config.yaml:

yaml
models:
  - name: AgentHere DeepSeek V4 Pro
    provider: openai
    model: deepseek-v4-pro
    apiBase: https://agenthere.ru/v1
    apiKey: ah_YOUR_KEY

Aider (CLI)

bash
export OPENAI_API_BASE=https://agenthere.ru/v1
export OPENAI_API_KEY=ah_YOUR_KEY
aider --model openai/deepseek-v4-pro

The openai/ prefix is required — it makes Aider route through your OPENAI_API_BASE.

Cursor

  1. Settings → Models → API Keys.
  2. Enable OpenAI API Key and paste your ah_ key.
  3. Enable Override OpenAI Base URLhttps://agenthere.ru/v1.
  4. + Add Custom Modeldeepseek-v4-pro (or glm-5.2).

Cursor supports only an OpenAI-compatible custom endpoint, and the Base URL toggle is global.

Zed

Add an OpenAI-compatible provider to settings.json:

json
{
  "language_models": {
    "openai_compatible": {
      "agenthere": {
        "api_url": "https://agenthere.ru/v1",
        "available_models": [
          { "name": "deepseek-v4-pro", "display_name": "DeepSeek V4 Pro", "max_tokens": 65536 },
          { "name": "glm-5.2", "display_name": "GLM-5.2", "max_tokens": 128000 }
        ]
      }
    }
  }
}

Add the key via the UI (Add Provider) or the AGENTHERE_API_KEY env var. For the Anthropic protocol use an anthropic_compatible block with api_url: "https://agenthere.ru/anthropic" and deepseek-v4-pro.

OpenClaw

OpenClaw is a local-first AI agent with a CLI (openclaw), typed tools and SQLite-backed RAG. It supports custom providers via models.providers, so it connects to AgentHere as a regular OpenAI-compatible provider.

  1. Install OpenClaw and run onboarding: openclaw onboard.
  2. Add a provider in your config (openclaw.json5) and set the model:
json5
{
  models: {
    providers: {
      agenthere: {
        baseUrl: "https://agenthere.ru/v1",
        apiKey: "{env:AGENTHERE_API_KEY}",
        models: [
          { id: "deepseek-v4-pro" },
          { id: "deepseek-v4-flash" },
          { id: "glm-5.2" },
        ],
      },
    },
  },
  agents: { defaults: { model: { primary: "agenthere/deepseek-v4-pro" } } },
}
  1. Provide the key: openclaw models auth paste-api-key (paste your ah_ key) or set the AGENTHERE_API_KEY env var.

Models are referenced as agenthere/<model> (e.g. agenthere/deepseek-v4-pro). See the OpenClaw docs for the exact field reference.

opencode and the AgentHere desktop app

The AgentHere desktop app configures itself automatically. For a standalone opencode, add a provider to opencode.json:

json
{
  "provider": {
    "agenthere": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "AgentHere",
      "options": { "baseURL": "https://agenthere.ru/v1", "apiKey": "ah_YOUR_KEY" },
      "models": {
        "deepseek-v4-pro": { "name": "DeepSeek V4 Pro", "limit": { "context": 65536, "output": 65536 } }
      }
    }
  }
}

GitHub Copilot CLI and Windsurf

  • Copilot CLI BYOK: COPILOT_PROVIDER_TYPE=openai, COPILOT_PROVIDER_BASE_URL=https://agenthere.ru/v1, COPILOT_PROVIDER_API_KEY=ah_..., COPILOT_MODEL=deepseek-v4-pro.
  • Windsurf has no built-in custom-endpoint field — use Cline/Continue.

Billing and access (Russia)

  • Pay with a Russian card or SBP — no foreign card, no resellers.
  • A single balance covers both web chat and any coding client.

Details in tokens and billing.

Troubleshooting

ErrorCauseFix
401 authentication_errorWrong or revoked keyRecreate the key in API keys
404 not_found_error (model)Client sends claude-* or gpt-*Set one of our models (deepseek-v4-pro)
400 invalid_request_error (DeepSeek-only)GLM sent to the Anthropic endpointUse an OpenAI client (/v1) for GLM; on Anthropic use DeepSeek only
502 api_errorAll providers unavailableRetry; contact support if it persists
Empty reply / broken streamClient expects [DONE] but gets Anthropic eventsFor Anthropic clients use https://agenthere.ru/anthropic

What's next

Coding clients: Claude Code, Cursor, Cline and more | AgentHere