What is an LLM proxy? (and when you actually want one)

A plain-English answer, an honest checklist for whether you need one, and where PromptCrunch fits next to routing gateways like OpenRouter, LiteLLM, and Portkey.

What an LLM proxy actually is

An LLM proxy sits between your application and the provider's API, Anthropic, OpenAI, or others. Your code calls the proxy exactly the way it would call the provider directly: same request shape, same response shape. The proxy forwards the call on, and hands back the provider's response.

Because every request already passes through that one point, it's a natural place to add anything that cuts across your whole LLM traffic without touching application code: cost visibility, per-client spend limits, caching, routing between models, logging, retries. You get the feature by pointing at the proxy, not by rewriting how you call the model.

The application-side change is usually small: swap the SDK's base_url, add one auth header. Your prompts, your model choice, and your response handling don't have to change.

When you actually want one, and when you don't

Honestly: a proxy is one more thing in your request path. It should earn its place.

Get a proxy

You're past the prototype stage and the traffic is real.
  • Production LLM traffic. Not a weekend prototype, an app with real usage where the provider bill is a line item someone watches.
  • You need spend visibility. Seeing cost by model, by day, by customer, without building and maintaining that tracking yourself.
  • You need per-client or per-key budgets. So one runaway integration, bot, or customer can't blow the whole bill before anyone notices.
  • Your conversations get long. Re-sending the whole history on every call is the thing actually driving cost, and it's worth shrinking rather than just watching.

Skip it, for now

The provider SDK, called directly, is enough.
  • Single low-volume app. Calling the provider SDK directly is simpler, and it's one less thing in the request path to reason about.
  • Pre-product-market-fit. The operational overhead of routing traffic through anything extra usually isn't worth it yet.
  • Short or heavily cached prompts. If there isn't much history being re-sent, there isn't much left to compress or route around.
  • You just need one provider's caching. If cache_control already covers your workload, that's built in and free to adopt.

Routing gateways vs compression: different axis, same request path

Routing gateways like OpenRouter, LiteLLM, and Portkey optimize which model or provider a request goes to: unified access across many models, failover when one provider is down, picking the cheapest model that clears a quality bar. That's a genuinely useful, genuinely different problem from ours.

PromptCrunch optimizes what you send. It doesn't pick your model or your provider. It compresses the conversation history in a request before forwarding it, and it shows and caps what you're actually spending. If your bill problem is "conversations keep growing and I keep re-paying for the same history," routing to a different model doesn't fix that; a smaller history does.

Our honest take

These tools are complementary, not competitors, and we'd rather say that plainly than pretend otherwise. If you mainly need multi-provider routing, model fallback, or the ability to try five models through one API, use a routing gateway; that's their whole job, and it's not ours. If your bill pain is long conversations getting expensive because the history keeps growing, that's what PromptCrunch is built for. Nothing stops you running both: pick a provider with a gateway, then shrink what you send once you've picked one.

PromptCrunch vs OpenRouter vs LiteLLM vs Portkey

A short, honest rundown. Where we weren't confident about a specific detail, we described it generically rather than guess.

Tool Primary job Open source Hosted Best for
PromptCrunch Compress conversation history, plus cost visibility and spend caps No Yes (hosted; a self-hosted build is available on the Enterprise plan) Long, prose-heavy conversations where the token count itself is the cost driver
OpenRouter Route requests across many model providers behind one API No Yes (hosted service) Trying and switching between many models or providers quickly
LiteLLM Route and normalize calls across providers behind one interface Yes, the core library/proxy is open source Optional, self-host it or use a hosted option Teams that want multi-provider routing under their own infrastructure
Portkey Gateway for routing plus observability and access control across providers Has an open-source gateway component Yes Teams wanting a managed gateway with observability across providers

None of these tools compete on the same axis as PromptCrunch: they route requests, we shrink them. Feature sets change; this reflects our understanding as of July 2026. If something above looks wrong, tell us: [email protected].

The 2-line integration

Point your SDK's base_url at PromptCrunch, add one header with your PromptCrunch key. Everything else, models, streaming, tool calls, stays exactly as it was.

import anthropic

client = anthropic.Anthropic(
    api_key="your-anthropic-key",
    base_url="https://api.promptcrunch.dev",
    default_headers={
        "X-PromptCrunch-Key": "pc_live_...",
    },
)

response = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello!"}],
)
from openai import OpenAI

client = OpenAI(
    api_key="your-openai-key",
    base_url="https://api.promptcrunch.dev/v1",
    default_headers={
        "X-PromptCrunch-Key": "pc_live_...",
    },
)

response = client.chat.completions.create(
    model="gpt-5.5",
    messages=[{"role": "user", "content": "Hello!"}],
)

Full reference, including cURL and streaming examples: API docs.

LLM proxy FAQ

Is an LLM proxy safe to put in front of production traffic?

It depends on the proxy. Check three things: does it store your provider keys (it shouldn't, they should pass through unstored), does it log request bodies by default (ask for a zero-retention or no-log mode if you handle sensitive data), and can you self-host it if you can't accept a third party in the request path at all.

PromptCrunch never stores your provider keys, offers zero-retention mode on paid plans, and ships a self-hosted build for teams that need the proxy inside their own infrastructure.

Does an LLM proxy add latency?

Yes, some. Routing through an extra hop adds network latency, and a proxy that processes the request, like PromptCrunch's compression step, adds a small amount of processing time on top of that. In practice this is usually milliseconds, not something end users notice, but measure it on your own traffic and geography rather than take a vendor's word for it.

Does it work with streaming and tool calls?

If the proxy is genuinely API-compatible, yes. PromptCrunch mirrors the Anthropic and OpenAI APIs, so streaming responses, tool and function calling, and vision inputs pass through exactly as they would calling the provider directly. That compatibility is also the test to apply to any proxy: if you have to change your request-handling code beyond the base_url and one header, it isn't really a drop-in.

OpenRouter vs PromptCrunch: which one do I need?

Different jobs. OpenRouter and gateways like it help you pick and switch between models and providers through one API. PromptCrunch doesn't touch which model you call; it shrinks what you send on long conversations and shows and caps what you're spending.

If your problem is trying several models without several SDKs, that's a routing gateway. If your problem is a bill that keeps growing because conversations keep getting longer, that's compression. Nothing stops you running both.

Try it on your own traffic

$5 free credit. No card. Two-line integration, shown above.

Try it free Estimate your savings Claude API pricing