By business need

The tokens you're paying for and not using.

Retries, redundant context, and oversized system prompts quietly inflate every model bill. Optimization is a gateway problem, not a prompt-engineering side project-fix it where every call already passes through.

Why it matters

Most token waste is invisible without call-level visibility

Waste hides inside "normal" traffic

A retry loop or a duplicated context block looks identical to legitimate usage unless you can see inside the call itself.

Redundant context compounds at scale

The same system prompt or reference document sent on every call adds up fast once an agent runs thousands of times a day.

Optimization belongs at the gateway, not per team

Asking every team to hand-tune prompts doesn't scale. Fixing waste at the layer every call already passes through does.

What Lineation does

Waste detection and reduction, built into the gateway

Visibility

Call-level token accounting

Every call is broken into prompt, context, and completion tokens across every connected provider.

Detection

Retry & redundant-context detection

Automatically flag loops, duplicate context, and oversized system prompts as they happen.

Caching

Prompt & context caching

Reuse repeated, scoped context at the gateway instead of resending it on every call.

Routing

Model-routing recommendations

Surface where a cheaper model would do the job just as well, by task complexity.

How it works

Five steps from hidden waste to a lower bill

Capture the breakdown

Every call's prompt, context, and completion tokens are recorded at the gateway.

Flag the waste

Retries, duplicate context, and oversized prompts are surfaced automatically.

Cache repeated context

Static system prompts and reference material are reused instead of resent.

Recommend cheaper models

Low-complexity calls are matched to a lower-cost model under policy.

Track savings

Optimization impact is measured against your own baseline, not a generic benchmark.

FAQ

Common questions

What's the difference between spend control and optimization?

Spend control sets budgets and caps. Optimization reduces the underlying waste-retries, redundant context, oversized prompts-so you spend less to begin with.

How does gateway-level caching work without breaking freshness?

Cached context is scoped and time-bound per workflow, so static material is reused while time-sensitive content is always refetched.

Can this recommend switching models automatically, or just flag it?

Both. Recommendations surface by default, and teams can opt in to automatic routing of low-complexity calls under policy.

Will this reveal that our prompts are inefficient?

Often, yes-call-level accounting breaks down prompt, context, and completion size, which is usually where the biggest savings are found.

Does this work across OpenAI, Claude, Gemini, and Copilot?

Yes. The LLM gateway normalizes every call across providers into one schema, so optimization applies consistently.

How much can we typically expect to save?

It depends on existing redundant context and retry volume, but caching and model routing are usually the two largest levers.

Find the waste already in your model bill.

Call-level visibility usually pays for itself in the first month.