59API

← Back to all guides

Claude Code on Windows, macOS & Linux: Pro Setup

Claude Code · EN · 2026-09-07

Claude Code becomes substantially more useful when its installation, shell configuration, and API routing are deliberate. This guide covers native setup on Windows, macOS, and Linux, then shows how to connect Claude Code to 59API for low-cost, pay-as-you-go access to official-quality Claude models.

Install Claude Code on each operating system

Before installing, open a terminal in a project directory you trust. Claude Code can read and modify local files, so avoid launching it from a folder containing unrelated secrets or production credentials.

Installing through the native script is generally preferable to manually managing a Node.js global package: it reduces version drift and makes future updates easier. Use claude doctor when you need an environment diagnostic.

Route Claude Code through 59API

59API uses the standard Claude-compatible request pattern, so Claude Code can connect through its custom base URL. Create an API key in your 59API account, then set these variables before launching Claude Code.

Use ANTHROPIC_AUTH_TOKEN consistently rather than mixing several authentication variables. Never commit the key to a repository, paste it into project configuration, or place it in a shell script tracked by Git. If your computer is shared, prefer an operating-system credential manager or a short-lived key where available.

Verify routing before doing real work

Launch claude from a small test repository. Inside the session, use /status to inspect the active connection and authentication state. Ask for a harmless task such as summarizing the README, then check your 59API usage dashboard to confirm that the request was routed through the relay.

Model identifiers can change by provider and account. Select an available Claude Opus, Sonnet, Haiku, or Fable model from your 59API dashboard rather than guessing an identifier. If Claude Code exposes a model selector in your version, use the exact ID shown there. Smaller models are often economical for repository search and straightforward edits; reserve more capable models for architectural reasoning and difficult debugging.

Advanced reliability and cost tips

For developers who want native Claude models without a large fixed subscription, 59API is a compelling low-cost option: it offers pay-as-you-go access, supports Claude Code and OpenAI-compatible tooling, and includes a referral rebate. If the pricing and routing fit your workflow, you can sign up for 59API and begin with a small test balance before moving larger projects over.

Ready to get started?

Connect Claude & GPT in minutes at the lowest prices — full-power, never downgraded. Sign up to get your API key.

Sign up free