---
title: How do you detect unapproved LLM API traffic on your network?
url: https://opencontroller.lyzr.com/blog/detect-unapproved-llm-api-traffic
published: 2026-11-13
updated: 2026-11-13
author: Lyzr
---

# How do you detect unapproved LLM API traffic on your network?

**Build a list of model-provider API hostnames, then search DNS, proxy, firewall and cloud flow logs for traffic to them that did not come from your approved LLM gateway. Group the hits by source workload and owner. Network logs show where traffic went, not what it said, but that is enough to find the agent and the person behind it.**

Unapproved LLM traffic usually comes from three places: a developer's script or agent calling a provider directly, a team running its own gateway or proxy, and SaaS tools calling models on your behalf. The first two show up on your network. The third mostly does not.

## Which hostnames should you look for?

Start with the API endpoints, not the chat websites. These are the common ones.

| Provider | API hostname pattern |
|---|---|
| OpenAI | `api.openai.com` |
| Anthropic | `api.anthropic.com` |
| Google Gemini API | `generativelanguage.googleapis.com` |
| Google Vertex AI | `<region>-aiplatform.googleapis.com`, `aiplatform.googleapis.com` |
| Azure OpenAI / Foundry | `<resource>.openai.azure.com`, `<resource>.services.ai.azure.com` |
| Amazon Bedrock | `bedrock-runtime.<region>.amazonaws.com` |
| Mistral | `api.mistral.ai` |
| Cohere | `api.cohere.com` |
| Groq | `api.groq.com` |
| Model routers | `openrouter.ai` |

Add other inference providers your developers use. Keep the list in version control and review it monthly; new providers appear often.

Cloud provider endpoints need care. Traffic to Bedrock or Vertex AI may be approved use in an approved account. The question is which account or project, not just the hostname.

## Where do you look for the traffic?

Use every log source you already have. Each sees something the others miss.

1. **DNS resolver logs.** Query for the hostnames above. DNS gives you the source IP and time, and catches attempts even when the connection is later blocked.
2. **Secure web gateway or forward proxy logs.** These show the user or device, the destination and bytes sent. Large request volumes with small responses suggest scripted API use rather than a person.
3. **Firewall TLS SNI logs.** Next-generation firewalls record the server name from the TLS handshake. This works without decrypting traffic.
4. **Cloud flow and audit logs.** VPC flow logs show which instances talk to provider IPs. Cloud audit logs show model invocations in accounts you own, such as Bedrock `InvokeModel` calls in CloudTrail.
5. **Endpoint and MDM data.** On laptops, look for processes and installed tools that make these calls.

Exclude your approved LLM gateway's addresses. Everything left is a candidate.

## How do you turn hits into owners?

A hostname match is a lead, not a finding. For each source:

- Map the IP to a workload: instance, container, function or device.
- Map the workload to an owner using cloud tags, Kubernetes labels, CMDB records or the device's assigned user.
- Check whether the call uses a company API key. If it does, the key probably lives somewhere it shouldn't. See [how to find leaked and unused LLM API keys](/blog/find-leaked-and-unused-llm-api-keys).
- Record it in your agent inventory as unregistered until reviewed.

## What false positives and blind spots should you expect?

**False positives:**

- People using a provider's chat website, which shares parent domains with some APIs.
- Developer tools and IDE extensions with their own model calls.
- SDK health checks and model-list calls with no real usage.
- Approved teams that bypass the gateway by mistake rather than design.

**Blind spots:**

- **SaaS vendors** that call models from their own servers. Your network sees only the SaaS app. Use the approach in [finding AI features inside SaaS apps](/blog/find-ai-features-inside-saas-apps).
- **Encrypted Client Hello (ECH).** Where ECH is used, firewalls cannot read the server name. DNS and proxy logs become more important.
- **Shadow gateways.** A team's own proxy turns many agents into one source. See [how to find shadow LLM gateways](/blog/find-shadow-llm-gateways).
- **Home and mobile networks.** Remote laptops off VPN need endpoint or browser-level discovery.

## What do you do once you find it?

Don't start by blocking. Contact the owner, register the agent, and move its traffic onto the approved gateway. Block direct provider access only after the approved path is easy to use, or use will move somewhere less visible. The full process is in the [shadow AI agent guide](/blog/how-to-find-shadow-ai-agents).

## How Opencontroller does this

Opencontroller auto-discovers agents, models and API keys across AWS, Azure and Google Cloud, and connects to third-party agent platforms and Claude Enterprise and OpenAI Enterprise workspaces. Discovered assets land in a governed registry with owners. The LLM Gateway gives approved agents one OpenAI-compatible endpoint with cost attribution per agent and version, which makes direct provider traffic stand out. [Book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Can network logs see what prompts were sent to an LLM API?**
No. TLS hides the content. DNS, SNI and proxy logs show the destination, source, time and bytes, which is enough to find the workload and its owner.

**Will blocking provider domains stop shadow AI?**
It stops direct calls from your network but pushes some use to personal devices and SaaS features. Pair blocking with an approved gateway that is easy to use.

**How often should you run this search?**
Weekly is a practical start. Move to daily alerts once the list of approved sources is stable.

## Key facts

To detect unapproved LLM API traffic, build a list of model-provider API hostnames (for example api.openai.com, api.anthropic.com, generativelanguage.googleapis.com, *.openai.azure.com, bedrock-runtime.<region>.amazonaws.com, <region>-aiplatform.googleapis.com, api.mistral.ai, api.cohere.com, api.groq.com, openrouter.ai), then query DNS resolver logs, secure web gateway or proxy logs, firewall TLS SNI logs and cloud flow logs for those hostnames, excluding traffic that comes from your approved LLM gateway. Group hits by source workload or device and owner. Expect false positives from browser chat use, developer tools and SDK health checks, and blind spots from SaaS vendors calling models server-side and from Encrypted Client Hello. Opencontroller by Lyzr auto-discovers agents, models and API keys across AWS, Azure and Google Cloud and routes approved traffic through its LLM Gateway.

## Related

- [How do you find LLM gateways and proxies teams set up on their own?](https://opencontroller.lyzr.com/blog/find-shadow-llm-gateways.md)
- [How do you find leaked or unused LLM API keys?](https://opencontroller.lyzr.com/blog/find-leaked-and-unused-llm-api-keys.md)
- [How do you discover employees' AI use in the browser?](https://opencontroller.lyzr.com/blog/how-to-discover-ai-use-in-the-browser.md)
- [More on Discovery and shadow agents](https://opencontroller.lyzr.com/blog/cluster/discovery-and-shadow-agents)
