LLM proxy
Change a base URL and every model call is priced and recorded.
The proxy forwards your request to the provider and hands you back the provider's own response. It does not rewrite your payload, does not change the shape of the reply, and does not sit on the stream — streaming works as it does directly.
Everything after the provider name is passed through as the upstream path. Whatever your SDK calls, including endpoints released after this page was written, works without us adding support for it.
Providers
openai→ api.openai.comanthropic→ api.anthropic.comgoogle(aliasgemini) → generativelanguage.googleapis.comxai(aliasgrok) → api.x.aibedrock→ AWS, which authenticates differently; see below.groq→ api.groq.comtogether→ api.together.xyzmistral→ api.mistral.aifireworks→ api.fireworks.aideepseek→ api.deepseek.comperplexity→ api.perplexity.aicerebras→ api.cerebras.aiopenrouter→ openrouter.ai/apideepinfra→ api.deepinfra.comnovita→ api.novita.ai
OpenRouter is the one provider whose cost we do not calculate. It is the merchant of record — it buys the inference and bills you — so its response carries usage.cost, what the call actually cost rather than a published rate multiplied by a token count. Navige records that figure as it stands, marked reported rather than computed, and applies no price of its own. It needs no catalogue entry, no daily cost sync and no invoice to check it against, and it works on a model nothing has ever listed a price for. OpenRouter sends it by default, so no change to your request is needed — which also means it works on routes where Navige is forbidden from touching the request body, Claude Code among them.
Nine of these — groq, together, mistral, fireworks, deepseek, perplexity, cerebras, deepinfra and novita — speak the OpenAI wire format, so an OpenAI SDK pointed at /proxy/<name>/v1 works unchanged. They are measured, not reconciled: Navige records what every call cost from the published per-token price, and the cost-sync adapters that compare our figure against a provider invoice exist only for Anthropic, OpenAI, Google, Bedrock and xAI, because only those five publish a cost API. A model whose price two hosts disagree about is shown with its real token counts and no cost, rather than one host's price applied to another host's calls.
An unknown provider name is a 404 rather than an open redirect to wherever the path pointed.
Credentials
Two keys travel with the request and they never share a header.
- Your provider key goes where that provider's SDK already puts it —
Authorization: Bearerfor OpenAI and xAI,x-api-keyfor Anthropic,x-goog-api-keyfor Google. It is forwarded untouched and never stored. - Your Navige key goes in
x-navige-key.
Authorization belongs to the provider. A Navige key there would both fail to authenticate and push your Navige credential at OpenAI. The dedicated header exists so the two cannot collide.Examples
OpenAI
client = OpenAI(
base_url="https://api.navige.ai/proxy/openai/v1",
api_key=OPENAI_API_KEY,
default_headers={"x-navige-key": NAVIGE_KEY},
)Anthropic
client = Anthropic(
base_url="https://api.navige.ai/proxy/anthropic",
api_key=ANTHROPIC_API_KEY,
default_headers={"x-navige-key": NAVIGE_KEY},
)Gemini
curl "https://api.navige.ai/proxy/google/v1beta/models/gemini-3-pro:generateContent" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "x-navige-key: $NAVIGE_KEY" \
-H "Content-Type: application/json" \
-d '{"contents":[{"parts":[{"text":"ping"}]}]}'Bedrock
AWS signs requests rather than carrying a bearer token, so Bedrock is configured from the console — you give Navige a role to assume, under an external id it generates, and nothing of yours is held as a long-lived secret.
The OpenAI-shaped endpoints
There are also /v1/chat/completions and /v1/messages at the root, for clients that will not let you put a path segment in the base URL. They behave the same; the provider is inferred from the request.
What gets recorded
- Model, token counts in and out, and cached input counted separately from fresh.
- Cost at that model's rate, or unknown if we have no price for it. Never zero.
- Latency, and whether the upstream call failed.
- The task, if you sent a correlation header.
Claude Code
Claude Code is a first-class caller on this route, and it behaves differently enough from everything else here to be worth its own section.
Connecting it
Fastest: run navige connect (see Quickstart). It signs you in through the browser, writes the block below for you with a key you never see, and adds a hook that checks every tool call Claude Code makes. To do it by hand instead:
It also puts a line at the foot of Claude Code — Navige · saved $0.42 today · 12 model calls · 30 tool checks — so you see what Navige did without opening the console. “Saved” is measured savings only. A status line you set up yourself is left alone; --no-statusline skips it.
Put an env block in ~/.claude/settings.json — %USERPROFILE%\.claude\settings.json on Windows. Both the CLI and the desktop app read it, and it survives closing the terminal:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.navige.ai/proxy/anthropic",
"ANTHROPIC_CUSTOM_HEADERS": "x-navige-key: nv_YOUR_KEY"
}
}If the file already exists, add the env block rather than replacing the file.
A single throwaway session
Exported variables reach the CLI in that one terminal and nothing else — not a second window, not the desktop app, and not the same window tomorrow. They are the reason a setup that worked yesterday is gone today, with no symptom except a dashboard that stopped filling up. Use them only when you mean exactly that one session.
export ANTHROPIC_BASE_URL="https://api.navige.ai/proxy/anthropic"
export ANTHROPIC_CUSTOM_HEADERS="x-navige-key: nv_YOUR_KEY"export in a profile will quietly override this file. And the block may not load on the very first launch after you add it — start it twice before concluding it did not work.What Claude Code gets, and what it does not
Claude Code sends its capability headers and body fields as matched pairs. Navige does not rewrite them, so context trimming, the output ceiling and prompt caching are always off when it identifies Claude Code. Model routing does reach it, through Route Claude Code too on the Model routing page, which is on by default and works in per-call mode; untick it to keep every Claude Code call on its own model. Routing then checks each call first and keeps it on your model if it carries anything a cheaper model might not accept: a beta header not on our tested list, a body field we do not recognise, earlier thinking written by a different model, or a server tool. When a call does move, the model name changes, and on simple work Navige may also switch the cheaper model's thinking off.
What still applies, and why each one needs no body edit:
- Measurement, per session and per subagent. Claude Code sends no standard correlation headers, so without this its spend is invisible. Navige reads its session id, and its agent and request-class headers where present, so a session shows up as real tasks rather than a wall of calls.
- Spend caps and the kill switch, on every tier including the free one. These are checked before the body is looked at, so they apply here exactly as everywhere else.
- The loop guard. Stopping a runaway means refusing to forward, which is not a body edit — so it works on this route. The same call with the same newest message, six times running, is stopped. A retry burst or a short poll only notifies.
On a Claude plan, and past it
Signed in with a Pro or Max plan, Claude Code's calls are covered by the plan, so Navige shows them as plan usage, not spend. Once the plan's limit is reached and the session carries on using extra usage you bought, those calls are billed per token: Navige counts them as spend, at API rates, in your Spend pages, budgets and spend cap. It tells the two apart from the plan-limit headers Anthropic sends on each answer. Those headers are not officially documented, so a call is counted as extra usage only when they clearly say the plan's limit was reached and extra usage paid for the answer.
The richer attribution headers — request class, agent type — need Claude Code v2.1.273 with CLAUDE_CODE_GATEWAY_HINT_HEADERS=1. The session id is always sent, so basic attribution works on any version.
/mcp and it gets tool governance, result caching and caps — but its model call happens inside Anthropic's own subscription, so there is no per-token measurement. The two are almost opposites: Claude Code gets the controls and, if you switch it on, routing. Claude Desktop gets the tool-side savings. Its local tool servers can stay where they are: navige connect puts Navige in front of each one.Large requests
The body limit is well above the Fastify default, which used to cap long-context agents at 1 MiB. A full-context coding agent passes through fine.