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.
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 thedeepseek-v4-promodel.
Step 1. Create an API key
- Sign in and open API keys.
- Create a key of type proxy.
- 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
| Protocol | Base URL | Header | Available models | Clients |
|---|---|---|---|---|
| OpenAI | https://agenthere.ru/v1 | Authorization: Bearer ah_... | all (DeepSeek + GLM) | Cursor, Cline, Roo Code, Continue, Aider, Zed, OpenClaw, opencode |
| Anthropic | https://agenthere.ru/anthropic | x-api-key: ah_... | DeepSeek only | Claude 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/messagesitself. For OpenAI clients it ishttps://agenthere.ru/v1. Useagenthere.rufor API clients:agenthere.onlineredirects to it, and a redirect can strip your key on the way.
Models
| Model | Tier | Endpoint | When to pick |
|---|---|---|---|
deepseek-v4-pro | strong (default) | OpenAI + Anthropic | Coding, reasoning, hard tasks |
deepseek-v4-flash | light/fast | OpenAI + Anthropic | Cheap and fast, autocomplete |
glm-5.2 | strong (GLM) | OpenAI only | A GLM alternative to DeepSeek |
glm-4.7-flash | free (GLM) | OpenAI only | Free, 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-*orgpt-*, you get a404 not_found_errorlisting the available models. Sending a GLM model to the Anthropic endpoint returns a400 invalid_request_errortelling you to use the OpenAI endpoint.
Claude Code (Anthropic)
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
claudeWindows (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_URLalone is not enough: withoutANTHROPIC_AUTH_TOKEN, Claude Code keeps using your claude.ai login. Set both. The model must be a DeepSeek one (deepseek-v4-proordeepseek-v4-flash); GLM is not available on this endpoint.
Cline (VS Code and JetBrains)
- Open Cline settings (the ⚙️ icon).
- API Provider → OpenAI Compatible (not "OpenAI" — that one has no Base URL field).
- Base URL →
https://agenthere.ru/v1, API Key → yourah_key, Model →deepseek-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 Provider → OpenAI 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:
models:
- name: AgentHere DeepSeek V4 Pro
provider: openai
model: deepseek-v4-pro
apiBase: https://agenthere.ru/v1
apiKey: ah_YOUR_KEYAider (CLI)
export OPENAI_API_BASE=https://agenthere.ru/v1
export OPENAI_API_KEY=ah_YOUR_KEY
aider --model openai/deepseek-v4-proThe
openai/prefix is required — it makes Aider route through yourOPENAI_API_BASE.
Cursor
- Settings → Models → API Keys.
- Enable OpenAI API Key and paste your
ah_key. - Enable Override OpenAI Base URL →
https://agenthere.ru/v1. - + Add Custom Model →
deepseek-v4-pro(orglm-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:
{
"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.
- Install OpenClaw and run onboarding:
openclaw onboard. - Add a provider in your config (
openclaw.json5) and set the model:
{
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" } } },
}- Provide the key:
openclaw models auth paste-api-key(paste yourah_key) or set theAGENTHERE_API_KEYenv 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:
{
"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
| Error | Cause | Fix |
|---|---|---|
401 authentication_error | Wrong or revoked key | Recreate 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 endpoint | Use an OpenAI client (/v1) for GLM; on Anthropic use DeepSeek only |
502 api_error | All providers unavailable | Retry; contact support if it persists |
| Empty reply / broken stream | Client expects [DONE] but gets Anthropic events | For Anthropic clients use https://agenthere.ru/anthropic |
What's next
- API and MCP overview — in Developer API.
- The Chat Completions endpoint in depth — in Chat Completions.
- Pricing — on the pricing page.