Open Source Portkey Alternatives

A curated collection of the 7 best open source alternatives to Portkey.

The best open source alternative to Portkey is LiteLLM. If that doesn't suit you, we've compiled a ranked list of other open source Portkey alternatives to help you find a suitable replacement. Other interesting open source alternatives to Portkey are: Bifrost, Helicone, Envoy AI Gateway and LLM Gateway.

Portkey alternatives are mainly AI Development Platforms but may also be Machine Learning Infrastructure or AI Security & Privacy. Browse these if you want a narrower list of alternatives or looking for a specific functionality of Portkey.

Share:

An open source gateway exposing more than a hundred LLM providers behind one OpenAI-compatible interface, for teams centralising model access.

Screenshot of LiteLLM websiteRead more

Every provider brings its own SDK, auth pattern, request format and error types, so code that talks to several models fills up with special cases. LiteLLM collapses all of it into one interface in the OpenAI format, covering more than 100 providers.

It works two ways. As a Python SDK you import a completion function and switch models by changing a string, and as a proxy server you run a gateway the whole team points at, using any OpenAI client with a different base address.

The gateway is where the operational features live.

  • Virtual keys: issue per-team credentials without handing out the underlying provider keys.
  • Spend tracking: attribute cost across keys and models from the admin dashboard.
  • Load balancing: spread traffic across deployments and fall back when a provider fails.
  • Guardrails: apply policy checks to requests as they pass through the gateway.
  • Broad endpoints: chat completions, responses, embeddings, images, audio, batches and rerank.

Beyond model calls it invokes A2A agents from LangGraph, Vertex AI Agent Engine, Azure AI Foundry, Bedrock AgentCore and Pydantic AI. The project reports 8ms P95 latency at 1k requests per second, publishes deploy templates for Render, Railway, AWS and Google Cloud, and counts Netflix among its adopters.

Read more

An AI gateway that fronts more than twenty model providers behind one OpenAI-compatible API, with failover, load balancing, and caching.

Screenshot of Bifrost websiteRead more

Bifrost places a single API in front of every model provider an application might reach for. More than 23 of them, including OpenAI, Anthropic, AWS Bedrock, Google Vertex, Azure, Cohere, Mistral, Groq, and Ollama, sit behind one OpenAI-compatible endpoint, so changing provider stops being a code change.

Starting it takes one command through npx or Docker, after which a built-in web interface handles configuration, live monitoring, and analytics. Providers can also be set up dynamically, through the API, or from files, and existing SDK code usually needs one line changed to point at the gateway.

The gateway layer is where the reliability and cost work happens.

  • Automatic failover: requests move between providers and models when one of them fails.
  • Load balancing: traffic is distributed across multiple API keys and providers.
  • Semantic caching: responses are reused when a new request is close enough in meaning, cutting cost and latency.
  • Governance: usage tracking, rate limiting, virtual keys, and budgets scoped to teams and customers.
  • Observability: native Prometheus metrics, distributed tracing, and request logging.
  • MCP tools: models call external tools such as filesystem access, web search, and databases.

The codebase is modular, separating core provider implementations, a framework layer for configuration, log, and vector storage, HTTP transports, and the web UI. Text, images, audio, and streaming all pass through the same interface. Private deployments add clustering, guardrails, an MCP gateway, and adaptive load balancing for teams running at scale.

Read more

An AI gateway and observability platform that logs LLM requests, tracks cost and latency, and routes across providers for AI engineers.

Screenshot of Helicone websiteRead more

Helicone sits between an application and the model providers it calls, turning opaque LLM traffic into something inspectable. Changing the base URL in an OpenAI client is enough to start logging every request, and the same gateway reaches more than a hundred models behind one API key.

Beyond logging, the gateway handles routing and automatic fallbacks when a provider fails. Integrations cover OpenAI, Anthropic, Gemini, LangChain and the Vercel AI SDK, and metrics export to PostHog in a single line for teams keeping their dashboards elsewhere.

The platform gathers the tasks that follow a deployed model.

  • Tracing: sessions and traces for agents, chatbots and document processing pipelines, inspectable when something goes wrong.
  • Cost and latency: per-request accounting of spend, latency and quality across every provider in use.
  • Playground: prompts, sessions and traces can be replayed and iterated on in the interface.
  • Prompt management: versioning against production data, deployed through the gateway with no code change.
  • Fine-tuning: handoff to partner services for training on the data already collected.

Self-hosting runs from a Docker Compose setup, with a Helm chart offered for enterprise workloads and manual deployment discouraged. The stack splits into a Next.js web frontend, a Cloudflare Workers proxy for logging, an Express server that collects logs, Supabase for the application database and auth, ClickHouse for analytics and MinIO for object storage. The hosted service is SOC 2 and GDPR compliant, with a free tier of ten thousand requests a month.

Read more

Open source gateway that routes application traffic to generative AI services, built on Envoy Gateway for teams standardizing model access.

Screenshot of Envoy AI Gateway websiteRead more

Envoy AI Gateway handles request traffic from application clients to generative AI services, using Envoy Gateway as its foundation. It gives an organization one place to put authentication, routing and rate limiting for model calls, instead of scattering provider keys through every service that wants to talk to a language model.

The recommended shape is a two-tier gateway. The tier one gateway is the centralized entry point, handling authentication, top-level routing and global rate limiting. The tier two gateway sits in front of a self-hosted model serving cluster and gives fine-grained control over access to those models.

A few pieces define how the project is used.

  • Two-tier pattern: a central entry gateway in front of gateways guarding self-hosted model clusters.
  • Endpoint picker: routing support aimed at optimizing inference on those self-hosted clusters.
  • Hosted providers: OpenAI, Azure OpenAI, Google Gemini, Vertex AI, AWS Bedrock, Anthropic and Mistral.
  • Independent model hosts: Cohere, Groq, Together AI, DeepInfra, DeepSeek, Hunyuan, SambaNova, Grok and the Tetrate Agent Router Service.
  • Quickstart: a getting-started guide that brings the gateway up in a few steps, with a concepts section covering the architecture and its resources.

The project grew out of a proposal to use Envoy Gateway as a cloud native gateway for large language models. It follows the CNCF code of conduct, holds a community meeting every Monday with a public agenda, and coordinates in a dedicated channel of the Envoy Slack workspace, so contributions arrive through the usual pull request path.

Read more

An API gateway that routes requests to multiple LLM providers through one OpenAI-compatible endpoint while tracking tokens, costs, and response times.

Screenshot of LLM Gateway websiteRead more

LLM Gateway sits between your applications and the model providers they call, so adding or swapping a provider stops being an application change. It routes to OpenAI, Anthropic, Google Vertex AI and others, holds every provider key in one place, and records what each call consumed and cost.

Because the gateway speaks the OpenAI API format, existing clients migrate by pointing at a different base address rather than rewriting request code. The repository is a monorepo holding a Next.js dashboard, a Hono backend, the gateway service itself, a documentation site, a Drizzle ORM schema with migrations, and shared model and provider definitions.

The parts a team actually uses break down as follows.

  • Unified interface: one request and response shape works across every connected provider.
  • Key management: provider credentials live in a single place instead of scattered through services.
  • Usage analytics: requests, tokens, response times, and costs are tracked across all interactions.
  • Performance monitoring: models are compared on speed and cost-effectiveness before you commit to one.
  • Self-hosting: a unified Docker image bundles Postgres and Redis and starts from two generated secrets.

Self-hosters should use Docker-managed volumes rather than bind-mounting a host directory to the Postgres data path, since initialization inside the container needs to set permissions there and can fail depending on host filesystem and ownership. A hosted account is available for teams who want an API key immediately. The core is AGPLv3, while commercial features in the enterprise directory need a separate license.

Read more

An LLM proxy that redacts PII, blocks sensitive content and tokenizes fields before requests reach a provider, for teams with data rules.

Screenshot of Grepture websiteRead more

Grepture Proxy stands between an application and an AI provider and cleans the traffic on the way through. It detects and redacts personal data, blocks content you do not want leaving the building, and swaps sensitive JSON fields for tokens, all before the request reaches the model.

Each request carries a target header naming the upstream API, so one proxy can front several providers. It authenticates the caller, applies input rules, forwards the request, applies output rules to the reply, restores anything it tokenized and returns the result. Buffered and streaming responses both work, and token restoration spans streamed chunks. Rules sit in a JSON file that reloads when it changes or on SIGHUP, each with conditions, a target of input, output or both, and a sampling rate.

Actions are the part you configure.

  • Redact PII: regex patterns catch email addresses, phone numbers, SSNs, credit cards, IP addresses, postal addresses and dates of birth.
  • Find and replace: literal or regex substitution rewrites matching text.
  • Tokenize: JSON fields become tokens, with the originals kept for restoration on the way back.
  • Block request: the call stops with a status code and message you choose.
  • Log only: the request is tagged for logging and passes through unchanged.

The proxy runs on Bun, listens on port 4001 and builds into a Docker image with the rules file mounted in. An optional API key restricts who may use it, and bodies over 50KB offload to S3-compatible storage during the log flush, after the client has its response.

Read more

A proxy backend that keeps AI API keys out of iOS apps and verifies callers with Apple DeviceCheck, for mobile developers shipping AI features.

Screenshot of Proxed AI websiteRead more

Shipping an AI feature in an iOS app usually means shipping the provider key inside the binary, where anyone willing to look can take it. Proxed.AI puts a backend in front of that call: the key stays on the server, requests are checked before they are forwarded, and model responses come back in a shape the app can rely on.

The project is a TypeScript monorepo running on Bun, with React and Next.js for the landing page and portal, Hono for the API, Supabase for authentication, database and storage, and shadcn components on Tailwind CSS. The web pieces and the API deploy to Vercel, and Resend, GitHub Actions and Polar handle the service around them.

The features are aimed squarely at mobile work.

  • Key management: provider keys live behind the proxy instead of in the app bundle.
  • DeviceCheck verification: Apple's device attestation blocks requests that did not come from a real installation.
  • Structured responses: JSON response schemas are defined in a visual builder and enforced on model output.
  • Observability: usage, rate limits and model selection are monitored and adjusted while the app is live.
  • Quick integration: the documented setup is meant to take under ten minutes with no extra code in the app.

Documentation is still being written and lives on the project's docs site. The license is AGPL-3.0 for non-commercial use, so a commercial deployment needs different terms from the maintainers.

Read more
back

Discover Open Source alternatives to: