# What is ACOG?

> ACOG is a gateway in front of the AI providers you already use. It lowers what you pay for every request without changing the model or the answer.

Product: AI Cost Optimizer Gateway (ACOG). Web version: https://tessarac.com/docs/acog/get-started/overview. Last updated: 2026-10-16.

The AI Cost Optimizer Gateway (ACOG) sits between your applications and the AI providers you already pay for: Anthropic, OpenAI, Google Vertex AI, AWS Bedrock, Azure OpenAI and any OpenAI-compatible server you run. You point your SDK, coding assistant or script at one URL. ACOG forwards each request to your provider using your own provider account, and lowers the cost of the request on the way through.

ACOG is **bring your own key (BYOK)**. You keep your provider accounts, your contracts and your model access. ACOG never resells provider capacity and never holds a shared provider key. Every request is sent with credentials your organization owns, or, for Google Vertex AI and Anthropic, with no stored credential at all (see [Keyless connections](https://tessarac.com/docs/acog/providers/keyless-connections.md)).

## What ACOG does for each request

| Step | What happens |
|---|---|
| Authenticate | ACOG reads your gateway key (`acog_…`), finds your organization and checks the key's permissions and IP allowlist. |
| Govern | Your model access rules, budgets, rate limits, data loss prevention (DLP) rules and prompt injection screening are applied before anything leaves. |
| Route | The `model` in the request selects which of your provider connections serves it. `model: "auto"` lets ACOG pick the cheapest model strong enough for the request. |
| Save | Repeated requests are answered from cache, identical concurrent requests share one upstream call, your provider's own prompt caching is switched on, and requests nobody is waiting for can run at batch prices. |
| Measure | Every request records what it cost and what the same request would have cost sent directly, so the saving is visible per request, model, user and application. |

## What ACOG never does

- **It never swaps a model you asked for to save money.** A request for `claude-sonnet-4-5` is answered by `claude-sonnet-4-5`. Only `model: "auto"`, which you opt into per request, lets ACOG choose. The one exception is a safety refusal: when a provider's classifier refuses a harmless request, ACOG retries it once on a fallback model and says so in the answer (see [Routing and failover](https://tessarac.com/docs/acog/providers/routing-and-failover.md#policy-block-fallback)); send `x-acog-policy-fallback: off` to opt out.
- **It never rewrites your words.** Prompt cleanup touches whitespace and invisible characters only. Cached answers are served only for identical requests, or, with the semantic cache, for prompts that are near-identical and answered by an equally capable model.
- **It never sees your provider bill.** Savings are measured from the token counts your provider reports and published list prices, and can be checked request by request against your provider invoices.

## Two ways to run it

| | Hosted | Self-hosted |
|---|---|---|
| Where it runs | Tessarac operates it at `https://acog.tessarac.com` | Your Kubernetes cluster (or virtual machines) |
| Sign-in | Tessarac's sign-in, plus your own single sign-on | Passwords, two-factor authentication, passkeys and your own single sign-on |
| How you pay | A share of measured savings, invoiced monthly | An annual licence |
| Data | Requests pass through Tessarac's hosted service, which runs on AWS | Nothing leaves your environment except calls to your providers and the services you configure |

The product, the API and these docs are the same for both. Pages that apply to only one say so. Self-hosting starts at [Self-hosted overview](https://tessarac.com/docs/acog/self-hosted/overview.md).

## Where to go next

- [Quickstart](https://tessarac.com/docs/acog/get-started/quickstart.md): connect a provider, create a key and make your first request.
- [How ACOG saves money](https://tessarac.com/docs/acog/get-started/how-acog-saves-money.md): every saving mechanism, what it costs you and when it applies.
- [Key concepts](https://tessarac.com/docs/acog/get-started/key-concepts.md): organizations, connections, models, keys and applications.
- [Use ACOG with coding tools](https://tessarac.com/docs/acog/get-started/coding-tools.md): Claude Code, Cursor, VS Code and Zed.
