Proxy Mode

Use Franklin as a local API server for other tools.

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 Franklin instead, giving it access to all 55+ models through a single endpoint.

Starting the Proxy

Launch the proxy server on port 8402:

bash
franklin proxy

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

Using with Claude Code

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

bash
# Set the base URL to Franklin'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 Franklin's 55+ models. Use model aliases in your requests and Franklin resolves them automatically.

Model Alias Resolution

The proxy resolves model aliases to their full identifiers. You can use short names in API requests:

bash
# These all work as model names in API requests:
claude-sonnet   → anthropic/claude-sonnet-4.6
gpt-5           → openai/gpt-5
gemini-pro      → google/gemini-2.5-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
franklin daemon start

# Check if it's running
franklin daemon status

# Stop the daemon
franklin 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.