CLI setup guides

Point command-line AI coding tools at any API in a few steps. Copy, paste, replace the placeholders with your own key and endpoint, done.

The 3 things every tool needs

API key

A secret token that proves who you are and gets billed. Keep it private, never commit it to git.

Base URL

The endpoint the tool talks to. Change it to route through a cheaper provider instead of the default.

Model name

Which model to run, exactly as your provider names it, e.g. the model id shown on its pricing page.

Match the endpoint format to the tool. Codex CLI, Aider, opencode and Qwen Code take an OpenAI-compatible endpoint directly. Claude Code uses the Anthropic format, so point ANTHROPIC_BASE_URL at an Anthropic-compatible endpoint or a converter. Gemini CLI is Google-native.

Pick a cheaper model or provider first, then plug its key and endpoint into the steps above. Compare prices