Claude Code
Claude Code speaks Anthropic’s native Messages protocol. JoyToken’s public model endpoint is OpenAI-compatible, so Claude Code needs an Anthropic-to-OpenAI-compatible bridge in front of JoyToken.
What is Claude Code?
Claude Code is Anthropic’s coding agent for terminal and editor workflows. It is designed around Anthropic authentication and Messages API semantics.
With JoyToken, the deployment shape is:
Quick Start
Step 1: Create a JoyToken API key
Create a dedicated key such as dev-claude-code. Use a small development budget while testing the bridge.
Step 2: Run a bridge
The bridge should expose an Anthropic-compatible endpoint locally or inside your private network and forward model calls to JoyToken.
Recommended contract:
Step 3: Configure Claude Code
Point Claude Code at the bridge:
If your Claude Code version requires ANTHROPIC_API_KEY, set it to the same JoyToken key. Do not leave an old Anthropic account session active during testing.
Step 4: Clear old login state
If you previously logged in to Claude Code with Anthropic, run:
Restart Claude Code so it reads the new environment.
Step 5: Verify
Run /status inside Claude Code and confirm the base URL points to your bridge. Then check JoyToken Logs for requests under the dev-claude-code key.
Bridge Requirements
Why use JoyToken with Claude Code?
Centralized budget control
Use a dedicated Claude Code key and apply policy, budget, wallet, and IP checks before requests reach upstream providers.
Usage visibility
Bridge logs plus JoyToken Logs and Usage let teams attribute Claude Code traffic by API key.
Model routing
Map Claude model names to auto during evaluation, or maintain a strict allowlist of JoyToken model keys for production.