Docs

Manage and Secure AI Traffic

Centralize LLM access on API7 Gateway. Route traffic to multiple providers, enforce guardrails, and control costs from one platform.

API7 Gateway manages LLM traffic with the same data plane, control plane and policies it uses for every other API. A set of AI plugins turns a route into a unified control point between your applications and LLM providers, so platform engineers can centralize authentication, enforce guardrails, control costs, and gain observability across all AI traffic — without modifying application code.

This document provides an overview of those capabilities, the architecture, and the supported providers.

The AI plugins on this page run under your existing API7 Gateway license — no separate authorization is required. If you're comparing this against AISIX (API7's dedicated AI gateway product) or Apache APISIX's own AI plugins, see Choose the right AI gateway (opens in AISIX AI Gateway docs) to pick the right scope for your use case.

Architecture

The AI plugins run on the API7 data plane and are configured through the control plane, exactly like the rest of the plugin set. Requests flow through a processing pipeline before reaching the LLM provider:

LLM Providers

API7 AI Gateway

Clients

Web Applications

Mobile Apps

AI Agents

Authentication & Access Control

Protocol Conversion
(Anthropic → OpenAI)

Prompt Engineering
(Templates, Decorators)

Guardrails
(Prompt Guard, PII, Moderation)

Token Rate Limiting

Multi-Model Router
(Load Balancing, Failover)

OpenAI

Azure OpenAI

Anthropic

DeepSeek

Google Gemini

Vertex AI

OpenRouter

Any OpenAI-Compatible

LLM Providers

API7 AI Gateway

Clients

Web Applications

Mobile Apps

AI Agents

Authentication & Access Control

Protocol Conversion
(Anthropic → OpenAI)

Prompt Engineering
(Templates, Decorators)

Guardrails
(Prompt Guard, PII, Moderation)

Token Rate Limiting

Multi-Model Router
(Load Balancing, Failover)

OpenAI

Azure OpenAI

Anthropic

DeepSeek

Google Gemini

Vertex AI

OpenRouter

Any OpenAI-Compatible


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

Key Capabilities

CapabilityDescriptionPlugin
LLM ProxyingUnified API to 8+ providers, including any OpenAI-compatible endpointai-proxy (opens in Plugin Hub docs)
Multi-Model RoutingLoad balancing, failover, health checks, and priority-based routing across models and providersai-proxy-multi (opens in Plugin Hub docs)
Protocol ConversionAnthropic to OpenAI protocol translation with automatic response conversion, transparent to clientsai-proxy (opens in Plugin Hub docs)
Prompt EngineeringReusable templates and system prompt injection at the gateway layerai-prompt-decorator (opens in Plugin Hub docs), ai-prompt-template (opens in Plugin Hub docs)
Content GuardrailsPCRE-based prompt filtering and external toxicity detectionai-prompt-guard (opens in Plugin Hub docs), ai-aws-content-moderation (opens in Plugin Hub docs), ai-aliyun-content-moderation (opens in Plugin Hub docs)
PII RedactionMask sensitive data in prompts before they reach LLM providersai-request-rewrite (opens in Plugin Hub docs)
Token Rate LimitingBudget control per consumer, route, or model instance based on token countsai-rate-limiting (opens in Plugin Hub docs)
RAG IntegrationRetrieval-Augmented Generation with Azure AI Search and Azure OpenAI embeddingsai-rag (opens in Plugin Hub docs)
AI-Driven TransformationIntelligent request rewriting powered by an LLMai-request-rewrite (opens in Plugin Hub docs)
AI ObservabilityBuilt-in logging (summaries and payloads) and Prometheus metrics for token accountingai-proxy (opens in Plugin Hub docs)
MCP GatewayExpose OpenAPI services as MCP tools for AI agentsopenapi-to-mcp (opens in Plugin Hub docs)

Supported LLM Providers

The following LLM providers have dedicated driver implementations:

ProviderProvider KeyGuide
OpenAIopenaiRoute Traffic to OpenAI
Azure OpenAIazure-openaiIntegrate Azure OpenAI
AnthropicanthropicConnect to Anthropic Claude
DeepSeekdeepseekRoute Traffic to DeepSeek
Google GeminigeminiIntegrate Google Gemini
Vertex AIvertex-aiRoute Traffic to Vertex AI
AWS BedrockbedrockRoute Traffic to AWS Bedrock
OpenRouteropenrouterAccess LLMs via OpenRouter
OpenAI-Compatibleopenai-compatibleConnect Any OpenAI-Compatible LLM

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

Next Steps