Skip to main content

AI Border Gateway capabilities

The full capability reference for AI Border Gateway.

Cortega configures every policy from the management console; you never hand-edit gateway config directly. This page is the reference for what AI Border Gateway does on every request.

For how to set these up, see the Guides. For the product overview, see AI Border Gateway.

Authentication: who is calling

Every request is tied to an identity before anything else runs.

  • API keys. Cortega issues keys scoped to a team or an application. Each key carries its team and tenant, so usage, cost, and policy all resolve from the key.
  • JWT / bearer tokens. Cortega validates tokens from your identity provider (JWKS, issuer, audience). Claims in the token map to a Cortega team.
  • OIDC browser login. For the browser-facing surfaces, sign in through your identity provider.
  • Basic auth. Username and password for simple internal callers, mapped to a team.
  • MCP OAuth. For MCP clients, Cortega acts as an OAuth resource server: it validates tokens, serves the protected-resource metadata MCP clients discover, and works with Auth0, Keycloak, and Authentik.
  • Multiple methods at once. When more than one method applies to a route, Cortega also enforces an "any valid identity" check, so a forged token that resolves to no identity is rejected.

Authorization: what the caller may do

  • MCP tool governance. Grant a team access to specific MCP servers, and within a server to specific tools. Checked on every tools/call, and the tool list a client sees is filtered to what it may use. If a server has no policy, it is denied (fail closed).
  • Model access. A team only reaches the models it is authorized for; Cortega rewrites the request to the team's routing target.

Routing

  • Providers and models. Register any number of LLM providers and models. A request names a model; Cortega resolves it to a configured model.
  • Virtual models. Publish one model name and route it across several real models by weight, by failover priority, or by a condition on the request.
  • Health-based failover. AI Border Gateway tracks each model's errors and latency and stops routing to a model that is failing or slow until it recovers.
  • Same-request retry. A failed call retries against a configured set of retryable status codes, with backoff, before the caller sees an error.
  • Model aliasing. Present a clean model name to callers while the upstream name and provider prefix are handled behind the scenes.

LLM API surface

AI Border Gateway speaks the major LLM wire formats, so existing SDKs work unchanged:

  • OpenAI Chat Completions and Responses
  • Anthropic Messages
  • Native Gemini (generateContent)
  • Embeddings, rerank, realtime, and the Anthropic token-count endpoint, per provider

Guardrails

Guardrails run on the request before it leaves Cortega and on the response before it returns to the caller. Apply them globally or bind them to a specific key, model, MCP server, or MCP tool.

  • Regex and built-in PII detectors. SSN, credit card, phone, email, and more, plus your own patterns; block or mask.
  • Presidio PII. Entity detection with a score threshold, and anonymization or masking.
  • Provider safety services. OpenAI moderation, Azure AI Content Safety, Google Model Armor, and AWS Bedrock Guardrails, called out per binding.
  • Custom webhook. Send request/response content to your own policy service.
  • Multi-layer. Run several checks in sequence for defense in depth.
  • MCP guardrails. Scan the arguments a tool is called with and the content it returns.

Cost controls

  • Cost catalog. A price per model and token type, refreshed on a schedule, with your own overrides.
  • Team budgets. A dollar budget per team, enforced before a call is allowed through, so an over-budget team gets a clear error, not a surprise invoice.
  • Provider budgets. When a provider's monthly budget is exhausted, Cortega stops routing to it.
  • Invoice-grade attribution. Every request is logged with its team, identity, key, application, model, provider, token counts, and cost, so spend breaks down by any of those.

Rate limiting

  • A requests-per-second limit per gateway instance.

Observability

  • Metrics. A Prometheus endpoint on every gateway instance.
  • Full traffic log. Every LLM and MCP call, including calls Cortega blocks, is logged the same way into one observability view, with token counts, cost, latency, identity, and the matched guardrail.
  • Prompt and response capture. Optionally record full prompt and completion content, including tool calls and reasoning, for audit.

Delivery and reliability

  • Configuration is delivered to each gateway instance and applied locally, so AI Border Gateway keeps serving traffic from its last-delivered configuration even if the control plane is briefly unreachable.
  • Run more than one gateway instance, optionally behind a load balancer.
  • Configuration changes hot-reload without dropping in-flight requests.

Pass-through credentials

For providers that require it, a caller can supply its own upstream credential on the request. Cortega swaps it into the provider-native header and never forwards the Cortega header upstream. See the pass-through routing guide.

On behalf of a user (MCP)

For MCP servers, Cortega can exchange the caller's token for a backend-scoped token (OAuth token exchange, RFC 8693) or perform a Cross App Access (ID-JAG) exchange, so a tool is called as the end user without a separate interactive login. Also supported: static keys, and cloud workload identity for AWS, GCP, Azure, and GitHub Copilot.