API7 Docs
AI Gateway

Manage and Secure AI Traffic

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

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

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:

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

Supported LLM Providers

API7 AI Gateway supports the following LLM providers with 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
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.

AWS Bedrock support with native SigV4 signing is planned for a future release.

Next Steps