Skip to main content

AI Gateway Overview

The AI Gateway is KnoxCall’s AI-native egress proxy. It sits between your applications (or agents) and upstream AI providers, and enforces governance and safety on every call — without your code ever holding a raw provider key. You adopt it with a one-line base-URL swap: point your existing Anthropic or OpenAI SDK at your agent’s gateway URL and use a short-lived KnoxCall phantom token as the API key. Everything else — budgets, PII redaction, the prompt firewall, cost attribution, audit — happens transparently on the wire.

Why it exists

Handing a raw provider key to an application — or worse, to an autonomous agent — means an unscoped, long-lived, un-revocable credential with no per-call governance. The AI Gateway replaces that with a credential and a control plane designed for AI traffic:
  • Your app never holds a provider key. It holds a short-lived, scoped, revocable phantom token. The real provider key lives in a KnoxCall-managed secret, injected by the route at egress.
  • Guardrails run mid-stream, not after the fact. KnoxCall’s PII redaction rewrites sensitive data inside the SSE stream as it flows — before it reaches the client — and can restore it on the response. Most gateways can only log or buffer.
  • Cost is attributable and enforceable. Every call is priced and recorded against a user, team, model, and agent, and budgets can warn or hard-block before overspend.

What you get

Core concepts

  • Gateway — a container for agents, scoped to your tenant. You can have several (e.g. one per product surface).
  • Agent — the addressable unit at /v1/ai/<agent-slug>/…. An agent has a primary route (which upstream provider + injected key), a firewall policy, a PII policy, a budget, and mint-able tokens.
  • Route — a standard KnoxCall route pointing at the provider (e.g. api.anthropic.com), injecting the provider key from a secret. The gateway reuses KnoxCall’s whole proxy substrate — secret injection, sandbox, rate limits, audit.
  • Phantom token — the credential your app sends. Minted for one agent, short-lived, scoped, revocable.

Bring your own Anthropic key

AI features that use Anthropic (including the gateway route KnoxCall provisions for first-party AI) run on your own Anthropic key, configured under Settings → Integrations → Anthropic — never a shared KnoxCall key. See Bring your own key.

Next steps

Quickstart

Swap your base URL and make your first governed call in minutes.

PII redaction

How mid-stream redaction and reversible tokenization work.

Tokens & DPoP

Phantom-token kinds, scoping, and sender-constrained credentials.

Budgets & FinOps

Enforce spend caps and attribute cost by user, team, and model.