TL;DR: AI gateways place a control layer between applications and LLM providers to handle routing, fallback, authentication, cost control and observability, reducing provider lock-in, runaway spend and key sprawl, according to Tetrate. The governance shift is from treating model calls as simple API traffic to managing them as policy-enforced, auditable infrastructure.
At a glance
What this is: Tetrate frames the AI gateway as the missing control plane for LLM traffic, combining routing, fallback, authentication, cost controls and observability into one layer.
Why it matters: For IAM, PAM and NHI teams, the key issue is that model access, API keys and usage policy move from scattered application code into a governed control point that can be audited and constrained.
Context
LLM applications often start with direct provider keys in application code, but that pattern breaks down quickly once routing, reliability, cost attribution and access control become operational concerns. An AI gateway is the policy layer that sits between apps and model providers, turning model calls into a governed service rather than a raw API dependency.
That matters because the failure modes are not abstract. Key leakage, cost overruns, provider outages and weak visibility all emerge when teams treat model traffic like ordinary web traffic. In identity terms, the gateway becomes the place where non-human access to AI services can be centralized, scoped and observed.
Key questions
Q: How should security teams govern LLM API keys in production applications?
A: Treat LLM API keys like other high-value non-human credentials: keep them out of application code, scope them to the smallest viable service boundary, and route usage through a single control point. That makes revocation, logging and policy enforcement practical when a key leaks or a service is compromised.
Q: Why do direct model integrations create more operational risk than a governed gateway?
A: Direct integrations spread routing logic, credentials and cost decisions across many code paths. That increases outage impact, weakens visibility and makes rotation and policy changes slow. A governed gateway concentrates those decisions into one layer, which is easier to audit, constrain and recover when a provider fails.
Q: What are the signs that AI tool usage is outside governance?
A: Look for repeated calls to AI endpoints from unmanaged devices, local processes tied to MCP servers, newly active OAuth tokens, and browser or desktop extensions that have not been reviewed. Those signals show the tool is not just installed, but actively moving data through a path security teams may not know exists.
Q: Should teams use a gateway or a reverse proxy for LLM traffic?
A: Use a gateway when the problem includes model selection, token-aware billing, prompt inspection, fallback logic and identity-aware logging. A reverse proxy can move packets, but it does not understand the operational and governance requirements that make AI traffic different from ordinary HTTP traffic.
Technical breakdown
How AI gateways route requests across models
An AI gateway inspects each request and decides which model should handle it based on policy, latency, capability, token cost or request type. This is more than load balancing because the selection logic can change dynamically without altering application code. In practice, it lets teams route simple interactions to cheaper models while reserving expensive or higher-context models for tasks that need them. The architecture also reduces lock-in because model choice moves from code into centralized policy.
Practical implication: treat model selection as governed policy, not application logic.
Why fallback and circuit breaking matter for LLM reliability
LLM providers can fail, slow down or rate-limit just like any other external dependency, but the operational impact is higher because AI features are often user-facing and synchronous. An AI gateway can detect unhealthy providers, retry intelligently and shift traffic to an alternate model without exposing the failure to the application. This is essentially circuit breaking adapted for probabilistic, streamed AI traffic, where the control point must understand provider health, request context and service continuity requirements.
Practical implication: design fallback chains before production traffic depends on a single model provider.
How centralized authentication and key management changes NHI risk
AI gateways reduce the number of places where raw provider secrets live. Instead of distributing multiple LLM API keys across services, environment files and CI/CD systems, the application authenticates to the gateway and the gateway holds the upstream credentials. That pattern changes the NHI risk profile because the exposed credential surface shrinks, rotation becomes centralized and upstream access can be constrained without touching every consumer. It also creates a natural audit boundary for non-human access to AI services. Read the Ultimate Guide to NHIs: What are Non-Human Identities.
Practical implication: consolidate provider secrets behind one governed non-human identity boundary.
Threat narrative
Attacker objective: The attacker wants to abuse exposed AI provider credentials to consume services, disrupt operations or gain unauthorized access to model traffic.
- Entry occurs when developers embed provider API keys directly into application code, .env files or CI/CD secrets.
- Credential exposure then gives attackers a reusable path into AI provider accounts or related upstream services.
- Impact follows in the form of account abuse, unexpected spend, service disruption or unauthorized model access.
Breaches seen in the wild
- Hugging Face Spaces breach 2024: Unauthorised access to Hugging Face Spaces may have exposed secrets users stored for AI apps; tokens were revoked and org tokens removed.
- Dropbox Sign breach 2024: A compromised back-end service account gave attackers Dropbox Sign customer data, including API keys, OAuth tokens and MFA information.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
AI gateways are becoming the governance boundary for model access, not just a traffic utility. The article's central point is that LLM traffic creates routing, reliability, cost and security demands that a simple reverse proxy cannot satisfy. That matters because once model calls become business-critical, the organisation needs a policy layer that can enforce who may call what, how much they may consume and what gets logged.
Model credentials are now a non-human identity problem, not only an application security problem. The article repeatedly shows that raw provider keys scattered across code, CI/CD and environment files create a broad credential surface. That is a classic NHI governance issue because the real control question is not only whether a secret exists, but whether its use is centralized, bounded and revocable through a single control point. API key management belongs in the same governance conversation.
Token-level observability is a control requirement when AI systems create financial and security exposure at runtime. When the organisation cannot tie requests to tenants, users or features, it cannot govern abuse, attribute spend or detect anomalous usage patterns. The broader market implication is that AI operations are converging with identity governance and auditability, not drifting away from them.
AI gateway control plane: the category is moving from infrastructure convenience to identity, policy and accountability enforcement. That shift means practitioners should evaluate gateways for enforcement boundaries, audit data and credential containment rather than just compatibility. Teams that treat the gateway as a strategic governance layer will have more leverage over model sprawl and upstream access risk.
Gateway-centralized credential control is a practical answer to LLMjacking-style abuse. The article shows why provider keys embedded in multiple systems create needless exposure and slow revocation. Centralizing those credentials behind one runtime layer narrows the blast radius and gives security teams a single place to watch, rotate and disable access.
From our research library:
- AI-related credential leaks surged 81.5% year-over-year in 2025, with the surrounding AI infrastructure leaking 5x faster than core LLM providers, according to the State of Secrets Sprawl 2026.
- Read next: API Key Management Guide
What this signals
AI gateways are becoming the control point where identity governance meets model operations. As teams move from direct provider calls to mediated access, the question changes from whether a model can answer a prompt to whether the organisation can prove who used which model, under what policy and at what cost.
Gateway-centralized access reduces the hidden credential surface that now surrounds LLM deployments. The same pattern appears across AI infrastructure, where raw keys, tokens and ad hoc service access create avoidable exposure. A governed entry point is the practical way to keep non-human access auditable as the stack expands.
LLM governance is shifting from static configuration to runtime control. The important signals are not just outages or spend spikes, but whether your team can change routing, revoke access and enforce policy without code redeployments.
For practitioners
- Centralize upstream model credentials Move provider API keys out of application code, .env files and CI/CD secrets, and terminate external model access through one governed gateway identity.
- Define fallback chains for critical AI features Set explicit primary and secondary model paths for user-facing workflows so provider outages or rate limits do not become application outages.
- Require token-level audit logging Log prompt, completion, tenant and user context for every production model call so spend, abuse and policy violations can be traced. See the LLM Provider API Key Security and LLMjacking Guide.
- Enforce policy at the gateway layer Apply prompt inspection, redaction and request blocking before traffic reaches the model provider, rather than relying on model-side safety alone.
- Inventory every raw provider dependency Map where your codebase still calls LLM providers directly, then remove each direct path in favour of a single controlled entry point.
Key takeaways
- LLM gateway architectures matter because they consolidate routing, fallback, authentication and observability into one policy layer instead of scattering those decisions across application code.
- The security issue is not only provider outage or cost drift. It is also the way raw AI credentials and usage decisions expand the non-human identity surface across a stack.
- Teams should evaluate gateways on governance depth, credential containment and auditability, because those are the controls that change how AI traffic can be managed in production.
Related NHI Mgmt Group resources: API Key Management Guide · LLM Provider API Key Security and LLMjacking Guide · AI Infrastructure Workload Identity Guide · Shadow AI and AI Agent Discovery Guide
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 addresses the attack and risk surface, while NIST SP 800-53 Rev 5 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | The article's repeated risk is exposed provider keys in code, .env files and CI/CD. |
| NHI-07 — Long-Lived Secrets | The post argues for replacing scattered raw keys with centrally governed gateway credentials. | |
| NHI-04 — Insecure Authentication | Gateway-mediated authentication is positioned as the safer way to access multiple AI providers. | |
| Recommendation — Scan for exposed AI provider secrets and revoke any leaked credentials immediately. Shorten AI provider credential lifetime and centralize rotation behind one controlled entry point. Replace direct provider authentication paths with a single governed authentication layer. | ||
| NIST SP 800-53 Rev 5 | IA-5 — Authenticator Management | The article focuses on rotation, revocation and control of provider credentials. |
| Recommendation — Apply IA-5 to manage AI provider authenticators centrally and revoke compromised keys fast. | ||
| NIST CSF 2.0 | PR.AA-05 — Access Permissions, Entitlements and Authorizations | The gateway is framed as the place to constrain and observe non-human model access. |
| Recommendation — Use PR.AA-05 to scope model access, enforce authorization and reduce unnecessary entitlement spread. | ||
Key terms
- AI Gateway: A control point that sits between AI applications and the models, tools, or data they call. In practice, it can authenticate requests, enforce policy, inspect runtime behaviour, and stop unsafe actions before they spread into connected systems.
- LLMjacking: Abuse of cloud AI services through stolen machine credentials rather than human user accounts. The attacker uses valid non-human identities such as API keys or tokens to enumerate model access, invoke endpoints, and create cost, data, or policy exposure under the victim's tenancy.
- Sequence-Level Observability: Sequence-level observability means tracing every step in an agent workflow, including tool calls, memory access, and sub-agent handoffs. It is needed because many agent attacks only become visible when individual benign-looking steps are analysed as a complete chain.
- Non-Human Identity (NHI): A digital identity assigned to a non-human entity such as a software application, service account, API key, bot, machine, or AI agent that enables it to authenticate and interact with systems without direct human involvement. NHIs now outnumber human identities in most enterprises by 25 to 50 times.
Deepen your knowledge
NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security and secrets management. It helps practitioners connect identity controls to the operational realities of modern AI and cloud programmes.
Published by the NHIMG editorial team on October 22, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org