# Manage and Secure AI Traffic

API7 AI Gateway is the AI traffic management layer of API7 Gateway. It provides a unified control point between your applications and LLM providers, enabling platform engineers to centralize authentication, enforce guardrails, control costs, and gain observability across all AI traffic — without modifying application code.

This document provides an overview of AI Gateway capabilities, architecture, and supported providers.

## Architecture[​](#architecture "Direct link to Architecture")

AI Gateway runs as a set of plugins on the API7 Data Plane, configured through the Control Plane. Requests flow through a processing pipeline before reaching the LLM provider:

<!-- -->

<br />

The pipeline stages correspond to AI plugins running on the Data Plane. Each stage is optional — configure only what you need.

## Key Capabilities[​](#key-capabilities "Direct link to Key Capabilities")

| Capability                   | Description                                                                                                                                   | Plugin                                                                                                                                                                                                                                             |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **LLM Proxying**             | Unified API to [8+ providers](https://docs.api7.ai/api7-gateway/ai-gateway/llm-providers/openai.md), including any OpenAI-compatible endpoint | [`ai-proxy`](https://docs.api7.ai/hub/ai-proxy.md)                                                                                                                                                                                                 |
| **Multi-Model Routing**      | Load balancing, failover, health checks, and priority-based routing across models and providers                                               | [`ai-proxy-multi`](https://docs.api7.ai/hub/ai-proxy-multi.md)                                                                                                                                                                                     |
| **Protocol Conversion**      | Anthropic to OpenAI protocol translation with automatic response conversion, transparent to clients                                           | [`ai-proxy`](https://docs.api7.ai/hub/ai-proxy.md)                                                                                                                                                                                                 |
| **Prompt Engineering**       | Reusable templates and system prompt injection at the gateway layer                                                                           | [`ai-prompt-decorator`](https://docs.api7.ai/hub/ai-prompt-decorator.md), [`ai-prompt-template`](https://docs.api7.ai/hub/ai-prompt-template.md)                                                                                                   |
| **Content Guardrails**       | PCRE-based prompt filtering and external toxicity detection                                                                                   | [`ai-prompt-guard`](https://docs.api7.ai/hub/ai-prompt-guard.md), [`ai-aws-content-moderation`](https://docs.api7.ai/hub/ai-aws-content-moderation.md), [`ai-aliyun-content-moderation`](https://docs.api7.ai/hub/ai-aliyun-content-moderation.md) |
| **PII Redaction**            | Mask sensitive data in prompts before they reach LLM providers                                                                                | [`ai-request-rewrite`](https://docs.api7.ai/hub/ai-request-rewrite.md)                                                                                                                                                                             |
| **Token Rate Limiting**      | Budget control per consumer, route, or model instance based on token counts                                                                   | [`ai-rate-limiting`](https://docs.api7.ai/hub/ai-rate-limiting.md)                                                                                                                                                                                 |
| **RAG Integration**          | Retrieval-Augmented Generation with Azure AI Search and Azure OpenAI embeddings                                                               | [`ai-rag`](https://docs.api7.ai/hub/ai-rag.md)                                                                                                                                                                                                     |
| **AI-Driven Transformation** | Intelligent request rewriting powered by an LLM                                                                                               | [`ai-request-rewrite`](https://docs.api7.ai/hub/ai-request-rewrite.md)                                                                                                                                                                             |
| **AI Observability**         | Built-in logging (summaries and payloads) and Prometheus metrics for token accounting                                                         | [`ai-proxy`](https://docs.api7.ai/hub/ai-proxy.md)                                                                                                                                                                                                 |
| **MCP Gateway**              | Expose OpenAPI services as MCP tools for AI agents                                                                                            | [`openapi-to-mcp`](https://docs.api7.ai/hub/openapi-to-mcp.md)                                                                                                                                                                                     |

## Supported LLM Providers[​](#supported-llm-providers "Direct link to Supported LLM Providers")

API7 AI Gateway supports the following LLM providers with dedicated driver implementations:

| Provider          | Provider Key        | Guide                                                                                                                |
| ----------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------- |
| OpenAI            | `openai`            | [Route Traffic to OpenAI](https://docs.api7.ai/api7-gateway/ai-gateway/llm-providers/openai.md)                      |
| Azure OpenAI      | `azure-openai`      | [Integrate Azure OpenAI](https://docs.api7.ai/api7-gateway/ai-gateway/llm-providers/azure-openai.md)                 |
| Anthropic         | `anthropic`         | [Connect to Anthropic Claude](https://docs.api7.ai/api7-gateway/ai-gateway/llm-providers/anthropic.md)               |
| DeepSeek          | `deepseek`          | [Route Traffic to DeepSeek](https://docs.api7.ai/api7-gateway/ai-gateway/llm-providers/deepseek.md)                  |
| Google Gemini     | `gemini`            | [Integrate Google Gemini](https://docs.api7.ai/api7-gateway/ai-gateway/llm-providers/google-gemini.md)               |
| Vertex AI         | `vertex-ai`         | [Route Traffic to Vertex AI](https://docs.api7.ai/api7-gateway/ai-gateway/llm-providers/vertex-ai.md)                |
| OpenRouter        | `openrouter`        | [Access LLMs via OpenRouter](https://docs.api7.ai/api7-gateway/ai-gateway/llm-providers/openrouter.md)               |
| AWS Bedrock       | `bedrock`           | [`ai-proxy` AWS Bedrock example](https://docs.api7.ai/hub/ai-proxy.md#proxy-to-aws-bedrock)                          |
| OpenAI-Compatible | `openai-compatible` | [Connect Any OpenAI-Compatible LLM](https://docs.api7.ai/api7-gateway/ai-gateway/llm-providers/openai-compatible.md) |

Any LLM API that follows the OpenAI chat completion format can be proxied using the `openai-compatible` provider type.

## Next Steps[​](#next-steps "Direct link to Next Steps")

* [Why AI Gateway](https://docs.api7.ai/ai-gateway/why-ai-gateway.md) — Understand why production AI traffic benefits from a purpose-built gateway and when an existing API gateway remains the better fit.
* [Get Started](https://docs.api7.ai/api7-gateway/ai-gateway/get-started.md) — Proxy your first LLM request in 5 minutes.
* [LLM Providers](https://docs.api7.ai/api7-gateway/ai-gateway/llm-providers/openai.md) — Configure a specific provider.
* [Use Cases and How-To Guides](https://docs.api7.ai/api7-gateway/ai-gateway/use-cases/multi-llm-routing-and-fallback.md) — Explore advanced capabilities like routing, guardrails, and cost control.
