---
title: "An AI Gateway before a favorite provider"
description: "Centralizing access to models lets you switch providers, control costs and audit usage without rewriting anything: one API in front of every model."
author: Lucas Laguéns Artigas
lang: en
date: 2026-10-20
tags: [AI]
canonical: https://www.lucaslaguens.com/en/blog/ai-gateway
---

# An AI Gateway before a favorite provider

> Centralizing access to models lets you switch providers, control costs and audit usage without rewriting anything: one API in front of every model.

When a team starts with AI, the usual move is to pick one provider and connect every tool directly to its API. It works the first week. The problem comes later.

## The problem with marrying a provider

The model market changes every few months: cheaper models appear, others get better at code, others at reasoning. If every internal tool talks directly to a provider, switching means touching every integration, rotating keys and going through the security review again.

## What an AI Gateway is

It is an intermediate layer that exposes a single API for all models. Applications talk to the gateway, and the gateway decides which provider and which model each request is routed to. For the applications, a model is just an alias.

```yaml title="gateway.yaml"
model_list:
  - alias: chat-general
    model: provider-a/large-model
  - alias: chat-fast
    model: provider-b/light-model
```

## What you get from day one

- **Provider freedom:** you change the model behind an alias without touching the applications.
- **Visible cost:** tokens per user and per team, with limits and alerts.
- **Centralized security:** keys don't live in every application, and access goes through SSO.
- **A single point of control:** policies, filters and auditing in one place.

> The question is not which model is the best today, but how much it costs you to switch tomorrow.

## Where I would start

An open source gateway deployed in your own cloud, a couple of well-chosen model aliases and a chat interface on top for non-technical profiles. With that you have something useful in days, not months, and the door open to switch provider when the market moves.

[Leer esta entrada en español](https://www.lucaslaguens.com/blog/ai-gateway.md)
