Use Autark with Claude Code.
Claude Code cannot point at Autark directly. It needs an Anthropic-format endpoint, and Autark serves the OpenAI format. There is a way to bridge the two, and it is worth understanding the tradeoff before you rely on it.
Why it does not connect directly
Claude Code speaks the Anthropic format, which means it calls /v1/messages. Autark serves the OpenAI format at /v1/chat/completions, so that route does not exist here and the request fails.
Anthropic also states that it does not support routing Claude Code to non-Claude models through any gateway. Even with a working bridge, this is outside what Anthropic supports and may break as Claude Code changes.
The bridge, if you want it
Run a proxy that converts Anthropic requests to OpenAI, then point Claude Code at the proxy:
# 1. Run the proxy, pointed at Autark
export OPENAI_BASE_URL=https://api.autark.ai/v1
export OPENAI_API_KEY=autark_sk_YOUR_KEY
export OPENAI_MODEL=autark-agent
python claude_connect.py
# 2. Point Claude Code at the proxy
export ANTHROPIC_BASE_URL=http://localhost:8080
export ANTHROPIC_API_KEY=dummy-key
claudeWorth knowing before you rely on this
The proxy route works, but it sits outside what Anthropic supports and may break as Claude Code changes. It also adds a process you have to run and maintain. If you want a supported path, use Cursor, Hermes or OpenCode: all three speak the OpenAI format and connect to Autark directly.
The supported alternatives
If what you want is an agentic coding tool running on Autark, these connect without a bridge.