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.
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 job, if you sent a correlation header.
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.