AI Gateway: one governed endpoint for every model
Give your apps, agents and coding tools a single OpenAI-compatible endpoint. You decide which teams can use which models, how traffic routes and falls back, what guardrails apply and how much they can spend — all from the Zerq console.
What you get
One endpoint for every provider
OpenAI, Azure OpenAI, Anthropic, Amazon Bedrock, Google Vertex, Gemini, Groq, OpenRouter, Ollama, vLLM and any OpenAI-compatible server sit behind one /llm/v1 endpoint. Apps list the models they are allowed to use and pick one — chat, Responses, Anthropic Messages, embeddings, images, audio and moderation.
Works with Codex, Claude Code and Cursor
Developers point their coding tools at Zerq with a base URL and a per-profile AI key. Streaming and tool calls pass through, so agent loops work unchanged. The console shows copy-paste setup for each tool.
Deny-by-default access on your existing clients
AI access extends the clients and profiles you already manage. A client lists its allowed models; each profile turns AI on, narrows the model set, caps tokens and gets its own revocable key. Nothing is reachable until you grant it.
Routing, fallback and context control
Each model can route across several deployments by priority, weight, latency or cost, with region tags for data residency. Fallback chains, retries, cooldowns and health checks keep traffic flowing. Oversized prompts are rejected by default, or trimmed or moved to a larger-context model if you choose.
Guardrails before and after the model
Block or mask PII, secrets and banned topics on input and output. Plug in Presidio, Lakera, Azure Content Safety, OpenAI moderation, your own webhook, or a Zerq workflow as an external check.
Budgets and spend you can explain
Attach token, request and cost budgets to clients, with tighter per-model limits, per-profile token caps, warning alerts and hard stops. Spend reports break cost down by client, model and day, with CSV export for finance. An exact and semantic response cache cuts repeat spend.
AI logs and standard observability
Every call records the client, model, provider, tokens, cost, latency, fallbacks and guardrail decisions. Prompt capture is configurable per model and redacted by default. Prometheus metrics, OpenTelemetry traces (GenAI conventions) in the same trace as the rest of the request, log streaming to your SIEM, and Langfuse.
Self-hosted, next to your API gateway
The AI Gateway runs in your own environment as part of the Zerq platform, sharing its identity, roles, audit trail and deployment. It is a separate product surface with its own configuration, not a plugin on API routes.
A typical request
The caller sends a standard request with its AI key. Zerq checks the profile, the model grant, the token cap and the budget. It runs input guardrails, then picks a healthy deployment and falls back if needed. Output guardrails run next, then cost is recorded and the call is logged. The response comes back in the format the caller asked for, with headers that show which provider served it.
curl https://gateway.example.com/llm/v1/chat/completions \
-H "Authorization: Bearer $ZERQ_AI_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"chat-default","messages":[{"role":"user","content":"Hello"}]}'How it relates to the API gateway and MCP
The API gateway governs calls to your APIs, and the Gateway MCP lets AI agents call those same APIs. The AI Gateway governs calls from your apps to language models. All three share clients, profiles, roles and the audit trail, so one team runs them from one console. Developers can also find their models and create keys in the developer portal.