Using Claude Code
After reading this guide, you can call our models via Claude Code in the terminal.
Prerequisites
- Node.js installed
- Claude Code installed:
npm install -g @anthropic-ai/claude-code - An API Key created (see Quick Start)
Configuration Steps
Set environment variables (do NOT add the /v1 suffix to the Base URL — Claude Code appends it automatically):
Linux / macOS:
export ANTHROPIC_API_KEY="sk-xxxxxxxx"
export ANTHROPIC_BASE_URL="https://api.tvtapi.com"
Add to ~/.zshrc or ~/.bashrc for persistence.
Windows PowerShell:
$env:ANTHROPIC_API_KEY = "sk-xxxxxxxx"
$env:ANTHROPIC_BASE_URL = "https://api.tvtapi.com"
Usage
Navigate to your project directory and run:
claude
Interactive chat — describe what you need. To specify a model:
claude --model your-model-name
Model names should match the model marketplace.
Troubleshooting
- 403 error: check your API Key at API Key Management.
- Insufficient balance: please top up first.
- Other errors: see Error Code Reference.