Run Claude Code against OpenLux
Claude Code speaks the Anthropic Messages API, while OpenLux exposes an OpenAI-compatible API. A small local bridge (LiteLLM) connects the two, so you keep the Claude Code workflow while every token is billed at OpenLux rates.

Set it up in four steps
Install Claude Code and the bridge
Install Claude Code from npm (npm install -g @anthropic-ai/claude-code) and the bridge with pip install "litellm[proxy]".
Map models to OpenLux
Create litellm.yaml mapping the Claude model names to OpenLux catalogue names, all pointed at https://openlux.lol/v1.
Start the bridge
Run litellm with the config on a local port. It accepts Anthropic-shaped requests and translates them to the OpenLux OpenAI endpoint.
Launch Claude Code
Set ANTHROPIC_BASE_URL to the local bridge (plus a placeholder ANTHROPIC_AUTH_TOKEN) and start claude as usual.
Configuration
Copy these blocks, replace the placeholder key and you are done.
litellm.yaml
model_list:
- model_name: claude-sonnet-4-5-20250929
litellm_params:
model: openai/claude-sonnet-4-5-20250929
api_base: https://openlux.lol/v1
api_key: os.environ/OPENLUX_API_KEY
- model_name: claude-opus-5
litellm_params:
model: openai/claude-opus-5
api_base: https://openlux.lol/v1
api_key: os.environ/OPENLUX_API_KEYTerminal
export OPENLUX_API_KEY="sk-openlux-..."
litellm --config litellm.yaml --port 4000
# in a second terminal
export ANTHROPIC_BASE_URL="http://localhost:4000"
export ANTHROPIC_AUTH_TOKEN="sk-openlux-bridge"
claudeModels that fit Claude Code
Claude Sonnet 4.5
Anthropic · $0.2647 / 1M tokens
Claude Opus 5
Anthropic · $0.4412 / 1M tokens
GPT-6 Astra
OpenAI · $0.3677 / 1M tokens
DeepSeek V4
DeepSeek · $0.0613 / 1M tokens
The full list is in the model catalogue and the use-case collections.
Claude Code + OpenLux questions
Why does Claude Code need a bridge for OpenLux?
Claude Code talks to Anthropic-shaped endpoints, and OpenLux focuses on the OpenAI-compatible API used by most tools. A local LiteLLM hop translates between the two formats; nothing leaves your machine except the model calls themselves.
Which models should I route Claude Code to?
Claude Sonnet 4.5 for day-to-day coding, Claude Opus 5 or GPT-6 Astra for the hardest problems, and DeepSeek V4 or Gemini flash tiers when cost dominates. All of them are mapped in the same config file.
Does streaming still work through the bridge?
Yes. LiteLLM proxies streaming responses, so Claude Code keeps its live output, and the extra local hop adds negligible latency compared with model time.
What does this cost compared with a Claude subscription?
Usage is metered per token at OpenLux rates — Claude Sonnet 4.5 at $0.2647 per 1M tokens, about 91% below official list pricing — so light users pay for what they use instead of rationing a monthly plan.
How much will this cost?
Estimate Claude Code cost
Compare sessions and models, then build a monthly coding-agent budget.
Open the cost guideAdd AI review to the pull-request loop
Build a bounded code reviewer
Use the same OpenAI-compatible endpoint to review pull-request diffs, publish findings and estimate the review budget.
Open the AI code review guideConnect Claude Code to OpenLux today
One key covers every model in this guide and the rest of the catalogue, metered in USD with free trial credit to start.