← ALL DEVELOPER GUIDES
CLAUDE CODE SETUP

Configure Claude Code to use the CheapClankers API

Claude Code can use a custom Anthropic-compatible endpoint. Configure the API key and base URL in your shell, then select a CheapClankers model whose catalogue entry supports Messages. This is metered developer API access, not a Claude Pro or Claude Code subscription.

Updated

1. Create a key and select a Messages model

Create and verify your CheapClankers developer account and create an API key in the dashboard. Choose a currently enabled Claude model that lists Messages support. Model availability and exact IDs can change; check the live Claude catalogue and the model list returned for your key.

Install Claude Code using Anthropic's current installation instructions before configuring the endpoint. Do not put the key in a repository file or share it in a terminal recording.

2. Set endpoint, credentials and model

Run Claude Code from a shell where these environment variables are set. Use the API host without a trailing /v1: Claude Code adds the Messages API path itself. The selected model must support Messages on CheapClankers.

Shell
export CLANKER_API_KEY="your_key_here"
export ANTHROPIC_API_KEY="$CLANKER_API_KEY"
export ANTHROPIC_BASE_URL="https://api.cheapclankers.com"
export ANTHROPIC_MODEL="your_enabled_messages_model_id"

claude
  • Keep the key in the shell environment or a secure local secret manager; do not commit it.
  • Use the model ID shown for your key and check that Messages is listed as a supported protocol.
  • Requests consume prepaid USD credit at the model's published rates.

3. Confirm setup and diagnose errors

Start with a small prompt such as 'Reply with hello; do not edit files or run commands.' Expect a short reply, then confirm the model and request in dashboard usage history. Messages support alone does not guarantee every Claude Code tool or feature works with a given upstream model; verify the features you need before starting a larger task.

If authentication fails, confirm the key is active and the environment variables are present in the same shell that launches Claude Code. Existing ANTHROPIC_AUTH_TOKEN settings or organization-managed settings may override the intended credentials. If the model is unavailable, choose another enabled model that supports Messages. The commands above use Bash or zsh; in PowerShell set each variable with $env:NAME = "value".

Claude Code's support for custom endpoints and model overrides can change. Refer to Anthropic's current third-party integration and model configuration documentation if your installed version uses different environment settings. For a request error, retain its request ID and check usage history before retrying.

Official tool documentation

These examples describe the endpoint configuration. Review current SDK or tool requirements before installing; live inference and tool support depend on the selected model.

Next steps

Claude model and protocol list · Published rates and credit packs · API documentation

More tutorials: Use an OpenAI-compatible API in a Next.js Route Handler · Add CheapClankers as a LibreChat custom endpoint · Use the OpenAI Node SDK with a custom API base URL · Use the OpenAI Python SDK with a custom API base URL · Codex CLI setup

New to the service? Create a developer account and review the current model access and rates before adding credit.