Documentation menu
DEVELOPER DOCUMENTATION

Configure a gateway for Claude Code

Plan native Anthropic Messages gateway settings and check for conflicting credentials.

Confirm the native protocol and configuration scope

Website under maintenance. This is a planned setup guide: api.ubtl.net is a planned domain, no real API test has been performed, and connectivity is unverified. Obtain explicit confirmation of the Anthropic Messages protocol, authentication method, paths, and model identifiers before use.

This gateway configuration requires a native Anthropic Messages interface, not an OpenAI chat endpoint. Close existing sessions, record the relevant environment-variable names, and back up any settings file you intend to change. The examples use one terminal session for isolation. If you instead configure env in ~/.claude/settings.json, account for its effect on CLI background sessions rather than assuming it only affects the visible terminal.

Set the root URL and one credential type

Set ANTHROPIC_BASE_URL to the planned root https://api.ubtl.net, not /v1/chat/completions. These examples choose ANTHROPIC_AUTH_TOKEN and clear ANTHROPIC_API_KEY in the current session to avoid conflicting credential types. If the service explicitly requires x-api-key authentication instead, use ANTHROPIC_API_KEY and clear the token. Setting both is not a compatibility workaround.

Preserve access to your original credentials securely before using either shell example. These commands change the current process environment; they neither install the tool nor demonstrate connectivity. Leave YOUR_UBTL_API_KEY as a placeholder until an authorized key is available, and never paste a real value into shared conversations, project settings, or issue reports.

Planned Bash configuration · bash
unset ANTHROPIC_API_KEY
export ANTHROPIC_BASE_URL='https://api.ubtl.net'
export ANTHROPIC_AUTH_TOKEN='YOUR_UBTL_API_KEY'
claude
Planned PowerShell configuration · powershell
Remove-Item Env:ANTHROPIC_API_KEY -ErrorAction SilentlyContinue
$env:ANTHROPIC_BASE_URL = 'https://api.ubtl.net'
$env:ANTHROPIC_AUTH_TOKEN = 'YOUR_UBTL_API_KEY'
claude

Inspect status before a minimal request

Restart Claude Code in the same terminal and use /status to inspect the gateway base and credential type; this does not prove subscription status or UBTL availability. Once the service is confirmed available, use /model to select an authorized model, replacing YOUR_MODEL_ID only where the workflow accepts the confirmed identifier. Start with a small test containing no private files. For authentication failures, check conflicting credentials; for path errors, check the root and Messages support; for model errors, check permissions. Restore the backup and remove added variables when switching back.