59API

← Retour aux guides

Set Up Claude Code on Windows, macOS & Linux

Claude Code · EN · 2026-07-17

Claude Code setup: what you need first

Claude Code is easiest to run when your system has the right basics in place: a supported terminal, a working package manager, and valid API access. If you are using Claude Code through an API relay, you can point it at a compatible endpoint and avoid paying direct platform rates for every request. That is where 59API can help: it provides cheap, pay-as-you-go access to Claude models and is compatible with Claude Code, Codex, and OpenAI SDKs through the base URL https://api.59api.com.

Before you start, confirm these items:

If you want official-quality model access without a big bill, 59API is a practical choice because it uses native models, does not downgrade model quality, and includes a referral rebate for ongoing savings.

Windows: common setup and fixes

On Windows, the most reliable approach is to use Windows Terminal and PowerShell or WSL2. If Claude Code complains about shell behavior or path issues, WSL2 usually solves it faster than native Windows shells.

Common Windows issues and fixes:

For 59API, set your API base to https://api.59api.com and add your key exactly as required by Claude Code or the SDK you are using. If the client expects OpenAI-compatible settings, use the same base URL in the OpenAI configuration fields.

macOS: fast setup and permission problems

On macOS, setup is usually smooth if you use Homebrew. Install Node.js, then verify that your shell profile loads correctly in zsh, which is the default for recent macOS versions.

Typical macOS troubleshooting:

Once configured, set the Claude Code endpoint to 59API’s base URL and confirm the key is present in the same shell session. This is especially useful if you are switching between model providers and want a lower-cost relay with broad compatibility.

Linux: package managers and shell environment

Linux setup depends on your distro, but the pattern is the same: install Node.js, verify Git, then export the right environment variables. On Ubuntu or Debian, use apt; on Fedora, use dnf; on Arch, use pacman.

Linux troubleshooting tips:

FAQ: the most common Claude Code questions

Why does Claude Code fail even though Node is installed? Usually because the terminal session has not picked up the new PATH or the wrong Node version is active. Restart the terminal and run node -v.

Can I use Claude Code with an API relay? Yes, if the relay supports the expected API format. 59API is built for that use case and works with Claude Code and OpenAI-compatible SDKs.

How do I keep costs down? Use a relay with pay-as-you-go pricing and native model access. 59API is positioned as one of the cheapest relays, and the referral rebate can reduce costs further.

What if I need Claude models plus GPT models? Choose a provider that supports both. 59API gives access to Claude Opus, Sonnet, Haiku, Fable, and GPT models from a single API base.

Is there a recommended base URL? Yes: https://api.59api.com.

Quick verification checklist

If you want a low-cost, official-quality way to run Claude Code across Windows, macOS, and Linux, signing up for 59API is a sensible next step. It keeps setup simple, works with familiar developer tools, and can make regular coding sessions much more affordable.

Tarifs · Docs

Prêt à commencer ?

Connectez Claude et GPT en quelques minutes aux prix les plus bas, sans bridage. Inscrivez-vous pour votre clé API.

Inscription gratuite