Gateway

One endpoint in place of your provider's. Change one line, keep your code, and let each call go to a model that is adequate rather than maximal.

The Gateway is the only part of Operant your code touches. It speaks the Anthropic and OpenAI wire protocols, so the integration is an environment variable:

ANTHROPIC_BASE_URL=https://app.operantlabs.com
OPENAI_BASE_URL=https://app.operantlabs.com/v1

Your agent, your SDK and your framework are unchanged.

Your keys stay yours

You store your provider credentials in the console. The Gateway strips the Operant key off an incoming call, injects your provider key, and stamps the call against the key it arrived on. Your relationship with Anthropic or OpenAI is unchanged, and their invoice still comes to you.

What it decides

  • Which model answers. Planning and reasoning are not classification. Paying reasoning prices for a summarisation call is the most common waste we see.
  • Whether switching is worth it. Moving between models breaks the KV cache, and a cache miss can cost more than the cheaper model saves. The Gateway accounts for that rather than routing naively.
  • What context to send. Tool-heavy workflows accumulate context that no longer earns its tokens. Compression is KV-compatible, so it reduces the prompt without throwing away the cache.

Two consequences follow, and they are stated in the Terms: the model that answers may not be the model you named, and the context a provider receives may not be byte-identical to the context you sent. Those are the mechanisms. Where a workload needs an exact model or an untouched prompt, configure it that way.

What each decision cost, and what it would have cost otherwise, lands in the Ledger.

Copyright © 2026 Operant