Proxy Mode

Use Gkitens as a local API server for other tools.

Use a BlockRun API key for account billing: account setup guide. Register at user.blockrun.ai, create a key and add credits. Account mode needs no payment wallet; wallet billing supports Solana first, then Base.

What Is Proxy Mode?

Proxy mode starts a local API server that is compatible with the Anthropic API format. Any tool that can talk to Claude's API can be pointed at Gkitens instead, giving it access to all 70+ models through a single endpoint.

Starting the Proxy

Launch the proxy server on port 8402:

bash
gkitens proxy

The server starts and listens on http://localhost:8402. It accepts standard Anthropic API requests and routes them through Gkitens's model router.

Using with Claude Code

Point Claude Code at Gkitens's proxy to route all requests through your Gkitens wallet:

bash
# Set the base URL to Gkitens's proxy
export ANTHROPIC_BASE_URL=http://localhost:8402

# Now start Claude Code as usual
claude

All models, one endpoint

With proxy mode, Claude Code can access not just Anthropic models but any of Gkitens's 70+ models. Use model aliases in your requests and Gkitens resolves them automatically.

Model Alias Resolution

Any full model id (provider/model) in a request passes through unchanged. Bare model names, such as Claude Code's native ids, are replaced with the session's current model. To switch it, send a use <shortcut> message:

bash
# Full model ids pass through unchanged:
anthropic/claude-opus-5.5
openai/gpt-6-sol
xai/grok-4.7

# Shortcuts resolve in a "use <shortcut>" message:
use sonnet      → anthropic/claude-sonnet-5
use gpt         → openai/gpt-5.6-sol
use gemini      → google/gemini-3.1-pro

If a model is unavailable, the proxy automatically falls back to the next best option in the same tier — no errors, no manual switching.

Background Daemon

Run the proxy as a background daemon so it persists across terminal sessions:

bash
# Start the daemon
gkitens daemon start

# Check if it's running
gkitens daemon status

# Stop the daemon
gkitens daemon stop

Daemon auto-restarts

The daemon automatically restarts if it crashes. It writes logs to ~/.blockrun/daemon.log for debugging.

Fallback Chain

When a model request fails (rate limit, outage, or timeout), the proxy tries the next model in the fallback chain for that tier. This happens transparently — the calling tool receives a successful response from the fallback model without needing to retry.