Docs
Claude Code setup
Configure Claude Code to call the Anthropic-compatible 0-0 endpoint.
On this page
Scope
Claude Code
This setup writes Claude Code configuration under ~/.claude. The API key stays in a local helper script, while settings.json points Claude Code to the configured gateway.Base URL
Claude Code uses ANTHROPIC_BASE_URL without /v1. This page derives it from PUBLIC_API_BASE_URL by removing a trailing /v1 when present.
1) Overwrite ~/.claude/settings.json
Run the command below to overwrite ~/.claude/settings.json:
bash
1mkdir -p ~/.claude2cat > ~/.claude/settings.json <<'JSON'3{4 "apiKeyHelper": "~/.claude/anthropic_key.sh",5 "env": {6 "DISABLE_TELEMETRY": "1",7 "OTEL_METRICS_EXPORTER": "otlp",8 "ANTHROPIC_BASE_URL": "https://api.0-0.pro",9 "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",10 "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"11 },12 "includeCoAuthoredBy": false13}14JSON2) Update ~/.claude/anthropic_key.sh
Replace sk-xxx with your own 0-0 key, then write the helper script:
bash
1mkdir -p ~/.claude2cat > ~/.claude/anthropic_key.sh <<'SH'3#!/bin/sh4echo "sk-xxx"5SH6chmod 700 ~/.claude/anthropic_key.sh3) Restart Claude Code
Restart Claude Code after both files are saved. Send a test prompt, then open Logs to confirm the request is recorded.
Troubleshooting
- If requests still go to the official endpoint, confirm Claude Code is reading
~/.claude/settings.jsonand restart it again. - If authentication fails, make sure
~/.claude/anthropic_key.shprints only the API key.