Claude Code with ARK
Point Claude Code at ARK's Anthropic-compatible API and run its agent loop on open models. We checked it end to end on ARK Cloud, tool calls included, with Claude Code 2.1.206 in October 2026.
Claude Code: Anthropic's agentic coding tool for the terminal, with extensions for VS Code and JetBrains IDEs.
Before you start
You need an ARK API key: sign in to ARK Cloud and copy it from the dashboard, or use a key from your own ARK deployment and its base URL. The examples use arklabsai/Qwen3.6-35B-A3B; for the hardest tasks use arklabsai/Qwen3.5-122B-A10B. Both call tools and read up to 256K tokens.
1. Install
curl -fsSL https://claude.ai/install.sh | bash2. Connect it to ARK
Claude Code reads gateway settings from the env block of ~/.claude/settings.json. Send your ARK key as a bearer token and name the ARK model:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.ark-labs.cloud/api/anthropic",
"ANTHROPIC_AUTH_TOKEN": "your-ark-api-key",
"ANTHROPIC_MODEL": "arklabsai/Qwen3.6-35B-A3B",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "arklabsai/Qwen3.6-35B-A3B"
}
}Run claude in your project and check /status: the Anthropic base URL line shows ARK. In VS Code, put the same variables in claudeCode.environmentVariables in your user settings (Preferences: Open User Settings (JSON)); the JetBrains plugin runs the claude command and uses ~/.claude/settings.json.
Good to know
- Use
ANTHROPIC_AUTH_TOKEN, notANTHROPIC_API_KEY: ARK reads the key from theAuthorization: Bearerheader, andANTHROPIC_API_KEYsends it asx-api-key. ANTHROPIC_DEFAULT_HAIKU_MODELsends Claude Code's background tasks, such as session titles, to the same ARK model.- Claude Code assumes 200K tokens of context for model names it does not know, below the 256K ARK serves, so long sessions are compacted somewhat early.
- Do not put the key in a project's
.claude/settings.json: that file is committed with the project. - Anthropic does not support Claude Code with models other than Claude, through ARK or any other gateway.
- Code completion while you type needs a fill-in-the-middle endpoint, which ARK does not serve: use ARK for chat and agent work.
- Agents offer tools on every request, and while tools are offered the Qwen models answer without thinking (see Reasoning).
- These tools send the whole conversation on every turn, so they use ARK statelessly. ARK's prompt cache speeds up the repeated part of each prompt; every prompt token is still billed.
Next
Read about tool calling and limits and capacity on ARK, or browse other integrations.
Configuration keys follow Claude Code's official documentation as of October 2026. If the tool has changed since, its docs take precedence.