Claude Code Proxy Setup: Models, Billing and Troubleshooting

TokenDos provides an Anthropic-compatible endpoint at https://api.tokendos.com/anthropic. This guide explains how to connect Claude Code, select a currently listed model and check charges against call records. Model supply, prices and request outcomes change; review the marketplace and public statistics before connecting.

What should you check first?

Check the exact model ID, Anthropic protocol support and available nodes in the marketplace, and the currency and billing unit on the pricing page. For call outcomes, read the sample counts, reporting window and limitations in the public evidence snapshot. A call-log success rate is not an independent uptime measurement or a service commitment.

Configuration steps

Step 1: Get a TokenDos API key

Create a calling key in the dashboard and check your balance and key permissions. Before adding funds, read the balance, refund and support provisions in the public terms (JSON). Keep the key private.

Step 2: Choose a currently available model ID

Copy the ID from the marketplace to replace YOUR_MODEL_ID below. For Claude Opus 5.5, first confirm that claude-opus-5-5 is still listed with Anthropic protocol support; this example does not guarantee continued availability. Display names, aliases and request IDs can differ, so do not infer the ID from a product name.

Step 3: Configure the endpoint, key and model

Install Claude Code first. These commands apply to the current terminal session; replace both placeholders with your own values. For Bash or Zsh on macOS / Linux:

export ANTHROPIC_BASE_URL="https://api.tokendos.com/anthropic"
export ANTHROPIC_API_KEY="YOUR_TOKENDOS_API_KEY"
export ANTHROPIC_MODEL="YOUR_MODEL_ID"

For Windows PowerShell:

$env:ANTHROPIC_BASE_URL="https://api.tokendos.com/anthropic"
$env:ANTHROPIC_API_KEY="YOUR_TOKENDOS_API_KEY"
$env:ANTHROPIC_MODEL="YOUR_MODEL_ID"

If you already use ANTHROPIC_AUTH_TOKEN, Claude configuration files or a provider switcher, check for overrides and use one consistent authentication configuration. See the integration docs for persistent configuration and a settings.json example. With ccswitch or another provider switcher, follow the documentation for your installed version using the same endpoint, key and model ID, then reopen the terminal and check which configuration is active.

See the official Claude Code environment-variable reference for variable meanings and version behavior: ANTHROPIC_API_KEY is sent as X-Api-Key and requires a one-time approval in interactive mode; ANTHROPIC_AUTH_TOKEN uses Bearer authentication. --model or the in-session /model command can override ANTHROPIC_MODEL, so check the model actually used.

Step 4: Launch and check one call

claude

Start with a short request, then check the model, status, token usage and charge in the dashboard. This is a real, billable call. Check tool use and streaming separately with your Claude Code version and target model if you need those features. Never commit your key or include it in logs, screenshots or support tickets.

How are input, output and cache tokens billed?

In Anthropic usage, input_tokens counts non-cached input, output_tokens counts output, cache_read_input_tokens counts cache reads and cache_creation_input_tokens counts cache writes. Output tokens alone do not describe the whole charge.

Convert the component prices for the same actual route to USD / 1M tokens, then use this base-cost formula (multiply a USD / 1K tokens price by 1,000 first):

Base cost (USD) = (non-cached input tokens × input price
  + output tokens × output price
  + cache-read tokens × cache-read price
  + 5-minute cache-write tokens × 5-minute write price
  + 1-hour cache-write tokens × 1-hour write price) / 1,000,000

This formula covers base billing for text tokens; it is a calculation method, not a market quote or measured example. Check separately priced items such as image input and output against the call record and their applicable prices. Cache reads and 5-minute writes without separately configured prices use the ordinary input price as their base; only an explicit zero means that component is free. The 1-hour write tier applies its multiplier to the 5-minute write price. Cache hits and retention depend on the model, node and request. Long-context pricing, service tiers or account discounts can also affect the final charge; check the call record and bill.

Marketplace component minima may come from different nodes and cannot be combined into an actual quote. Compare providers using the same model, workload, cache conditions, currency and unit; convert USD and CNY references first. A published multiplier is not directly a same-currency savings percentage. See the evidence snapshot for the methodology, and the Claude cache billing guide for the per-model multiplier table, a fully hand-computed example and a no-API-call bill-checking checklist.

Troubleshooting order

If you need support, provide the time, model ID, request ID, status code and a redacted error message. Exclude API keys, Authorization headers and sensitive project content. Billing and refund requests are reviewed under the public terms.

Check models and prices before connecting

Get API Key Now