Unofficial OAuth session support for Claude, OpenAI, and Gemini models via CLIProxyAPI.
This package extends OpenRouter.jl to route requests through CLIProxyAPI, a local proxy that provides API endpoints using OAuth authentication from your existing subscriptions.
using Pkg
Pkg.add(url="https://github.com/sixzero/OpenRouterCLIProxyAPI.jl")- Install (or update) CLIProxyAPI:
Re-run the same command to upgrade to the latest version (config is preserved). After upgrading, restart the service:
curl -fsSL https://raw.githubusercontent.com/brokechubb/cliproxyapi-installer/refs/heads/master/cliproxyapi-installer | bashsystemctl --user restart cliproxyapi.service
- Authenticate with your provider (Claude, OpenAI, Gemini, etc.)
using OpenRouter
using OpenRouterCLIProxyAPI
# One-time setup (registers provider + injects endpoints)
setup_cli_proxy!()
response = aigen("Hello!", "cli_proxy_api:anthropic/claude-opus-4.6")setup_cli_proxy!(
base_url = "http://localhost:8317/v1",
api_key_env_var = "CLIPROXYAPI_API_KEY",
provider_name = "cli_proxy_api",
mutate = false # true = overwrite existing endpoints
)~/cliproxyapi/cli-proxy-api --version 2>&1 | head -1# Re-run installer (preserves config, upgrades binary)
curl -fsSL https://raw.githubusercontent.com/brokechubb/cliproxyapi-installer/refs/heads/master/cliproxyapi-installer | bash
# Then restart
systemctl --user restart cliproxyapi.servicesystemctl --user restart cliproxyapi.service
systemctl --user status cliproxyapi.serviceNote: Models are hardcoded in the binary — new models only appear after updating to a release that includes them. Models also only show if your logged-in account has access.
Anthropic: claude-opus-4.6, claude-sonnet-4.6, claude-opus-4.5, claude-sonnet-4.5, claude-haiku-4.5, claude-opus-4.1, claude-sonnet-4
OpenAI: gpt-5.4, gpt-5.3-codex, gpt-5.3-codex-spark, gpt-5.2-codex, and older models