---
title: "Deploy Pilot Router"
description: "Tiny model router on your own Railway, with your own keys"
category: "AI/ML"
url: https://railway.com/deploy/pilot-router
---

# Deploy Pilot Router

Tiny model router on your own Railway, with your own keys

**[Deploy Pilot Router on Railway](https://railway.com/template/pilot-router)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/pilot-router/manifest.json

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

## Template content

### pilot-router

- **Source:** https://github.com/omgorganizeme/pilot-router
- **Public domain:** Yes

## Documentation

# Deploy and Host Pilot Router on Railway

Pilot Router is a tiny model router you run on your own Railway project, with your own keys. Simple text tasks are answered by Gemini; tasks that need Claude wait in a queue that your own Claude scheduled task fetches, so the paid Anthropic API is never called. One Python file, standard library only.

## About Hosting Pilot Router

The template deploys a single service built from a small Dockerfile (Python 3.11, nothing to install) and gives it a public address. You fill in `GEMINI_API_KEY` with your own Gemini key; `ROUTER_TOKEN`, the password for calls to the router, is generated for you. The keys stay only on your Railway service. The service answers `GET /health` (open, never shows a key), `POST /route` and the Claude queue routes `GET /claude/pendentes` and `POST /claude/feito`, all three protected by the token. The queue lives in memory, so there is no database or volume to manage. Railway and Gemini are billed to your own accounts.

## Common Use Cases

- Send summarise, list, translate, classify, extract and rewrite tasks to Gemini with your own key
- Keep tasks that need reasoning, code, decisions or money in a queue for your own Claude plan
- Give the Pilot a router address that you own and control

## Dependencies for Pilot Router Hosting

- A Gemini API key (`GEMINI_API_KEY`)
- Optional: a JEV key (`TYPESAFE_API_KEY`) to classify tasks instead of the keyword rule; add it as a variable after deploying

### Deployment Dependencies

- Source code and full documentation: https://github.com/omgorganizeme/pilot-router
- Gemini API key: https://aistudio.google.com/apikey

### Implementation Details

```
curl https://.up.railway.app/health
curl -X POST https://.up.railway.app/route \
  -H "Authorization: Bearer " -H "Content-Type: application/json" \
  -d '{"task": "Translate to English: bom dia"}'
```

## Why Deploy Pilot Router 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 Pilot Router 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.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius 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.

Open this page in a browser: https://railway.com/deploy/pilot-router
