Claude Code
Overview
Anthropic's terminal coding agent. It reads ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN, so an OpenAI-compatible gateway needs a translating proxy in between. LIBRA currently exposes only the OpenAI-style /v1/chat/completions; use it through Claude Code with claude-code-router or another Anthropic-to-OpenAI bridge.
You need a LIBRA API key (libra_sk_...) from the console (API keys > Create key), and the base URL https://<your-host>/v1.
Installation
npm install -g @anthropic-ai/claude-codenpm install -g @musistudio/claude-code-router(bridge)
Configure LIBRA
~/.claude-code-router/config.json:
{
"Providers": [{
"name": "libra",
"api_base_url": "https://<your-host>/v1/chat/completions",
"api_key": "libra_sk_...",
"models": ["libra/smart", "asix-deepseek-v4/deepseek-v4-flash"]
}],
"Router": { "default": "libra,libra/smart" }
}
Quick start (up and running in 5 minutes)
- Save the config above.
ccr codestarts Claude Code through the router.- Ask "Siapa kamu?" - the reply comes from LIBRA. Check Usage in the console.
FAQ
- 404 / timeout? The base URL is missing
/v1or has an extra/chat/completions. Use exactlyhttps://<your-host>/v1. - Model not found? Model ids are case-sensitive and must match the console Models page, e.g.
libra/smartorasix-deepseek-v4/deepseek-v4-flash. - 401? The key is wrong, disabled or expired. 402? Your organization balance is Rp 0; see Credits.
- 403
model_not_allowed? The key's guardrails block that model. Ask your workspace Admin or pick another model.