---
title: "Deploy Experiential | AI Gateway with Per-Key Budgets"
description: "OpenAI-compatible gateway for many LLMs, with per-agent keys and spend caps"
category: "AI/ML"
url: https://railway.com/deploy/experiential-or-ai-gateway-with-per-key-
---

# Deploy Experiential | AI Gateway with Per-Key Budgets

OpenAI-compatible gateway for many LLMs, with per-agent keys and spend caps

**[Deploy Experiential | AI Gateway with Per-Key Budgets on Railway](https://railway.com/template/experiential-or-ai-gateway-with-per-key-)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/experiential-or-ai-gateway-with-per-key-/manifest.json

- **Creator:** jean82290's Projects
- **Category:** AI/ML
- **Total deploys:** 1

## Template content

### experiential https://raw.githubusercontent.com/jean82290/experiential-railway/main/assets/icon.svg

- **Source:** jean82290/experiential-railway
- **Health check:** /health/ready
- **Public domain:** Yes

## Documentation

# Deploy and Host Experiential | AI Gateway with Per-Key Budgets on Railway

Experiential is an open-source AI gateway. It puts OpenAI, Anthropic, Gemini, OpenRouter and your own OpenAI-compatible servers behind one OpenAI-compatible API (plus the Anthropic Messages API), and gives every user or agent its own virtual key, model access and monthly spending cap.

## About Hosting Experiential | AI Gateway with Per-Key Budgets

This template runs the official Experiential release from PyPI, with every dependency pinned by SHA-256, as one service with a Railway volume at `/data` for the gateway database. Your provider keys stay in Railway variables: Experiential stores only their names.

Things a bare Experiential deploy gets wrong on Railway, handled here:

- **It would be unreachable.** Experiential only listens on 127.0.0.1. A Caddy front door in the same container listens on Railway's port.
- **It would leak spend data.** On loopback, its usage report and metrics answer without a key. Caddy exposes only the API and health checks; the usage page sits behind an admin password generated for you.
- **It would wait for a wizard.** Setup is interactive upstream. Here it is configured from variables on every boot: providers, one alias per model in `EXP_MODELS` (with capabilities, limits and prices from Experiential's own catalog), a `default` identity and its first key, printed once in the deploy logs.
- **It would crash without a key.** Until you add a provider key, the service stays up and answers with a clear setup message instead of crash-looping.
- **It would phone home.** Anonymous telemetry is on by default upstream; this template turns it off.

## Common Use Cases

- One API endpoint and one spend view for all the LLM providers your team or app uses
- A separate key and monthly budget for each AI agent, so a runaway loop cannot drain your account
- Switching an app between OpenAI, Claude and open models by changing only the model name
- Putting self-hosted models (vLLM, Ollama) behind the same authenticated API as hosted ones

## Dependencies for Experiential | AI Gateway with Per-Key Budgets Hosting

- Experiential (official PyPI release, github.com/experientiallabs/experiential, Apache-2.0)
- At least one model provider key (OpenAI, Anthropic, Gemini, OpenRouter) or an OpenAI-compatible server
- A Railway volume mounted at `/data` (included in this template)

### Deployment Dependencies

- Experiential repository: https://github.com/experientiallabs/experiential
- Experiential documentation: https://platform.experientiallabs.ai/docs
- Template source and smoke test: https://github.com/jean82290/experiential-railway

### Implementation Details

Use any OpenAI SDK with the gateway key printed in the deploy logs:

```
OPENAI_BASE_URL=https:///v1
OPENAI_API_KEY=
```

From another service in the same project, over the private network:

```
OPENAI_BASE_URL=http://${{experiential.RAILWAY_PRIVATE_DOMAIN}}:${{experiential.PORT}}/v1
```

Add identities, keys and monthly budgets with `exp config gateway ...` from `railway ssh`; changes apply without a redeploy. Open `/usage` in a browser (user `admin`, password `EXP_ADMIN_PASSWORD`) to see spend per identity. Gemini aliases serve plain chat: Experiential does not support tool calls on Gemini yet.

This is a community-maintained template, not affiliated with Experiential Labs.

## Why Deploy Experiential | AI Gateway with Per-Key Budgets on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Experiential | AI Gateway with Per-Key Budgets on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.



## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Möbius v0.1 Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.

Open this page in a browser: https://railway.com/deploy/experiential-or-ai-gateway-with-per-key-
