Skip to content

Gateways

Register an endpoint, a key, and a model catalog, then bind any client to it.

Updated View as Markdown

A gateway is an API profile: an endpoint, a credential, and optionally a list of models. There is no login flow and no local process — the client talks to the remote endpoint directly.

Add one

anypick add gateway openrouter-work \
  --provider openrouter \
  --endpoint https://openrouter.ai/api/v1 \
  --api-key "$OPENROUTER_API_KEY" \
  --model anthropic/claude-sonnet-4 \
  --models anthropic/claude-sonnet-4 openai/gpt-5.6-sol google/gemini-3.1-pro

anypick use claude --with openrouter-work
anypick run claude
Flag Meaning
--provider <id> Which catalog shape the endpoint follows
--endpoint <url> Base URL
--api-key <key> Key stored in the AnyPick database
--api-key-env <var> Read the key from an environment variable at activation instead of storing it
--model <id> Default model for this gateway
--models <id...> Models to expose in the client’s own model picker

Catalog providers: anthropic, openai, openrouter, grok-api, litellm, local, custom.

Gateway or proxy?

Both are sources, and both end the same way — use <client> --with <source>. They differ in what stands behind them.

Proxy (account) Gateway (API profile)
Auth Native login snapshot, plus a local process Endpoint + key held by AnyPick
Setup Log in with the provider CLI, then snapshot Paste an endpoint and a key
Models Discovered from the running proxy Gateway defaults, or per binding
Where requests go 127.0.0.1:<port> → upstream Straight to the endpoint

Reach for a gateway when you hold a key. Reach for an account when you hold a subscription.

Models in the client’s picker

For Codex, --models writes a managed model catalog so exactly those ids show up under /model. Set the default with --model; it becomes the model the client starts on.

Account proxies do not need this — AnyPick reads their live /v1/models catalog whenever it activates the client.

Managing gateways

anypick gateway list
anypick gateway show openrouter-work
anypick gateway edit openrouter-work -m anthropic/claude-sonnet-4
anypick gateway edit openrouter-work --endpoint https://…  --api-key "$NEW_KEY"
anypick gateway remove old-gateway -y

show masks the key. Pass the global --reveal flag to print it, which is exactly as dangerous as it sounds.

Bindings are snapshots, so editing a gateway does not retroactively change a client that is already bound to it. Re-run use to pick up the new endpoint or model.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close