Token Kiosk
Integrations

Claude Code CLI

Route Anthropic's Claude Code CLI tool through Token Kiosk using OpenAI-compatible environment variables.

Anthropic's official CLI agent, Claude Code, can be configured to target custom inference endpoints. You can run Claude Code powered by Token Kiosk credits without needing an Anthropic API organization or direct credit card on file.

Environment Variables

Claude Code respects OpenAI-compatible endpoint overrides via environment variables. Add the following to your shell profile (~/.zshrc or ~/.bashrc):

export OPENAI_BASE_URL="https://api-token-kiosk.gaib.ai/v1"
export OPENAI_API_KEY="sk-your-token-kiosk-api-key"

Then reload your shell:

source ~/.zshrc

Running Claude Code

Launch Claude Code pointing at your desired model:

claude --model claude-3-7-sonnet

Or target the balanced autonomous router tier:

claude --model auto

Features & Parameters

  • Tool Calling: Claude Code file reads, shell command execution, and subagent delegation work unchanged through the Token Kiosk gateway.
  • Credit Reservation: Long multi-turn agent sessions reserve budget per step and reconcile actual tokens, protecting your wallet from unexpected runaway loops.

On this page