claude-code-no-kyc-setup · EN · 2026-10-05

Wire Claude Code to a No-KYC, USDC-Paid Endpoint on macOS, Linux and Windows

Set up Claude Code to use a single API endpoint that accepts USDC on Base with no KYC. The guide covers environment variables and config files on macOS, Linux, and Windows, and explains how prepaid credits and transparent pricing work.

Why Use a Custom Endpoint for Claude Code?

Claude Code normally authenticates with a provider account that may require identity verification. If you prefer to pay with USDC and avoid KYC, you can point Claude Code at a compatible API endpoint that accepts crypto top-ups.

How the USDC Prepaid Model Works

The aggregator gives you one API key that works with many models, including Claude, GPT, DeepSeek, Qwen, GLM, and Kimi. You top up with USDC on Base (no KYC), and your balance is drawn down as you use the API.

Pricing is transparent: you pay the official model price multiplied by 1.3. If you contribute keys, you are credited at official price multiplied by 1.1 (or 1.2 for premium keys) in USDC. This is not a net cost reduction to a small fraction of official price; it is a straightforward markup with a contributor credit.

Claude Code Configuration Basics

Claude Code reads settings from environment variables and optional config files. The exact variable names and file locations depend on your Claude Code version, so verify with the official Claude Code documentation and your provider's setup page.

At a high level, you need to:

  • Set the API base URL to the aggregator endpoint.
  • Set the API key to your aggregator key.
  • Optionally set a default model identifier.

macOS Setup

Environment Variables

Add exports to your shell profile (~/.zshrc or ~/.bash_profile):

export ANTHROPIC_BASE_URL="https://your-aggregator-endpoint"
export ANTHROPIC_API_KEY="your-aggregator-key"
# Optional: set a default model
export ANTHROPIC_MODEL="claude-3-5-sonnet"

Reload with source ~/.zshrc or open a new terminal.

Config File

If Claude Code supports a JSON or YAML config file on macOS, place it in the standard location (often under ~/.config/claude-code/ or similar). Example structure:

{
  "apiBaseUrl": "https://your-aggregator-endpoint",
  "apiKey": "your-aggregator-key",
  "model": "claude-3-5-sonnet"
}

Check your Claude Code version for the exact path and keys.

Linux Setup

Environment Variables

Add the same exports to ~/.bashrc or ~/.profile:

export ANTHROPIC_BASE_URL="https://your-aggregator-endpoint"
export ANTHROPIC_API_KEY="your-aggregator-key"

Then run source ~/.bashrc.

Systemd or Service Config

If you run Claude Code as a service, set these variables in the unit file or an environment file:

[Service]
Environment="ANTHROPIC_BASE_URL=https://your-aggregator-endpoint"
Environment="ANTHROPIC_API_KEY=your-aggregator-key"

Windows Setup

Environment Variables (GUI)

  1. Open System Properties > Advanced > Environment Variables.
  2. Add new user variables:
  • ANTHROPICBASEURL = https://your-aggregator-endpoint
  • ANTHROPICAPIKEY = your-aggregator-key
  1. Restart your terminal.

PowerShell

Set variables for the current session:

$env:ANTHROPIC_BASE_URL = "https://your-aggregator-endpoint"
$env:ANTHROPIC_API_KEY = "your-aggregator-key"

Or persist them:

[System.Environment]::SetEnvironmentVariable('ANTHROPIC_BASE_URL', 'https://your-aggregator-endpoint', 'User')
[System.Environment]::SetEnvironmentVariable('ANTHROPIC_API_KEY', 'your-aggregator-key', 'User')

Config File

If Claude Code uses a config file on Windows, it may live under %APPDATA%\claude-code\ or a similar path. Use the same JSON structure as above.

Testing Your Setup

After configuring, run a simple Claude Code command that makes an API call. If you see model responses, your endpoint and key are working. If you get authentication errors, double-check the base URL and API key. If you get model errors, confirm the model name is supported by the aggregator.

Monitoring Usage and Balance

Keep an eye on your USDC balance in the aggregator dashboard. Usage is billed at the official price times 1.3, so your balance will decrease as you use the API. There are no surprise fees, but you should top up before you run out.

Security Notes

Treat your API key like a password. Do not commit it to version control. Use environment variables or a secrets manager. On shared machines, be aware that environment variables can be visible to other users in some configurations.

Troubleshooting

  • Connection refused: Check the base URL for typos and ensure it starts with https://.
  • 401 Unauthorized: Your API key is invalid or missing. Regenerate it in the aggregator dashboard.
  • 404 Not Found: The base URL may need a path suffix (e.g., /v1). Check the aggregator's documentation.
  • Model not found: The model identifier may be incorrect or not offered by the aggregator. Use the exact name from their model list.

Summary

You can use Claude Code with a no-KYC, USDC-paid endpoint by setting environment variables or config files on macOS, Linux, and Windows. The aggregator provides one key for many models, with clear pricing: you pay official price times 1.3, and contributors are credited at official price times 1.1 or 1.2 in USDC. Always verify variable names and config paths with your Claude Code version and the aggregator's own setup guide.