Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Claude Code Setup

Connect Claude Code to LLMAPI, with current setup instructions for Windows, macOS and Linux.

Check your Base URL and generate settings · Full Claude Code guide · 中文接入工具

Choose how to set up

  • Use the browser tool: check the URL and copy shell or PowerShell settings without entering a key or signing up. The check runs locally and does not test connectivity or account access.
  • Configure manually: follow the examples below if Claude Code is already installed.
  • Use the installer: the scripts in this repository are small launchers for the maintained installer on llmapi.pro. Review the script before running it; it can install software and change local configuration.

LLMAPI is an independent service. Create an account and check the current billing options and model access before making API requests. Creating a key does not imply free inference or access to every model.

Manual setup

Use the key issued for your LLMAPI account. Replace the placeholder locally; do not commit a real credential.

macOS / Linux

export ANTHROPIC_BASE_URL="https://llmapi.pro"
export ANTHROPIC_AUTH_TOKEN="YOUR_LLMAPI_KEY"
claude

Windows PowerShell

$env:ANTHROPIC_BASE_URL = "https://llmapi.pro"
$env:ANTHROPIC_AUTH_TOKEN = "YOUR_LLMAPI_KEY"
claude

These examples configure the current terminal and the programs launched from it. If an IDE runs in a different environment, configure that environment too.

For a persistent, non-secret base URL on Windows:

setx ANTHROPIC_BASE_URL "https://llmapi.pro"

Open a new terminal after setx. Follow the current client guide for credential persistence, model selection and client-specific settings.

Installer entry points

Windows PowerShell:

irm https://llmapi.pro/setup.ps1 | iex

macOS / Linux:

curl -fsSL https://llmapi.pro/setup.sh | bash

To inspect them first, open setup.ps1 or setup.sh. The downloaded installer can change independently of this repository, so the one-click setup documentation is the current reference for its behavior.

Base URL versus endpoint

Configuration LLMAPI address
Claude Code base URL https://llmapi.pro
OpenAI-compatible client base URL https://llmapi.pro/v1
Direct Anthropic HTTP request https://llmapi.pro/v1/messages

Do not copy a complete request endpoint into a client's Base URL field. Other services can use different prefixes; follow their own documentation.

Troubleshooting

Result What to check
401 Credential belongs to the correct service and is active
404 Protocol and final request path, including extra or missing /v1
403 / 429 Account access, quota and concurrency limits; avoid rapid retries
5xx / connection failure Timestamp, request ID and redacted error; follow the troubleshooting guide

Detailed troubleshooting · Base URL explanation

When asking for help, include your operating system, client version, public base URL and redacted error. Never paste a credential, full environment dump or authorization header into an issue.

Changing a base URL does not change the credential's issuer. To switch services, update both the endpoint and the relevant authentication settings, then restart the client.

Other clients

Use the client integration directory for Cursor, Cline, Roo Code, Cherry Studio, Chatbox and SDK instructions. Each guide documents its protocol, settings and model selection. This repository does not promise that every client feature works with every model.

License and affiliation

MIT — see LICENSE.

LLMAPI and this repository are independent of Anthropic. Claude Code is Anthropic's product; its name is used to identify the client configured by these instructions.

About

One-line installer and setup guide for Claude Code CLI with the LLM API Claude-compatible relay

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages