Back to blog

Pointing Claude Code, Codex and Cursor at one gateway

Setup
Time to read: 3 minutes
Published:
Oct 5, 2026
Last updated:
Oct 5, 2026

Authors

Proxen

Find out what your AI bill could drop to

A fair worry about moving your team's AI through a proxy is "will my tools still work?" They will. Every tool on this page accepts a base URL and a key. That is the only thing that changes. This post walks through what a gateway is and what the change looks like in each tool.

What a gateway is

A gateway is a single address that stands between your team's tools and the providers. Tools send their requests to the gateway instead of straight to Anthropic, OpenAI or Google. The gateway checks who is asking, applies the rules you set, forwards the request on your company's own account, and records the result.

This is not a workaround. Anthropic's Claude Code documentation covers the LLM gateway setup directly and describes the model: "the provider key stays server-side; developers hold gateway credentials instead" (Anthropic, Claude Code LLM gateway docs). Proxen is that gateway, built and tuned for each company's setup.

Claude Code

Claude Code reads its API address and credential from environment variables. Set the base URL to your Proxen address and the auth token to the person's Proxen key. That is the whole change. Claude Code officially supports routing through an organization's gateway, so there is nothing unsupported about this configuration.

Everything else, slash commands, project instructions, agent runs, hooks, works as before. The only visible difference for the person is that their requests now count against their own budget, and they can see their own spend.

Codex

Codex, the terminal and editor agent, takes a provider configuration with a base URL and a key. Point the base URL at Proxen and use the person's key. Model names stay the same; the gateway passes them through, and any routing to a cheaper model follows rules you approved. If a model is not on the person's model list, the request is refused at the gateway with a clear message rather than failing somewhere deeper.

Cursor and other editors

Cursor, Cline and most editor assistants have a settings panel for a custom API endpoint and key. Enter the Proxen address and the person's key, pick the models from the list the person is allowed, and carry on. Because Proxen speaks the standard API formats, editors that expect an OpenAI-shaped or Anthropic-shaped endpoint both work.

One practical note: where an editor lets you save several model profiles, save one per model the person uses, all pointed at the same address. Switching models is then a dropdown, and the routing rules your team approved still apply.

SDKs and scripts

Internal scripts and services use the official SDKs, which all accept a base URL override. Set it once in the environment of the service, give the service its own key (a service is a "person" in Proxen terms, with its own budget and model list), and the script runs unchanged.

This is also where batch pricing fits. A nightly job that can wait for its results can use the providers' batch endpoints at the batch rate. It has to be written to submit once and collect results later, and we help you move the right jobs over. For the numbers, see Cutting the AI bill without cutting usage.

What changes and what does not

What changes:

  • One base URL per tool, pointing at Proxen.
  • The bill. Trimming, caching, routing and batch rules cut what the same work costs.
  • One key per person instead of a shared login or a raw provider key.
  • Requests count against a personal budget with a hard cap.
  • A log of who used which model, how many tokens and what it cost.

What does not change:

  • The tools. Same commands, same panels, same shortcuts.
  • The models. Same names. Routing to a cheaper model only happens under rules your team approved, quality is checked on your own work, and the log shows which model answered.
  • The provider accounts, which your company owns and keeps.

We do the first setup with you and keep a per-tool guide in the console. If you want to see the change made live on your own machine, watch the recorded walkthrough or book a call.

Related articles

Offboarding someone who knows the AI password

Blog

Cutting the AI bill without cutting usage

Blog

A key per person: how per-person AI keys work

Blog

Keep your tools. Cut the bill behind them.

Copied to clipboard!