Product type

Portkey builds an LLM gateway with observability, guardrails and prompt management. Portkey hosts it as a service, and companies can also run the open-source gateway in their own cloud.

Parts

Follow one model call, from the app to the log. The coloured boxes are the parts that Portkey builds, and the boxes with a dashed border are the parts it connects to.

  1. App sends its model request to Portkey
  2. Caller, limits and input checkedPortkey calls it: AI Gateway
  3. Routing picks the model and the provider
  4. Model provider returns the answer
  5. Answer checked and the call logged with its costPortkey calls it: Observability
  • Gateway for model calls · AI Gateway
  • Logs and dashboards · Observability
  • Input and output checks · Guardrails
  • AI models from many providers

How it works

AI Gateway

The AI Gateway gives one consistent API for many AI models and providers. A developer points the application at Portkey with a short code change, or uses Portkey's SDK. The gateway checks who is calling, picks the provider key to use and applies rate limits.

Routing spreads calls across keys or providers by set weights, or sends them by conditions. A cached earlier answer can be returned instead of a new call. If a call fails, the gateway retries it or falls back to another provider or model.

  • AI Gateway
  • Routing
  • Fallback

Where the gateway runs

The core gateway is open source under the MIT licence, and is written in TypeScript for Node.js. It runs as a Node.js server, in Docker or on Cloudflare Workers. Portkey also runs it in its own cloud.

Private deployments run on AWS, Azure or Google Cloud, or on Kubernetes. The models themselves come from providers such as OpenAI, Anthropic and Mistral, or from the customer's own models.

  • Open source
  • Private deployment
  • Model providers

Observability and guardrails

Observability shows every call in dashboards, metrics and logs, with its cost and timing. It follows OpenTelemetry, an open standard for traces and metrics. Guardrails check model inputs and outputs as they pass, for example by removing personal data.

The Prompt Engineering Studio is a shared library where a team writes prompt templates and keeps their versions. The Model Catalog lists the models on offer, with an open dataset of model prices.

  • Observability
  • Guardrails
  • Prompt Engineering Studio

Agents and governance

The MCP Gateway gives central login, access control and logging for MCP servers, the tool servers that AI agents call. Agents' tool calls pass through the same control plane as model calls. Portkey also connects to agent frameworks such as LangChain, CrewAI and AutoGen.

Governance controls add role-based access, budgets and audit logs. PII redaction and single sign-on are part of them too. Enterprise plans can keep data in a chosen region.

  • MCP Gateway
  • Control plane
  • Governance

Evolution

  1. 2023

    Portkey launch

    A production stack for teams building on generative AI.

  2. Open-source AI Gateway

    Routing and fallbacks between model providers, published on GitHub.

  3. Observability, prompts and guardrails

    Logs, a shared prompt library and checks on model inputs and outputs.

  4. Agent frameworks

    The gateway, guardrails and logs linked to frameworks for AI agents.

  5. MCP Gateway

    Access control and logging for the tool servers that AI agents call.

Glossary

Portkey's product names

Names that Portkey uses for its own parts.

AI Gateway
Portkey’s router between applications and model providers.
Observability
Portkey’s logs and dashboards of model calls.
Guardrails
Portkey’s checks on model inputs and outputs.
Prompt Engineering Studio
Portkey’s shared library of prompt templates.
Model Catalog
Portkey’s list of available models, with their prices.
MCP Gateway
Portkey’s control point for the tool servers AI agents use.

Industry terms

Kinds of product. Each name links to a page that explains how it works.

LLM gateway
One API in front of many model providers that sends each request to the right model.

Other terms

General terms used on this page.

API
A defined way for programs to call a service.
SDK
A code library for calling a service.
Rate limit
A cap on how many calls can be made in a set time.
Fallback
Switching to a backup model when a call fails.
OpenTelemetry
An open standard for traces and metrics.
MCP
Model Context Protocol: a standard way for AI agents to call tools.
Control plane
The part of a system that decides and enforces the rules.
PII redaction
Removing personal data such as names and numbers.