Skip to content
Sign Up Free
Coding and development

Connect T3 Code to BetterToken

Connect T3 Code to BetterToken through Claude Code. Set the Base URL, BetterToken API Key, and Model ID in a separate provider configuration.

Connect T3 Code to BetterToken through Claude Code using Anthropic Messages. Add a separate configuration to keep your existing Claude Code sign-in.

Key settings

FieldValue
API KeyANTHROPIC_AUTH_TOKEN: Your BetterToken API Key, marked Sensitive
Base URLANTHROPIC_BASE_URL: https://bettertoken.ai (without /v1)
Modelmodel plaza

Prerequisites

Install

Download T3 Code. Install Claude Code on the machine running the T3 Code environment. For a remote environment, install it on the server.

Manual setup

  1. Open Settings → Providers and select the environment. Add a separate Claude instance named BetterToken.
  2. Set CLAUDE_CONFIG_DIR path to a new folder, such as ~/.claude-bettertoken on macOS or Linux. If T3 Code cannot find claude, set Binary path to its location.
  3. Under Environment variables, set ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN as shown in the table. Add ANTHROPIC_API_KEY with an empty value. Save the configuration.
  4. If the model is missing, open the BetterToken instance settings. Select Add custom model and enter the exact Model ID.

Verify the connection

Open a new chat and select a model from the BetterToken instance. Send Reply with only: OK. Check the BetterToken request history for the selected Model ID.

Switch models

Choose another model from the BetterToken instance.

Common errors

  • 401: Check the BetterToken API Key in ANTHROPIC_AUTH_TOKEN. Keep ANTHROPIC_API_KEY empty.
  • 404: Set the Base URL without /v1. Claude Code adds /v1/messages.

Technical details

If you use OpenCode from T3 Code, configure BetterToken in OpenCode. The T3 Code Server URL field takes the OpenCode server address.

T3 Code documentation for Claude